cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sven_deckardt
Level 3

What I can do, that the Setup started only under Windows 10 or higher?

What I can do, that the Setup started only under Windows 10 or higher?

Gives there any solution in Installshield?

Labels (1)
0 Kudos
(3) Replies
varul
Revenera Moderator Revenera Moderator
Revenera Moderator

If you are using BMSI or isntallscript MSI, then You can use the install condition to restrict your installer to run only on win10 or above, 

 

If you are using installscript project then you need to write your own code, to check the OS version and based on condition you can install your installer

Please refer attached screenshot, 

0 Kudos

Thanks for your answer, but there is also Windows 8.1 included and this is my problem. 

0 Kudos
varul
Revenera Moderator Revenera Moderator
Revenera Moderator

Its by windows design, if you want to install only in windows 10, then try writing your own code using SYSINFO

 

You can try the win 10 and see it works or not

For win 10:
((SYSINFO.nOSMajor == 6 && SYSINFO.nOSMinor == 3) || szVersionNT == "603")

Refer help for win10:

https://shieldmaster.wordpress.com/2013/09/05/how-to-determine-windows-server-2012-os-in-installscript-function/

https://docs.revenera.com/installshield26helplib/LangRef/LangrefSYSINFO.htm check for SYSINFO.nISOSL and SYSINFO.WINNT.bWin10

 

The below code is for Windows11, you need to modify for windows 10 and then add it has a cusomaction,

 

 


export prototype CheckOS(HWND);
function CheckOS(hMSI)
STRING svOSVersion, szVersionNT, szVersionNT64, szWindowsBuild, szServicePackLevel, svTemp, svMessage, svBuildnum, svMessage1;
NUMBER nvType, nzSize;
begin
nzSize = 256;
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
//RegDBGetKeyValueEx("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", "ProductName", nvType, svOSVersion, nzSize);
RegDBGetKeyValueEx("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", "CurrentBuild", nvType, svBuildnum, nzSize);

MsiGetProperty (hMSI, "VersionNT", szVersionNT, nzSize);
MsiGetProperty (hMSI, "VersionNT64", szVersionNT64, nzSize);
MsiGetProperty (hMSI, "WindowsBuild", szWindowsBuild, nzSize);
MsiGetProperty (hMSI, "ServicePackLevel", szServicePackLevel, nzSize);
//MsiGetProperty (hMSI, "CurrentBuild", svBuildnum, nzSize);

if (SYSINFO.nOSProductType = VER_NT_WORKSTATION) then svTemp = "'WORKSTATION'";
elseif (SYSINFO.nOSProductType = VER_NT_SERVER) then svTemp = "'SERVER'";
else svTemp = "'DOMAIN_CONTROLLER'";
endif;
//svMessage = "OS is: '" + svOSVersion + "'\nVersionNT is: " + szVersionNT+", VersionNT64 is: "+ szVersionNT64 +",\nWindowsBuild is: " + szWindowsBuild +", ServicePackLevel is: '"+ szServicePackLevel+"',\nProductType: "+svTemp;
svMessage = "OS is: '" + svBuildnum + "'\nVersionNT is: " + szVersionNT+", VersionNT64 is: "+ szVersionNT64 +",\nWindowsBuild is: " + szWindowsBuild +", ServicePackLevel is: '"+ szServicePackLevel+"',\nProductType: "+svTemp;

if (svBuildnum < "22000") then

MessageBox ("Not supported OS",INFORMATION);

abort;
endif;

MessageBox(svMessage,INFORMATION);

 

end;

 

0 Kudos