Using VersionNT64 and VersionNT - Advanced Installer Community

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!

jjones
Posts: 68
Joined: Wed Jun 29, 2011 3:30 pm

Using VersionNT64 and VersionNT

I'm using radio buttons to have the user select which type of installation to perform and then having a VB script select the proper components. Because our application relies on SQL Express 2008 R2 we provide both the 32 and 64-bit versions with the install. In the VB script, I am using the system environment variables VersionNT and VersionNT64 in some "If" statements to select the correct version to install. I noticed that if the OS is 64-bit, BOTH VersionNT and VersionNT64 are populated with the proper value (601 for Windows 7). However, if you run the installation on a 32-bit OS, only VersionNT contains the OS property value.

Because a 64-bit OS populates both VersionNT and VersionNT64 I have to do the check to see if VersionNT64 is valid first or else it would always run the 32-bit version even if the OS was 64-bit. In the VB script, what logic should I use to determine if VersionNT64 is empty / invalid? I've tried:

Code: Select all

If (Session.Property("VersionNT64") = "")
and that will cause the install to stop running with an error. Any Assistance is appreciated!

Thanks
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Using VersionNT64 and VersionNT

Hello,

In order to achieve what you want you can take a look on our "Install resources based on the OS version" article.
In the VB script, what logic should I use to determine if VersionNT64 is empty / invalid? I've tried:

Code: Select all

If (Session.Property("VersionNT64") = "")
and that will cause the install to stop running with an error.
Please keep in mind that, when accessing the "Session" object from a VBS file added as a custom action to your project, then the VBS custom action should be added in the "Custom Action" page as a "Launch attached file" custom action.

Let us know if this helps, otherwise please give us more details about your scenario.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”