Jump to content

Recommended Posts

Posted

I have a nice bridge simulation "game" which the kids love and is mildly educational. It doesn't need installing, just runs, but saves game data to it's own location. If I make that folder writable by pupils, all other pupils get the solutions to the different levels.

 

If I make the folder not writable by pupils, they always have to start building their bridges from scratch each time one fails and they have to start at level 1 each session.

 

Is there a way to redirect the saving of these files to the pupils network folder?

Thanks.

Posted

I have you checked the app folder for INI files that may have the folder setting.

 

If the path is hard coded into the EXE then you're stuffed.

 

As it's a no install program what you could do is a script to download the program to the users local profile and then run it from there. There could also be a line in the logoff script to upload the game data to their home folders once at the end of a session.

Posted

..or, as NetworkGeezer suggests, you could take the script approach. I would do it like this though (probably in AutoIt)

 

Install the app to a shared read-only location on the server

 

Create a script which does the following

 

1 - Make a temporary folder on the PC

2 - Check for existing game data on the user's home folder and if present, copy it to the temporary folder on the PC

3 - Copy the app to the temporary folder

4 - Launch the app and wait for it to complete

5 - Delete the app from the temporary folder

6 - Copy the game data back to the user's home folder

7 - Delete the temporary folder

 

Put the script in the same folder on the server as the app

Posted

Something like this (in AutoIt)

 

; Name of application executable
$AppName = "BridgeApp.exe"

; Name of temp folder to be created under %TEMP%
$AppTempDirName = "BridgeTemp"

; Path to save app data to/from
$AppDataPath = "H:\BridgeData"

; Construct path to temp folder
$AppTempFolder = @TempDir & "\" & $AppTempDirName

; Check for and delete and existing temp folder
If FileExists($AppTempFolder) then DirRemove($AppTempFolder, 1)

; Copy the app into the temp folder
FileCopy(@ScriptDir & "\" & $AppName, $AppTempFolder, 1 + 8)

; Check for and copy down any application data
If FileExists($AppDataPath) then FileCopy($AppDataPath & "\*.*", $AppTempFolder, 1)

; Run the app and wait for it to exit
RunWait($AppTempFolder & "\" & $AppName, $AppTempFolder)

; Delete the app
FileDelete($AppTempFolder & "\" & $AppName)

; Copy app data back to the data path
FileCopy($AppTempFolder & "\*.*", $AppDataPath, 1 + 8)

Posted

Thanks for your help, there is no .ini file (except for uninstall, although install just copies the files a chosen folder).

 

I'll have a play with scripting.

Posted

How big is the app? If its not that big ajbritton's suggestion would work nicely but if it is, i would probably go 1 of 2 possible solutions:

 

1 - Same as ajbritton but dont bother with creating a temp folder on local drive:

a - Stick app in shared area.

b - Check for existing game data on the user's home folder and if present, copy it to the app folder.

c - Launch the app and wait for it to complete

d - Copy the game data back to the user's home folder

e - Delete the game data in app folder

 

2 - Pretty much the same as above except the app resides on local drive and not in shared area:

a - Stick app in local drive.

b - Check for existing game data on the user's home folder and if present, copy it to the app folder.

c - Launch the app and wait for it to complete

d - Copy the game data back to the user's home folder

e - Delete the game data in app folder

 

You can use AutoIt or even simple vbscripts or bat files can achieve this, assuming they can run scripts that is.

Posted
Or you could take a hex editor to the executable

 

Congratulations, the EULA in the software just caused your licenses to explode.

Posted

@Geoff: Took you a whole 26mins to spot that one!

 

EduGeek does not condone hacking hex (unless your EULA specifically allows you to - which is doubtful!)

Posted

@apeo

 

Option 1 assumes that there will only be one user. If there are more than one when there would be succesive overwriting of game data as each user launches the app.

 

Option 2 Is good in that it prevents downloads and has the benefits of local drive perfomance. Unless it's a terminal server you wouldn't have the game data contention problem. The main issue would be having to give students write access to the app folder. It all depends on whether the game is used only out of lessons or whether you use something like DeepFreeze or MS SCT.

Posted
@apeo

 

Option 1 assumes that there will only be one user. If there are more than one when there would be succesive overwriting of game data as each user launches the app.

 

Option 2 Is good in that it prevents downloads and has the benefits of local drive perfomance. Unless it's a terminal server you wouldn't have the game data contention problem. The main issue would be having to give students write access to the app folder. It all depends on whether the game is used only out of lessons or whether you use something like DeepFreeze or MS SCT.

 

Good point with regards to my option 1 and again good point on option 2 but Wizzer has already stated that he has tried giving access to app folder. If the game data is stored in a folder on its own (such as a save game folder) i would probably give partial access to that folder.

Posted

Annoyingly the saved game data is stored in the same folder as the executable, not in it's own folder.

 

I think checking the user's home folder for existance of saved games and copying them to the local HDD then copying them back and deleting the local copy at the end is the best approach.

 

The game is a free one, but not open source so I doubt HEX hacking would be permitted. I'd prefer not to get into that anyway.

 

Anyone else want it, get it here:

http://www.bridgebuilder-game.com/

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...