+ Post New Thread
Results 1 to 15 of 15
How do you do....it? Thread, Redirecting applications save folder in Technical; I have a nice bridge simulation "game" which the kids love and is mildly educational. It doesn't need installing, just ...
  1. #1

    Join Date
    Nov 2005
    Posts
    95
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Redirecting applications save folder

    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.

  2. #2

    Join Date
    Feb 2006
    Posts
    1,187
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Re: Redirecting applications save folder

    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.

  3. #3
    ajbritton's Avatar
    Join Date
    Jul 2005
    Location
    Wandsworth
    Posts
    1,632
    Thank Post
    23
    Thanked 75 Times in 45 Posts
    Rep Power
    34

    Re: Redirecting applications save folder

    Have you tried creating a shortcut to the app and setting the 'Start In' parameter?

  4. #4
    ajbritton's Avatar
    Join Date
    Jul 2005
    Location
    Wandsworth
    Posts
    1,632
    Thank Post
    23
    Thanked 75 Times in 45 Posts
    Rep Power
    34

    Re: Redirecting applications save folder

    ..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

  5. #5
    ajbritton's Avatar
    Join Date
    Jul 2005
    Location
    Wandsworth
    Posts
    1,632
    Thank Post
    23
    Thanked 75 Times in 45 Posts
    Rep Power
    34

    Re: Redirecting applications save folder

    Something like this (in AutoIt)

    Code:
    ; 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)

  6. #6

    Join Date
    Nov 2005
    Posts
    95
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Redirecting applications save folder

    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.

  7. #7

    SpuffMonkey's Avatar
    Join Date
    Jul 2005
    Posts
    2,235
    Thank Post
    55
    Thanked 278 Times in 186 Posts
    Rep Power
    134

    Re: Redirecting applications save folder

    Or you could take a hex editor to the executable and see if the location is hard coded - long as you keep the length of the name the same - it might be possible to change it!

  8. #8
    apeo's Avatar
    Join Date
    Sep 2005
    Location
    Lost
    Posts
    1,612
    Thank Post
    95
    Thanked 115 Times in 111 Posts
    Rep Power
    42

    Re: Redirecting applications save folder

    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.

  9. #9

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Redirecting applications save folder

    Quote Originally Posted by SpuffMonkey
    Or you could take a hex editor to the executable
    Congratulations, the EULA in the software just caused your licenses to explode.

  10. #10

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    London
    Posts
    7,593
    Thank Post
    109
    Thanked 764 Times in 595 Posts
    Rep Power
    181

    Re: Redirecting applications save folder

    @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!)

  11. #11

    Join Date
    Feb 2006
    Posts
    1,187
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Re: Redirecting applications save folder

    @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.

  12. #12
    apeo's Avatar
    Join Date
    Sep 2005
    Location
    Lost
    Posts
    1,612
    Thank Post
    95
    Thanked 115 Times in 111 Posts
    Rep Power
    42

    Re: Redirecting applications save folder

    Quote Originally Posted by NetworkGeezer
    @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.

  13. #13

    Join Date
    Nov 2005
    Posts
    95
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Redirecting applications save folder

    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/

  14. #14
    mark's Avatar
    Join Date
    Jun 2005
    Posts
    3,966
    Thank Post
    248
    Thanked 49 Times in 45 Posts
    Blog Entries
    2
    Rep Power
    46

    Re: Redirecting applications save folder

    Oh - I thought you were on about Bridge Designer http://bridgecontest.usma.edu/

  15. #15

    Join Date
    Nov 2005
    Posts
    95
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Redirecting applications save folder

    Got it working now with a batch file, thanks for the help.

SHARE:
+ Post New Thread

Similar Threads

  1. Problems with Serif applications after RIS image creeation.
    By Kyle in forum Educational Software
    Replies: 0
    Last Post: 15th November 2007, 02:01 PM
  2. Stop applications running at certain times
    By timbo343 in forum Windows
    Replies: 5
    Last Post: 27th April 2007, 01:08 PM
  3. Systems and Applications Manager -University of Hertfordshir
    By tosca925 in forum Educational IT Jobs
    Replies: 0
    Last Post: 21st September 2005, 04:46 PM
  4. Replies: 0
    Last Post: 26th August 2005, 01:29 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •