Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: LeChuck on Fri 06/01/2006 19:24:31

Title: Savegames on desktop?
Post by: LeChuck on Fri 06/01/2006 19:24:31
When I start my game from a shortcut on the desktop, AGS creates the savegames on the desktop also. Why does this happen, and how do I stop it? AGS saves normally when I start the game from the start menu folder.
Title: Re: Savegames on desktop?
Post by: strazer on Fri 06/01/2006 19:47:29
Try right-clicking the game link on the desktop, click Properties and make sure the working directory field is set to the game's folder.
Title: Re: Savegames on desktop?
Post by: LeChuck on Sat 07/01/2006 00:00:42
Quote from: strazer on Fri 06/01/2006 19:47:29
Try right-clicking the game link on the desktop, click Properties and make sure the working directory field is set to the game's folder.

Now, I created the installer with Inno setup. I don't know if you have any experience with this installer, but it gives the option to let the user install a desktop shortcut.

By working directory field, do you mean the "Target" or "Start in" fields? Any way of setting these options inside the install script before compiling it?
Title: Re: Savegames on desktop?
Post by: strazer on Sat 07/01/2006 01:55:53
I mean the "Start in" field but I don't know anything about Inno Setup, sorry.
Title: Re: Savegames on desktop?
Post by: monkey0506 on Sat 07/01/2006 02:42:04
From Inno Setup's website:

QuoteSetting the "Start In" Field on a Shortcut

    Use a WorkingDir parameter on the [Icons] section entry.

Okay...to simplify that some, in case you don't know how to do it, I've played around with Inno Setup to figure it out.  Once your script is completed (if you're just using the Wizard, then just after you're done with that) look for the line that reads "[Icons]".  Now, beneath that look for the line that reads "Name: "{userdesktop}\NameOfFile"; Filename: "{app}\Filename.exe"; Tasks: desktopicon"

Where NameOfFile is the name of the file as shown on the Desktop, and Filename.exe is the file being run.  Then...simply add the following to the end of it (exactly as shown):

; WorkingDir: "{app}"

Then...recompile and when the shortcut is created, it will automagically start in the correct folder. :=
Title: Re: Savegames on desktop?
Post by: LeChuck on Sat 07/01/2006 18:13:51
Thanks to both of you, it works perfectly now!  :-*