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?


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.)

  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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