Welcome, Guest. Please login or register.
December 14, 2024, 01:28:53 am

Pages: [1]
  Print  
Author Topic: Windows IE9 users losing saved games?  (Read 43174 times)
Alex
Global Moderator
mayor robot
*****
Posts: 665



WWW
« on: December 12, 2011, 08:21:35 am »

Forum member RD has created a BAT file to protect you from IE9 deleting your saved games.  

NOTE: The code has NOT been checked out so use it at your own discretion.  (the Mods here take no responsibility if it causes your Win System to start trolling Mac sites ;-)

In addition, the solution presumes that one understands what a "BAT file" is, so do your homework before you create and use this one.  Good luck and please post your success/failure reports to this thread.

Thank you Rodger for your contribution!



Quote:

I trolled the forums recently regarding an issue with saved games disappearing.  Unfortunately, none of the solutions or scripts solved the problem I had.

THE PROBLEM IS CAUSED BY IE9.  When IE9 closes all temp files are removed.  Flash files included.

The problem with the user community scripts that were provided is that they assumed the random directory still exists.  In this case, it doesn't.

The problem with the dev provided Saves.exe is that it requires my handholding it.  That is not what I want from a game.

So, I took one of the user scripts and modified it to be a wrap-around, invisible solution.

It copies the save games to the User "Save Games" directory under Windows 7 (possibly Vista as well).  And it copies them back to the main Flash Shared Objects directory when the game starts up.  It will not overwrite a new file with and older one.
 
All you need to do is copy the script below into notepad, and save it as a .BAT file in the Machinarium folder.  Change line 3 -- "Set machindir=" to your install folder.  Then change your start menu shortcut to point to the .BAT file instead, and you are good to go.
 
I have not found it necessary to run as administrator.  HOWEVER, if you need to do so on your computer, simply remove line 6 "goto noadmin" and the script will check and remind you each time.
 
GOOD LUCK!  and Happy Gaming!

Code:
@echo off
cls
set "machindir=C:\Program Files (x86)\Games\Machinarium"
set "gamesdir=%USERPROFILE%\Saved Games"
set "sharedobj=%AppData%\Macromedia\Flash Player\#SharedObjects"
goto noadmin
cd /D "%SYSTEMROOT%"
echo admintest > admintest
if exist admintest goto admin
echo 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 end
if errorlevel 1 goto noadmin
:admin
del admintest
:noadmin
cd /D "%machindir%"
if not exist machinarium.exe goto nomachin
cd /D %gamesdir%
mkdir Machinarium
set "gamesdir=%gamesdir%\Machinarium"
cd /D %gamesdir%
xcopy * "%sharedobj%" /E /Y /D

cd /D %machindir%
machinarium.exe
cd /D "%sharedobj%"
FOR /F "tokens=*" %%a in ('dir /B') do @SET randomword=%%a
set "savepath=%sharedobj%\%randomword%\localhost\%machindir:~3%\machinarium.exe\Machinarium.sol"
if exist "%savepath%" goto next
goto end
:next
mkdir "%gamesdir%\%randomword%"
set "gamesdir=%gamesdir%\%randomword%"
xcopy "%randomword%" "%gamesdir%" /E /Y
goto end
:nomachin
echo.
echo 'machinarium.exe' has not been found!
pause
:end
« Last Edit: April 21, 2015, 06:36:15 pm by Alex » Logged
Pages: [1]
  Print  
 
Jump to: