Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to use the "run once" feature in VMware's guest customization scripts to run an interactive script to further customize the guest OS (ie SNMP community, DNS suffix, add local user/pass). It must be an interactive prompt because the values can be different per VM. I am not joining these to a domain.

Has anyone tried this before or have a good resource for customizing W2k3 via script?

share|improve this question
up vote 2 down vote accepted

I do this on my Windows 2003 and 2008 guests. Put the script in the c:\windows\system32\ folder on the template. Within the customization settings you can add a onetime script to be run. You'll also need to tell the system to automatically login once so that the script runs.

The last line of my script has a reboot command to reboot the guest after the script is complete.

(I'm assuming that you are using ESX for this.)

share|improve this answer
Do you have a good resource or examples of a script? – JakeRobinson Jun 29 '09 at 2:55
I'm just using a batch file to do what I need to. In my case I'm running a vbs script using cscript to change the drive letter. (I downloaded it from the net, not sure from where, I'll post it if you'd like.) Then I force a reboot using shudown.exe with the /r /t 10 /c "rebooting" /d P:1:1 switches. For adding users you can all NET USER, DNS changes should be able to be made using sh. I'm not sure about SNMP settings. Probably just load a registry file using regedit with the /q switch. – mrdenny Jun 29 '09 at 17:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.