A 4kB plugin to get Windows version info:
name, type, version, server name, service pack name, and service pack build.
Type is e.g. Home Edition
Edit: I could add other version info stuff later if anyone needs it (i.e. non Windows version stuff).
-Stu
GetVersion plugin
73 posts
So... Stu is learning API, huh? 😉
😁 👍
😁 👍
Great, but better call it "GetOSversion" to avoid confusion with get FileVersion data.
I didn't call it that because I may add other version stuff to it, e.g. IE version or perhaps Microsoft Office etc.
Edit: Just added IEVersion which returns IE version and build.
-Stu
Edit: Just added IEVersion which returns IE version and build.
-Stu
New version with support for x64, Longhorn, Vista.
Also added WindowsPlatformId and WindowsPlatformArchitecture functions.
-Stu
Also added WindowsPlatformId and WindowsPlatformArchitecture functions.
-Stu
Thanks
Thanks for this; it is appreciated.
Thanks for this; it is appreciated.
stu
Great plugin just one slight problem it reports windows media center editon as XP which it is to a degree but would be nice if it could also detect this.
thanks
Great plugin just one slight problem it reports windows media center editon as XP which it is to a degree but would be nice if it could also detect this.
thanks
Right I'll look into it.
-Stu
-Stu
Hi Stu,
Still reports as Windows XP.
Found this, might give a heads up http://salloway.org.uk/mediacenter/2004/version.htm
Looks like they read the ident key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\Ident key
and depending on the value returned determines the version and any patches.
Hope this helps.
Still reports as Windows XP.
Found this, might give a heads up http://salloway.org.uk/mediacenter/2004/version.htm
Looks like they read the ident key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\Ident key
and depending on the value returned determines the version and any patches.
Hope this helps.
I did say WindowsType function not WindowsName 😛
-Stu
-Stu
hello,
i was using a plugin for windows detection but it is outdated. so i turned to GetVersion.
my software is only for NT platform (NT, 2000, XP, 2003, Vista). can i make a check for this with your plugin ?
i want the installer to check the platform (9x or NT) and ... i'll do the rest... 🙂
one more question. what is WindowsPlatformId from your plugin ?
thanks,
OJi.
i was using a plugin for windows detection but it is outdated. so i turned to GetVersion.
my software is only for NT platform (NT, 2000, XP, 2003, Vista). can i make a check for this with your plugin ?
i want the installer to check the platform (9x or NT) and ... i'll do the rest... 🙂
one more question. what is WindowsPlatformId from your plugin ?
thanks,
OJi.
1) GetVersion::WindowsName will return e.g. "Windows 2000"
2) Each Windows has a different Platform ID, like 1 2 3 etc. You should be able to find something about this on Google.
-Stu
2) Each Windows has a different Platform ID, like 1 2 3 etc. You should be able to find something about this on Google.
-Stu
I am going to rebuild the plugin just to return 2000 if /short is specified as a parameter.
Edit: Now returns e.g. 2000 instead of Windows 2000.
-Stu
Edit: Now returns e.g. 2000 instead of Windows 2000.
-Stu
thanks, i will try it.
OJi.
edit - the version from wiki is still from april. please post a reply when you upload the new version.
OJi.
edit - the version from wiki is still from april. please post a reply when you upload the new version.
Uploaded.
By the way, the DLL uses .NET because some of its features are only supported by .NET (i.e. Vista detection).
So, you might want to test the DLL on a system without Microsoft .NET Framework installed.
-Stu
By the way, the DLL uses .NET because some of its features are only supported by .NET (i.e. Vista detection).
So, you might want to test the DLL on a system without Microsoft .NET Framework installed.
-Stu
i will. thanks again.
OJi.
OJi.
Originally posted by Afrow UKI tried the plug-in in Windows 2000 pro without .NET and it works. Only thing is that WindowsServerName doesn't return anything, no errors nothing.
Uploaded.
By the way, the DLL uses .NET because some of its features are only supported by .NET (i.e. Vista detection).
So, you might want to test the DLL on a system without Microsoft .NET Framework installed.
-Stu
What would have expected it to return?
There may be a bug.
-Stu
There may be a bug.
-Stu
Originally posted by Afrow UKNot sure, but it should return Workstation.
What would have expected it to return?
There may be a bug.
-Stu
What is in "HKLM\SYSTEM\CurrentControlSet\Control\ProductOptions\ProductType"?
-Stu
-Stu
It's "WinNT"
FYI:
I just downloaded your latest version and found that IE detection is returning 6.0 when I have 7.0 installed.
I just downloaded your latest version and found that IE detection is returning 6.0 when I have 7.0 installed.
I may remove that function. You can read the IE version from the registry. Infact there's a function in the NSIS documentation under Useful Scripts which reads from the registry. Does that work?
-Stu
-Stu
Yep, that works.
The plugin function reads the version value from shdocvw.dll
I guess they have left it as 6.0 or something.
-Stu
I guess they have left it as 6.0 or something.
-Stu
Yep, right you are. I just checked mine and it is version 6.0.2900.2919.
edit:
Just to let you know, I've OK with just reading the registry. I only mentioned the problem because you had a feature that didn't work as designed. 😉
edit:
Just to let you know, I've OK with just reading the registry. I only mentioned the problem because you had a feature that didn't work as designed. 😉
Thanks 🙂
I will remove the function soon.
-Stu
I will remove the function soon.
-Stu
Is there an easy way to detect if the operating system is windows server 2000? I tried the latest release and on windows 2000 server it gives me "Windows 2000 version 5.0 (Type : Professional, Server Name : )".
GetVersion::WindowsName
Pop $0
GetVersion::WindowsType
Pop $1
GetVersion::WindowsServerName
Pop $2
GetVersion::WindowsVersion
Pop $3
DetailPrint "Windows $0 version $3 (Type : $1, Server Name : $2)"
Hi Stuart,
you posted that you maybe will include more products or version checks.
What do you think about including a version check for .Net, which will work with dotNet 1, 2 and 3.
In wiki is a script which is able to do that and it seems to work like a charme, but maybe it would be cool to have it in this plugin, so no additional scripts are needed.
kind regards
chefkoch
you posted that you maybe will include more products or version checks.
What do you think about including a version check for .Net, which will work with dotNet 1, 2 and 3.
In wiki is a script which is able to do that and it seems to work like a charme, but maybe it would be cool to have it in this plugin, so no additional scripts are needed.
kind regards
chefkoch