Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sysprep and Automatic Email script

Status
Not open for further replies.

NeptuneIT

MIS
Apr 24, 2006
3
0
0
US
I am setting up our new Ghost server and am messing around with sysprep answer files for the first time. I've gotten everything like I want it except for one aspect. I would like to join the computers to our domain in the answer file, but I want it to automatically send our Domain Admins an email when it completes. This way we can put the pcs in the correct OU.

I've got a vbscript that will do the automatic emailing, but when I run it from the sysprep answer file (GuiRunOnce) the script runs but will not email. Once the user is logged on completely, I can run the script and it emails fine.

Is there a way I can delay the execution of the script to allow the user to log in completely before it runs? Is there a better way to do what I'm trying to do?

Thanks for the help!
 
What's the needed delay? If you're using vbscript CDO to send the e-mail, then a simple "sleep" could accomplish the desired results.
 
The way it seems - Windows will not continue to allow a user to log in until the bat file that is calling the vbscript completes when running it from the GuiRunOnce command of sysprep.

I'll try throwing that sleep command in there and let everyone know how it goes.
 
Thanks GVN!

I edited my script to write the info (who was using sysprep, the computername and a description) to a text file on a server. I then used the AT command to schedule the SERVER to execute the email script. Although the email is not instant, I can get the email out to the domain admins once a day. That should be sufficient for keeping Active Directory cleaned up!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top