Skip to content

Instantly share code, notes, and snippets.

@tnhung2011
Created January 10, 2023 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tnhung2011/edc2aed82a72560ebcc7f662e947ab1d to your computer and use it in GitHub Desktop.
Save tnhung2011/edc2aed82a72560ebcc7f662e947ab1d to your computer and use it in GitHub Desktop.
@echo off
for /F "skip=2 tokens=3*" %%A in ('reg query "HKCU\Software\ROBLOX Corporation\Environments\roblox-player" /ve') DO (set robloxpath=%%A)
setlocal DisableDelayedExpansion
set splitter=\RobloxPlayerLauncher.exe
setlocal EnableDelayedExpansion
set LF=^
rem ** Two empty lines are required
for %%L in ("!LF!") DO (
for /f "delims=" %%R in ("!splitter!") do (
set "var=!robloxpath:%%R=%%L!"
)
)
echo %var%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment