Network Administrator Knowledgebase

Jan 28 2009   12:52AM GMT

How to know when the sysprep image applied to computer?

Michael Khanin Michael Khanin Profile: Michael Khanin

I did a very simple script, and I run it once when I apply a new sysprep image, that imports the date, when this particular image was applied to the specific computer. Sometimes this is very important. Here is a content of my script:

@Echo Off
REM **********************************************************************************************************
REM * This script checks a date Image was deployed and import this data into the Registry as Image-Date REM REM **********************************************************************************************************

For /f “Tokens=2 Delims= ” %%a in (‘@DATE /t’) do set IMG-DATE=%%a
Echo Windows Registry Editor Version 5.00 > %TEMP%\IMG-DATE.reg
Echo [HKEY_LOCAL_MACHINE\SOFTWARE\WRHA] >> %TEMP%\IMG-DATE.reg
Echo “Image-Date”=”%IMG-DATE%” >> %TEMP%\IMG-DATE.reg
Reg.exe import %TEMP%\IMG-DATE.reg
Del %TEMP%\IMG-DATE.reg /Q

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: