We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

rgooden
Posts: 3
Joined: Sat Mar 03, 2007 12:20 am

Optionally install prerequisites & Determine OS

Hi,

We are evaluating Advanced Installer. Our requirements are we believe fairly simple.

1. install windows installer 3.1
2. install .NET Framework 2.0
3. install SQL Express
4. install our application
5. run EXE which will attach DataBase and modify our config file

It looks like this can be done, however I have a couple of questions:
1. Is it possible to detect whether we are runing on Vista or not and change the default installation directory as needed. (XP would be c:\program files, while Vista would be c:\users\public)
2. Can we have an optional install. The main server will run steps 1-5 as defined above, but client installs don't need SQL Express so steps 1,2,4 would be needed.

Trying to avoid multiple installs.

Thanks for the assistance.

Roger
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi Roger,

Thank you for your interest in Advanced Installer.

VersionNT property gives you the OS version. For XP the value is 501 and for Vista the value is 600:
http://msdn2.microsoft.com/en-us/library/aa370556.aspx

So you need to create two "Property Set with Formatted" custom actions under "InstallUISequence->CostFinalize" (that set the value of the "Application Folder" depending on the OS version) like this:

1. Property Name: APPDIR
2. Formatted Text: [ProgramFilesFolder][ProductName]
3. Condition: VersionNT = 501 (for XP)

1. Property Name: APPDIR
2. Formatted Text: [CommonAppDataFolder]
3. Condition: VersionNT = 600 (for Vista)
Can we have an optional install. The main server will run steps 1-5 as defined above, but client installs don't need SQL Express so steps 1,2,4 would be needed.
I'm afraid that this cannot be done since the prerequisites are executed first. You need to create separate packages for client and server with appropriate prerequisites. Or if you don't want separate packages you can specify in the prerequisite description field that the prerequisite is only for server (this is only to inform the user).

We have on our TODO list a feature to give the possibility for multiple builds. And then you can specify different prerequisites for each build by managing a single AIP file. I cannot give you an ETA for this feature.

Hope this helps,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”