GetVersion:WindowsName
Hi all,
I'm having a little trouble with my script. I am using the GetVersion plug-in from Stu. What I would like to do is detect the OS and have the script preform a specific function for W95, 98 & ME and a different function for WNT, 2K, XP, and Server2K3. Below is what I have been using in my section..but it is not working correctly.
Section "Installer Section"
|MB_ICONSTOP "Your OS is neither a DOS or NT Based system!"
>GetVersion::WindowsName
Pop $R0
>;Looking for a DOS based OS
IntCmp $R0"95" DOSKERNEL
IntCmp $R0"95 OSR2" DOSKERNEL
IntCmp $R0"98" DOSKERNEL
IntCmp $R0"98 SE" DOSKERNEL
IntCmp $R0"ME" DOSKERNEL
>;Looking for an NT based OS
IntCmp $R0"NT" NTKERNEL
IntCmp $R0"2000" NTKERNEL
IntCmp $R0"XP" NTKERNEL
IntCmp $R0"XP x64" NTKERNEL
IntCmp $R0"Server 2003" NTKERNEL
IntCmp $R0"Server 2003 R2" NTKERNEL
MessageBox MB_OK
>ABORT
DOSKERNEL:
>MessageBox MB_OK|MB_ICONSTOP "You have a DOS based OS"
>ABORT
NTKERNEL:
>MessageBox MB_OK|MB_ICONSTOP "You have a NT based OS."
>ABORT
SectionEnd
>