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
- :
- How to change INSTALLDIR depending upon operating system
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Nov 21, 2008
03:30 AM
How to change INSTALLDIR depending upon operating system
Hi All,
I am creating installer which install our application in Program File folder. For that I set [INSTALLDIR] to ProgramFileFolder. It will waork fine for all OS. But now requirement is that if operating system is Windows Vista, application should get installed in AppDataFolder. For that purpose I have to change value of [INSTALLDIR] depending upon underlying OS. It should be AppDataFolder for Windows Vista and ProgramFilesFolder for all other OS.
Can anyone know how to sort out this issue?
I am creating installer which install our application in Program File folder. For that I set [INSTALLDIR] to ProgramFileFolder. It will waork fine for all OS. But now requirement is that if operating system is Windows Vista, application should get installed in AppDataFolder. For that purpose I have to change value of [INSTALLDIR] depending upon underlying OS. It should be AppDataFolder for Windows Vista and ProgramFilesFolder for all other OS.
Can anyone know how to sort out this issue?
1 Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Nov 21, 2008
05:09 AM
I'd use a type 51 (Set Property) custom action sequenced early enough in the sequence to assign [AppDataFolder] value as the value for [INSTALLDIR]. Just run this custom action in the case VersionNT is 600 (and to futureproof, set it to 600 or greater). This way also Windows Server 2008 will run the custom action, and this makes sense as Vista and Server 2008 are rather similar. However, if you want to run on Vista only, use also MsiNTProductType as a condition: http://msdn.microsoft.com/en-us/library/aa370329.aspx
