Sonic Posted November 20, 2005 Posted November 20, 2005 Yes it's possible ...Batch to detect Windows license, OEM or VL for /f "skip=4 tokens=3" %%? in ('reg query HKLM\SYSTEM\Setup\Pid /v Pid') do set Pid=%%? set Pid=%Pid:~-3% if '%Pid%'=='270' echo WinXP VL version detected && WhatCommandYouWant if '%Pid%'=='OEM' echo WinXP OEM version detected && WhatOtherCommandYouWant exitCredits to Yzöwl for his batch's knowledge !Title edited as per request. --Zxian
eyeball Posted November 20, 2005 Posted November 20, 2005 (edited) at command prompt type "ver"(without quotes)thanksEDIT:hmm that doesnt display home pro or corp, thats stupid! lol Edited November 20, 2005 by eyeball
Sonic Posted November 20, 2005 Author Posted November 20, 2005 okay Dr.God, but it's limited for just Home & Pro, for Corporate edition, I don't have any idea ...
Bezalel Posted November 20, 2005 Posted November 20, 2005 You should be able to get this information from the Win32_OperatingSystem class. http://msdn.microsoft.com/library/default....environment.asp Determining what type of media was used to install will require parsing Win32_OperatingSystem.SerialNumber. This document may help but its written for server versions http://support.microsoft.com/?kbid=889713
Sonic Posted November 20, 2005 Author Posted November 20, 2005 (edited) hmm programming a exe just for that is too complicated for me (I must reinstall my old visual studio 2003 provided by my school ^^ ... and take several time ...)I think there is a file/registry key/whatever differs from each channel (in fact is term from Microsoft to design 'version' Home,Pro, Corp) of Windows XP. Edited November 20, 2005 by sonic
gunsmokingman Posted November 20, 2005 Posted November 20, 2005 Try this VBS script strComputer = "."Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")Set colOperatingSystems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")For Each objOperatingSystem in colOperatingSystems Msgbox objOperatingSystem.Caption & " " & objOperatingSystem.Version, 0 + 32,"Window Version"Next
Sonic Posted November 20, 2005 Author Posted November 20, 2005 (edited) okay gunsmokingman, but it's just for Pro or Home version ...I think there is no differences between corp/vlk and pro in windows, but I think there is registry key or files for activation differs with retail version ...Reading http://www.msfn.org/board/index.php?showtopic=61066, I will check the key [HKEY_LOCAL_MACHINE\SYSTEM\Setup\Pid] ...Thanks all.Goodbye.EDIT:My main command form my batch to check my windows xp version :for /f "skip=4 tokens=3" %%i in ('reg query HKLM\SYSTEM\Setup\Pid /v Pid') do set Pid=%%i Edited November 20, 2005 by sonic
pawan Posted November 20, 2005 Posted November 20, 2005 Open Run Box and type "winver" without quote.It is so simple. Pawan
Sonic Posted November 20, 2005 Author Posted November 20, 2005 Where you see if windows xp is pro or corporate ?? To detect Home or Pro version no problem ...
Yahoo Posted November 21, 2005 Posted November 21, 2005 U can also checket from the property of my computer
Sonic Posted November 21, 2005 Author Posted November 21, 2005 @Yahoo : not for corporate version ... there isn't differences between oem and corporate/vlk in windows itself ... we must check pid (or other regkey/files) or develop an exe in .net/c using microsoft api ...
Sonic Posted January 9, 2006 Author Posted January 9, 2006 (edited) Improved batch to detect Corporate version of Windowsfor /f "skip=4 tokens=3" %%? in ('reg query HKLM\SYSTEM\Setup\Pid /v Pid') do set Pid=%%?set Pid=%Pid:~-3%if '%Pid%'=='270' echo Corporate version detected && WhatCommandYouWantif not '%Pid%'=='OEM' echo OEM version detected && WhatOtherCommandYouWantexitCredits to Yzöwl for his batch's knowledge ! Edited January 9, 2006 by sonic
LLXX Posted January 10, 2006 Posted January 10, 2006 Look at your product ID in the System Property sheet.First set:55274 : XP Professional55276 : XP Professional upgrade55276 : XP Home55277 : XP Home55285 : XP Professional76487 : XP Media Center Edition 200576487 : XP Pro Royalty OEM76487 : XP Pro volume license (with '640' channel ID)Second set:007 : retail011 : upgradeOEM : OEM270 : Volume License335 : Retail640 : Volume License648 : Academic
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now