creopard Posted December 24, 2004 Posted December 24, 2004 remember the date of your last unattended installation?add this to your installation batch (oeminfo.ini must not exist yet)quick'n'dirty:SET D=%SYSTEMROOT%\system32\echo [General] >> "%D%oeminfo.ini"echo Manufacturer=Unattended XP-SP2 Installation >> "%D%oeminfo.ini"echo Model=Professional Edition >> "%D%oeminfo.ini"echo [Support Information] >> "%D%oeminfo.ini"echo Line1=XP SP2 Professional Edition >> "%D%oeminfo.ini"echo Line2=Unattended version (v1.0a) >> "%D%oeminfo.ini"echo Line3= >> "%D%oeminfo.ini"echo Line4=Date of installation: %date% >> "%D%oeminfo.ini"
mmarable Posted December 24, 2004 Posted December 24, 2004 Not bad. I like it. I'm ususally wondering how long ago I've built a machine.Nice tidbit.
benners Posted December 24, 2004 Posted December 24, 2004 Thanks for the info, I added a few things to minecmdow @ /HIDset file=%systemroot%\system32\oeminfo.iniif exist %file% del %file% /sgoto %computername%:Batcaveecho [General] >> %file%echo Manufacturer=Wayne Enterprises >> %file%echo Model=%computername% >> %file%echo [Support Information] >> %file%echo line1=Your Installer Today Was >>. >> %file%echo line2=Benners >> %file%echo line3= >> %file%echo line4=Vocation .............................. >> %file%echo line5=Supreme Unattended Overlord :-) >> %file%echo line6= >> %file%echo line7=Windows Version ..................... >> %file%echo line8=XP Professional with Service Pack 2 >> %file%echo line9= >> %file%echo line10=Support Link ................. >> %file%echo line11=Email addy here >> %file%echo line12=Before Mithering Me, STFW @ http://www.google.co.uk >> %file%echo line13= >> %file%echo line14=Installation Date >> %file%echo line15=%date% @ %time% >> %file%goto end:Batcave2; different details heregoto end:Batcave3; different details heregoto end:Minky; different details heregoto end:Stacey; different details here:end
Radimus Posted December 25, 2004 Posted December 25, 2004 I like using copySET D=%SYSTEMROOT%\system32\echo Line4=Date of installation: %date% >> "%D%pt2.txt"copy "%D%pt1.txt"+"%D%pt2.txt"+"%D%pt3.txt" "%D%oeminfo.ini"
KNARZ Posted January 9, 2005 Posted January 9, 2005 im not that good in cmd commands so please help..how to create that if no computername matches that than will run something generell?e.g. maybe the name of the PC is 'HELLO' gut in cmd only:PC1:PC2are in the cmd - how to do that HELLO get's something generell witch is in the CMD(i know i can create OEM before with $$\System32\ - but the timestamp wouldn't be in present)
venim Posted January 19, 2005 Posted January 19, 2005 Thanx for it.But I got this problem when creating the oeminfo the date is displayed as :? £ 20/01/2005 @ 0:12:56,21 ????with 2 squares before the £.What might be the problem?
SiMoNsAyS Posted January 19, 2005 Posted January 19, 2005 never had the time to say thanks, great script, using it right now
Martin Zugec Posted January 20, 2005 Posted January 20, 2005 I am using oeminfo.ini for information about "build" - on my server I got sheet with differences on every build - so if there is problem on 100 PCs with same build, I know where to look
LaptoniC Posted February 17, 2005 Posted February 17, 2005 I tweaked the batch file little bit and came up with below.It listes fixes under the svcpack directory so you could know which hotfixes you installed.@echo offSET D=%SYSTEMROOT%\system32\REM delete oeminfo.ini if existsif exist "%D%oeminfo.ini" del "%D%oeminfo.ini" /qFOR %%d IN (c: d: e: f: g: h: i: j: k: l: m: n: o: p: q: r: s: t: u: v: w: x: y: z:) DO IF EXIST %%d\WIN51IP SET CDROM=%%decho [General] >> "%D%oeminfo.ini"echo Manufacturer=Windows XP-SP2 Setup >> "%D%oeminfo.ini"echo Model=Professional Version >> "%D%oeminfo.ini"echo [Support Information] >> "%D%oeminfo.ini"echo Line1=Installation Date: %date% >> "%D%oeminfo.ini"echo Line2= >> "%D%oeminfo.ini"echo Line3=Installed Hotfixes:>> "%D%oeminfo.ini"echo Line4= >> "%D%oeminfo.ini"REM Line NumberSET i=5REM List quickfixes without exe extensionFor /F "TOKENS=1 delims=.exe" %%j in ( 'dir /B %CDROM%\I386\svcpack\KB*.exe' )do ( ( set kbname=%%j ) & (call :myprint) )GOTO :EOF:myprintecho Line%i%=%kbname% >> "%D%oeminfo.ini"SET /A i+=1:EOF
bek Posted February 17, 2005 Posted February 17, 2005 Of just run SRVINFO (Reskit)It gives the date time as well as SP, fixes, and HAL type....
Vadikan Posted February 17, 2005 Posted February 17, 2005 Never thought of it. Interesting info, thanks to all contributors.
a06lp Posted February 17, 2005 Posted February 17, 2005 @LaptoniC:That is an awesome script.2 suggestions though:1) Can you make it delete any prior info in OEMInfo?2) Can you make it display ONLY the hotfix name, and not the extension (".exe"), so that the info displayes "KB832414" rather than "KB832414.exe"?thanks!!!
jfmartel Posted February 17, 2005 Posted February 17, 2005 Thank you for this info. This might be useful when you corporate environment has tons of computer.
LaptoniC Posted February 17, 2005 Posted February 17, 2005 @a06lpI am newbie at batch programming but I guess I have done what you want.I have edited my previous post Try it and hope it works for you.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now