Multiple Account/Logins in Bambu Studio and Bambu Handy

I think the script is pretty neat and easy to use once set up. I’ve been using it for the past weeks without issues.

I’ve just created an initial setup script, to streamline everything and hopefully make it easier to understand what to do.

@echo off
setlocal

cd /d %APPDATA%

echo.
echo ==================================================
echo      Bambu Studio Profile Switcher - Setup
echo ==================================================
echo.
echo This setup will create two separate profiles:
echo.
echo   BambuStudioPriv
echo   BambuStudioWork
echo.
echo Your current Bambu Studio profile will be preserved.
echo.
echo IMPORTANT:
echo - Close Bambu Studio before continuing
echo - Do not manually rename any folders during setup
echo.
pause

REM ==================================================
REM Verify initial state
REM ==================================================

if not exist BambuStudio (
    echo.
    echo ERROR:
    echo No BambuStudio folder found.
    echo Expected location:
    echo %APPDATA%\BambuStudio
    timeout /t 10 >nul
    exit /b
)

if exist BambuStudioPriv (
    echo.
    echo ERROR:
    echo BambuStudioPriv already exists.
    echo Setup appears to have been run before.
    timeout /t 10 >nul
    exit /b
)

if exist BambuStudioWork (
    echo.
    echo ERROR:
    echo BambuStudioWork already exists.
    echo Setup appears to have been run before.
    timeout /t 10 >nul
    exit /b
)

REM ==================================================
REM Ask which profile is currently active
REM ==================================================

echo.
echo Which account is currently stored in Bambu Studio?
echo.
echo [P] Private
echo [W] Work
echo.

set /p PROFILE=Select profile type (P/W): 

if /I "%PROFILE%"=="P" (
    set CURRENT_PROFILE=PRIVATE
    set CURRENT_FOLDER=BambuStudioPriv
    set OTHER_FOLDER=BambuStudioWork
)

if /I "%PROFILE%"=="W" (
    set CURRENT_PROFILE=WORK
    set CURRENT_FOLDER=BambuStudioWork
    set OTHER_FOLDER=BambuStudioPriv
)

if not defined CURRENT_PROFILE (
    echo.
    echo ERROR: Invalid selection.
    timeout /t 5 >nul
    exit /b
)

REM ==================================================
REM Save current profile
REM ==================================================

echo.
echo Saving current profile as %CURRENT_PROFILE%...
ren BambuStudio %CURRENT_FOLDER%

if errorlevel 1 (
    echo.
    echo ERROR:
    echo Failed to rename profile folder.
    timeout /t 10 >nul
    exit /b
)

echo.
echo ==================================================
echo Step 1 completed successfully.
echo ==================================================
echo.
echo Stored profile:
echo %CURRENT_FOLDER%
echo.
pause

REM ==================================================
REM Create second profile
REM ==================================================

echo.
echo ==================================================
echo STEP 2
echo ==================================================
echo.
echo Please start Bambu Studio manually now.
echo.
echo Log into the OTHER account:
echo.
echo If you selected PRIVATE before:
echo     Login with your WORK account
echo.
echo If you selected WORK before:
echo     Login with your PRIVATE account
echo.
echo Wait until synchronization is complete.
echo.
echo Then:
echo.
echo 1. Close Bambu Studio
echo 2. Return to this window
echo 3. Press any key
echo.
pause

REM ==================================================
REM Verify second profile exists
REM ==================================================

if not exist BambuStudio (
    echo.
    echo ERROR:
    echo No new BambuStudio profile was detected.
    echo.
    echo Did you start Bambu Studio and log in?
    timeout /t 10 >nul
    exit /b
)

echo.
echo Saving second profile...

ren BambuStudio %OTHER_FOLDER%

if errorlevel 1 (
    echo.
    echo ERROR:
    echo Failed to save second profile.
    timeout /t 10 >nul
    exit /b
)

REM ==================================================
REM Select active profile after setup
REM ==================================================

echo.
echo ==================================================
echo Setup completed successfully.
echo ==================================================
echo.
echo Created profiles:
echo.
echo   BambuStudioPriv
echo   BambuStudioWork
echo.
echo Which profile should be active now?
echo.
echo [P] Private
echo [W] Work
echo [D] Restore the profile that was active before setup
echo.

set /p ACTIVE=Select active profile (P/W/D): 

