This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Destination folders - can be changed?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Oct 22, 2007
10:40 AM
Destination folders - can be changed?
Hi, I have a question about destination computer's folders (from page APPLICATION DATA in INSTALLATION DESIGNER view). Is it possible to change default destinations of these folders? It's important for me because I want make one project IS for Vista and XP.
Example: I put some files into [AppDataFolder]. And now if I install my program on Vista system I want use default predefined path for [AppDataFolder] (set at run time by the installer). But if I will install on XP I don't want using defaulf predefined path but chage it for example to "C:\New localization\new directory".
Some pseudocode:
[CODE]
...
if (system==XP)
{
[AppDataFolder]="C:\New localization\new directory"
}
else // (on VISTA)
{
// do nothing --> [AppDataFolder]=default predefined VISTA directory
}
// install files to right folder depend on OS
...
[/CODE]
Theoretically can I do something like above?
Example: I put some files into [AppDataFolder]. And now if I install my program on Vista system I want use default predefined path for [AppDataFolder] (set at run time by the installer). But if I will install on XP I don't want using defaulf predefined path but chage it for example to "C:\New localization\new directory".
Some pseudocode:
[CODE]
...
if (system==XP)
{
[AppDataFolder]="C:\New localization\new directory"
}
else // (on VISTA)
{
// do nothing --> [AppDataFolder]=default predefined VISTA directory
}
// install files to right folder depend on OS
...
[/CODE]
Theoretically can I do something like above?
(3) Replies
‎Oct 22, 2007
11:28 AM
Should be fine... I know I set the TARGETDIR manually at runtime using a simple:
My project might be different, though, as it is an InstallScript project instead of msi...
-putman;
TARGETDIR = "C:\bleh\";
My project might be different, though, as it is an InstallScript project instead of msi...
-putman;
‎Oct 23, 2007
09:04 AM
TARGETDIR - yes, but for example AppDataFolder - no. When I try manually change AppDataFolder I received error C8012 (semicolor expected). I've found in help this sentence: "This system variable is read-only; if you attempt to assign a value to it, a compiler error will result." So now I think I cannot modify default predefined folders.
‎Oct 23, 2007
02:39 PM
Hi,
You can try creating a directory variable, say MyAppDataFolder. By default, MyAppDataFolder = [AppDataFolder]. Then, you create a SetDirectory custom action to overwrite MyAppDataFolder and set it to your Xp folder. Define that custom action to be executed only if the OS is Xp. Execute that custom action after cost finalize in both UI and Exec sequence.
I'm pretty sure that will work since I did something similar in my project. Good luck.
You can try creating a directory variable, say MyAppDataFolder. By default, MyAppDataFolder = [AppDataFolder]. Then, you create a SetDirectory custom action to overwrite MyAppDataFolder and set it to your Xp folder. Define that custom action to be executed only if the OS is Xp. Execute that custom action after cost finalize in both UI and Exec sequence.
I'm pretty sure that will work since I did something similar in my project. Good luck.