2

I am creating installer using InstallShield 2012 and I am checking OS using SYSINFO major and minor values.SYSINFO.nWinMajor is giving correct value but SYSINFO.nWinMinor is giving 0 for windows 7.It should be 1.

Do anyone know the solution for above ?

user967400
  • 53
  • 5
  • Is this in a pure InstallScript project, or in an InstallScript custom action inside an MSI project? (If the latter, try referencing the MSI property `VersionNT`.) – Michael Urman Dec 12 '12 at 13:11
  • Thanks for your reply.I know about VersionNT.But I am using nWinMajor and in combination I want to use nWinMinor. so want to know the problem. – user967400 Dec 12 '12 at 13:44

1 Answers1

1

Custom actions within an MSI are shimmed with VistaRTMVersionLie on Windows 7 so that the APIs which InstallShield uses to populate SYSINFO are claiming to run on Windows Vista. This cannot be disabled by the installation itself, so your best bet is to reference the VersionNT or VersionNT64 properties (possibly indirectly in the case of a deferred action), as they have the correct version information.

See Chris Jackson's Why Custom Actions get a Windows Vista Version Lie on Windows 7 for additional details, such as information on why shim is applied.

Michael Urman
  • 15,737
  • 2
  • 28
  • 44