if /I "%ACTIVE%"=="P" (
    ren BambuStudioPriv BambuStudio
    set ACTIVE_PROFILE=PRIVATE
)

if /I "%ACTIVE%"=="W" (
    ren BambuStudioWork BambuStudio
    set ACTIVE_PROFILE=WORK
)

if /I "%ACTIVE%"=="D" (
    ren %CURRENT_FOLDER% BambuStudio
    set ACTIVE_PROFILE=%CURRENT_PROFILE%
)

if not defined ACTIVE_PROFILE (
    echo.
    echo Invalid selection.
    echo No profile activated.
    timeout /t 10 >nul
    exit /b
)

if errorlevel 1 (
    echo.
    echo ERROR:
    echo Failed to activate selected profile.
    timeout /t 10 >nul
    exit /b
)

echo.
echo ==================================================
echo Setup finished successfully.
echo ==================================================
echo.
echo Active profile:
echo %ACTIVE_PROFILE%
echo.
echo You can now use the Profile Switcher script.
echo.

timeout /t 10 >nul

After initial setup you can use the switcher script:

@echo off
setlocal

REM === Ensure Bambu Studio is not running ===
taskkill /IM BambuStudio.exe /F >nul 2>&1
timeout /t 1 >nul

cd /d %APPDATA%

echo.
echo === Bambu Studio Profile Switcher ===
echo.

REM === Detect current active profile ===
set CURRENT=UNKNOWN
set TARGET=

if exist BambuStudio (
    if exist BambuStudioPriv (
        set CURRENT=WORK
    ) else if exist BambuStudioWork (
        set CURRENT=PRIVATE
    ) else (
        set CURRENT=UNKNOWN
    )
) else (
    set CURRENT=NONE
)

echo Current profile: %CURRENT%
echo.

REM === Ask user ===
set /p CHOICE=Switch profile? (Y/N): 

if /I "%CHOICE%" NEQ "Y" (
    echo.
    echo Aborted.
    timeout /t 2 >nul
    exit /b
)

echo.
echo Switching profile...
echo.

REM === Switch logic ===

if "%CURRENT%"=="PRIVATE" (
    if exist BambuStudio ren BambuStudio BambuStudioPriv
    if exist BambuStudioWork ren BambuStudioWork BambuStudio
    set TARGET=WORK
)

if "%CURRENT%"=="WORK" (
    if exist BambuStudio ren BambuStudio BambuStudioWork
    if exist BambuStudioPriv ren BambuStudioPriv BambuStudio
    set TARGET=PRIVATE
)

if "%CURRENT%"=="NONE" (
    if exist BambuStudioPriv (
        ren BambuStudioPriv BambuStudio
        set TARGET=PRIVATE
    )
)

if "%CURRENT%"=="UNKNOWN" (
    echo WARNING: Unknown state. No changes made.
    timeout /t 2 >nul
    exit /b
)

REM === Final message ===
echo.
echo Successfully switched to %TARGET% profile.
echo Closing in 2 seconds...

timeout /t 2 >nul

endlocal

I’ve tested everything and seem to work fine. :wink:

How to Create an .bat file:

  1. Open Notepad.

  2. Copy the script code and paste it into the empty document.

  3. Click File → Save As…

  4. Change Save as type to All Files (.).

  5. Enter a filename ending in .bat, for example:

    InitialSetup.bat
    
  6. Save the file to a convenient location such as your Desktop.

  7. Double-click to start the .bat file

Hey, thanks for the reply. I got it to work. I removed the BambuStudioWork folder and used your modified script.

This is probably obvious, this is how it’s working for me but just to confirm I’m doing this right, I close Bambu studios down, run the profile switcher .bat file, enter y to confirm switching profile, then open Bambu Studios again.

I have an A1 at home under my personal account and an H2C at work under a company account. Please allow Bambu Studio and Bambu Handy to securely retain multiple accounts and provide an account switcher without requiring logout and reauthentication. Combining these printers under one account is not appropriate because company and personal ownership must remain separate.

I recently bought my 10 year old son a P1S and It’s such a headache swapping accounts that I’ve ended up just connecting his Printer to mine on mine so he can use it from his PC & I can help him setting up slicing etc, this really needs to be a thing. Even if that means having 2FA enabled for extra security before allowing it.