Avoid Broken Roblox Studio Shortcuts After Updates with a CMD File


この記事を日本語で読む。

When you use Roblox Studio on Windows, a desktop shortcut may stop working after an update.

This can happen because the Roblox Studio executable is stored in a version-specific directory like this:

%LOCALAPPDATA%\Roblox\Versions\version-xxxxxxxxxxxxxxxx\RobloxStudioBeta.exe

When an update changes the version-xxxxxxxxxxxxxxxx part of the path, a shortcut that points directly to the old executable becomes invalid.

To avoid this problem, you can create one CMD file at a fixed location and make it find the newest installed Roblox Studio every time it runs.

Create RobloxStudio.cmd

First, create the following directory:

C:\Tools

Save the following script as C:\Tools\RobloxStudio.cmd:

@echo off
setlocal EnableExtensions

set "ROBLOX_VERSIONS=%LOCALAPPDATA%\Roblox\Versions"
set "STUDIO="

if not exist "%ROBLOX_VERSIONS%\" (
    echo [ERROR] Roblox Versions folder was not found:
    echo %ROBLOX_VERSIONS%
    pause
    exit /b 1
)

rem Check version directories from newest to oldest
for /f "delims=" %%D in ('dir /b /ad /o-d "%ROBLOX_VERSIONS%\*" 2^>nul') do (
    if exist "%ROBLOX_VERSIONS%\%%D\RobloxStudioBeta.exe" (
        set "STUDIO=%ROBLOX_VERSIONS%\%%D\RobloxStudioBeta.exe"
        goto :studio_found
    )
)

echo [ERROR] RobloxStudioBeta.exe was not found.
pause
exit /b 1

:studio_found

echo Roblox Studio:
echo "%STUDIO%"

start "" "%STUDIO%"

endlocal
exit /b 0

Running C:\Tools\RobloxStudio.cmd now launches the installed Roblox Studio executable from the most recently modified version directory.

Create a desktop shortcut

Right-click an empty area of the desktop, select New, and then select Shortcut.

Enter the following command in the location field:

C:\Windows\System32\cmd.exe /d /c C:\Tools\RobloxStudio.cmd

After creating the shortcut, open its properties and set Start in to:

C:\Tools

The desktop shortcut now launches Roblox Studio through C:\Tools\RobloxStudio.cmd instead of pointing directly to the Roblox Studio executable.

How it works

The launch sequence is simple:

Desktop shortcut

C:\Tools\RobloxStudio.cmd

Search %LOCALAPPDATA%\Roblox\Versions

Find RobloxStudioBeta.exe in the most recently modified version directory

Launch Roblox Studio

For example, an update might change the installation directory from:

version-111111111111

to:

version-222222222222

Because the CMD file searches the version directories every time it runs, you do not need to recreate the shortcut after each update.

Automatically create the shortcut

You can also make the CMD file create the desktop shortcut automatically:

@echo off
setlocal EnableExtensions

set "ROBLOX_VERSIONS=%LOCALAPPDATA%\Roblox\Versions"
set "STUDIO="

if not exist "%ROBLOX_VERSIONS%\" (
    echo [ERROR] Roblox Versions folder was not found:
    echo %ROBLOX_VERSIONS%
    pause
    exit /b 1
)

for /f "delims=" %%D in ('dir /b /ad /o-d "%ROBLOX_VERSIONS%\*" 2^>nul') do (
    if exist "%ROBLOX_VERSIONS%\%%D\RobloxStudioBeta.exe" (
        set "STUDIO=%ROBLOX_VERSIONS%\%%D\RobloxStudioBeta.exe"
        goto :studio_found
    )
)

echo [ERROR] RobloxStudioBeta.exe was not found.
pause
exit /b 1

:studio_found

set "SHORTCUT_ICON=%STUDIO%,0"

powershell.exe -NoProfile -ExecutionPolicy Bypass -Command ^
    "$desktop=[Environment]::GetFolderPath('Desktop');" ^
    "$lnk=Join-Path $desktop 'Roblox Studio.lnk';" ^
    "$ws=New-Object -ComObject WScript.Shell;" ^
    "$s=$ws.CreateShortcut($lnk);" ^
    "$s.TargetPath=$env:ComSpec;" ^
    "$s.Arguments='/d /c C:\Tools\RobloxStudio.cmd';" ^
    "$s.WorkingDirectory='C:\Tools';" ^
    "$s.IconLocation=$env:SHORTCUT_ICON;" ^
    "$s.Description='Launch the newest installed Roblox Studio';" ^
    "$s.WindowStyle=7;" ^
    "$s.Save();"

start "" "%STUDIO%"

endlocal
exit /b 0

Save this version as C:\Tools\RobloxStudio.cmd and run it. It creates a desktop shortcut named Roblox Studio and then launches Roblox Studio. Running the CMD file again updates the same shortcut.

After that, you can launch Roblox Studio from the desktop shortcut.

Summary

Instead of pointing a shortcut directly to the Roblox Studio executable, add one fixed CMD file between the shortcut and the version-specific executable:

Fixed CMD file

Find the newest version directory

RobloxStudioBeta.exe

This approach prevents Roblox Studio path changes from breaking your shortcut after updates. It is especially useful if you use Roblox Studio frequently on Windows.