Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 6

Is there a way to detect if a setup is being run on Windows 10


We do not plan to officially support Windows 10 until our new product releases in the new year so we would like to stop installations running on Windows 10 until then. We have used the SYSINFO member variables to detect windows versions before but with Windows 10 Micrsoft have left both the Major Version number at 6 and the Minor version number at 2. Also perhaps unsurprisingly ISOSL_WIN10 is not supported.

Has anyone found a way to do this?

Would upgrading to Installshield 2015 enable us to do what we want to do?
Labels (1)
0 Kudos
(2) Replies
Level 12 Flexeran
Level 12 Flexeran

Yes, but this is not the approach that Microsoft recommends. Instead they seem to suggest that an application notify that it wasn't tested against a given version of Windows, but allow the installation to proceed.

These days the reported version is largely controlled by the compatibility elements in the application manifest. InstallShield 2015 includes compatibility elements for Windows 10, so upgrading will address this for InstallScript projects. Note that Windows 10 shims Windows Installer custom actions, so InstallScript custom actions in an MSI project cannot detect Windows 10.
0 Kudos
Level 6

Obviously we need to upgrade to the latest installshield but in the mean time I have fixed this with a little batch file which uses the MSDOS SYSINFO command:

if not exist %SystemRoot%\system32\systeminfo.exe goto warnthenexit

systeminfo | find "OS Name" > %TEMP%\osname.txt
FOR /F "usebackq delims=: tokens=2" %%i IN (%TEMP%\osname.txt) DO set vers=%%i

echo %vers% | find "Windows 10" > nul
if %ERRORLEVEL% == 0 goto ver_10

goto warnthenexit

:Run Windows 10 specific commands here.
ECHO "Win10" > C:\temp\ccwwin10.txt
ECHO %vers% >> C:\temp\ccwwin10.txt
goto exit



I can then check for the text file it creates.
0 Kudos