Sonic Posted November 20, 2005 Share 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 Link to comment Share on other sites More sharing options...
eyeball Posted November 20, 2005 Share 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 Link to comment Share on other sites More sharing options...
Dr.God Posted November 20, 2005 Share Posted November 20, 2005 Pro or Home?type boot.ini Link to comment Share on other sites More sharing options...
Sonic Posted November 20, 2005 Author Share Posted November 20, 2005 okay Dr.God, but it's limited for just Home & Pro, for Corporate edition, I don't have any idea ... Link to comment Share on other sites More sharing options...
Bezalel Posted November 20, 2005 Share 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 Link to comment Share on other sites More sharing options...
Aegis Posted November 20, 2005 Share Posted November 20, 2005 I think he wants it from the command line. Link to comment Share on other sites More sharing options...
Sonic Posted November 20, 2005 Author Share 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 Link to comment Share on other sites More sharing options...
gunsmokingman Posted November 20, 2005 Share 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 Link to comment Share on other sites More sharing options...
Sonic Posted November 20, 2005 Author Share 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 Link to comment Share on other sites More sharing options...
pawan Posted November 20, 2005 Share Posted November 20, 2005 Open Run Box and type "winver" without quote.It is so simple. Pawan Link to comment Share on other sites More sharing options...
Sonic Posted November 20, 2005 Author Share Posted November 20, 2005 Where you see if windows xp is pro or corporate ?? To detect Home or Pro version no problem ... Link to comment Share on other sites More sharing options...
Yahoo Posted November 21, 2005 Share Posted November 21, 2005 U can also checket from the property of my computer Link to comment Share on other sites More sharing options...
Sonic Posted November 21, 2005 Author Share 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 ... Link to comment Share on other sites More sharing options...
Sonic Posted January 9, 2006 Author Share 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 Link to comment Share on other sites More sharing options...
LLXX Posted January 10, 2006 Share 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 Link to comment Share on other sites More sharing options...
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