Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Version for W2K & WinME ??


1 reply to this topic

calenkl

calenkl
  • Members
  • 42 posts

Posted 10 December 2001 - 04:54

hello, i need to know the OS version info for W2K & Win Me ler, but there are only version info for Win95, Win98 & WinNT 4.0 in the ISWI Help, so any ideas ?
i think that the W2K version might be 5.0 for NT...
but not sure for Win ME

This is the Example code from ISWI:
function VersionExample(hMSI)
   BOOL   bIsShellExplorer, bIsWindowsNT4, bIsWindowsNT351;
   BOOL   bIsWindows95, bIsWindows98;
   NUMBER nvResult; STRING svResult;
begin
   // Initialize variables.
   bIsShellExplorer = FALSE;
   bIsWindowsNT4 = FALSE;
   bIsWindowsNT351 = FALSE;
   bIsWindows95 = FALSE;
   bIsWindows98 = FALSE;

   // Determine the target system's operating system.
   GetSystemInfo( OS, nvResult, svResult );

   if (nvResult = IS_WINDOWSNT) then

       // Check for Windows NT 4.0 or Windows NT 3.51.
       if (GetSystemInfo( WINMAJOR, nvResult, svResult ) = 0) then

           if (nvResult >= 4) then
               bIsShellExplorer = TRUE;
               bIsWindowsNT4 = TRUE;
           else
               bIsWindowsNT351 = TRUE;
           endif;

       endif;

   elseif (nvResult = IS_WINDOWS9X) then

       bIsShellExplorer = TRUE;

       // Check for Windows 95 or Windows 98.
       GetSystemInfo (WINMINOR, nvResult, svResult);

       if (nvResult < 10) then
           bIsWindows95 = TRUE;
       else
           bIsWindows98 = TRUE;
       endif;

   endif;
end;


jsp

jsp
  • Members
  • 96 posts

Posted 11 December 2001 - 09:06

Hi,
For W2K, nvResult returned by GetSystemInfo( WINMAJOR, nvResult, svResult ) is 5 (4 for NT4 and 3 for NT3.51).
For WMe, nvResult returned by GetSystemInfo( WINMINOR, nvResult, svResult ) is 90 (10 for W98 and 00 for W95).
If you are using MSI technology, you can also use MsiGetProperty(hInstall,"Version9X",szValue,nvSize) and MsiGetProperty(hInstall,"VersionNT",szValue,nvSize) that will give you Major and Minor version of OS that means 400, 410, 490 for W95, W98, WMe and 400, 500 for NT4, W2K.
You can also be informed of the WindowsBuild and the ServicePackLevel using MsiGetProperty(hInstall,"WindowsBuild",szValue,nvSize) and MsiGetProperty(hInstall,"ServicePackLevel ",szValue,nvSize).
For more details, read the documentation for "Operating System Property Values" in Microsoft Windows Installer help.
Hope this helps,
Regards,
JSP