@echo offclsset "machindir=C:\Program Files (x86)\Games\Machinarium"set "gamesdir=%USERPROFILE%\Saved Games"set "sharedobj=%AppData%\Macromedia\Flash Player\#SharedObjects"goto noadmincd /D "%SYSTEMROOT%"echo admintest > admintestif exist admintest goto adminecho Administrator Privileges not granted.echo Batch needs to be run as Administrator in order to backup Saves.echo.CHOICE /M "Continue anyway"if errorlevel 2 goto endif errorlevel 1 goto noadmin:admindel admintest:noadmincd /D "%machindir%"if not exist machinarium.exe goto nomachincd /D %gamesdir%mkdir Machinariumset "gamesdir=%gamesdir%\Machinarium"cd /D %gamesdir%xcopy * "%sharedobj%" /E /Y /Dcd /D %machindir%machinarium.execd /D "%sharedobj%"FOR /F "tokens=*" %%a in ('dir /B') do @SET randomword=%%aset "savepath=%sharedobj%\%randomword%\localhost\%machindir:~3%\machinarium.exe\Machinarium.sol"if exist "%savepath%" goto nextgoto end:nextmkdir "%gamesdir%\%randomword%"set "gamesdir=%gamesdir%\%randomword%"xcopy "%randomword%" "%gamesdir%" /E /Ygoto end:nomachinecho.echo 'machinarium.exe' has not been found!pause:end