January 16, 200521 yr Hey guys i found a post for this but it was for WPI but what i need is the code required to only start the progam if the windows version is 5.2
January 16, 200521 yr Something like this:@echo offver | find "Version 5.2"if errorlevel 1 goto NotVer52echo Version 5.2goto end:NotVer52echo Not Version 5.2goto end:end
May 1, 200818 yr Just wanted to post and say thanks for this tip. I knew that 'ver' displayed that information but didn't know how to parse it.Here is what I am using to differentiate between XP and Vista.@echo offver | find "Version 5.1"if errorlevel 1 goto NotXPecho XPgoto end:NotXPver | find "Version 6.0"if errorlevel 1 goto endecho Vistagoto end:endThanks again
May 1, 200818 yr You can use this :if exist %SystemDrive%\bootmgr start "" setup.exeFor me,I use that code, it's check uac too ...if exist %SystemDrive%\bootmgr fsutil | find "administrateur"if exist %SystemDrive%\bootmgr if "%errorlevel%"=="0" echo UAC ON&&pause&&exit else echo UAC OFF&&start "" setup.exe Edited May 1, 200818 yr by Sonic
May 2, 200818 yr Hey guys i found a post for this but it was for WPI but what i need is the code required to only start the progam if the windows version is 5.2We really need more information than this, because the way I see it is that if you're creating an unattended disk, you should already know what OS you're installing!ver | find "Version 5.2"ver | find "Version 5.1"This will actually only return the version of the Command Interpreter not the Operating System. Although this is likely to be the same, it is not always true.if exist %SystemDrive%\bootmgrUnfortunately if the OS is part of a Dual Boot system with Vista and XP for instance, the bootmgr directory may exist in the root of the XP system drive thus giving a false case.
Create an account or sign in to comment