Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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'm trying to instruct my image of WinPE to directly execute a script when it finishes loading. How can I do that? Do I have to modify Winpeshl.ini or Startnet.cmd or Unattend.xml? I have tried all of them with no result, so any help is appreciated. Thank you very much.


Thank you all for your answers. Just to clarify I have a couple of questions more. How would startnet.cmd look like? If I've understood well, it should be something like (now following mh great advices):

cd <path>
echo Type <my_own_script> and press RETURN to begin installation.

or something like:

wpeinit –unattend=<path>\unattend.xml

As a side question, how can I make my_own_script.cmd to be executed with unattend.xml?

share|improve this question
@mh: Thanks for the advice :-D So, a startnet.cmd looks like it should work? I tried something similar and I couldn't make work. It gave an error before WinPE finished loading... :-o – yeyeyerman Nov 30 '09 at 22:56

I've successfully used startnet.cmd in the past, so you may be having issues with bad paths if that isn't working for you. Double-check where your scripts are located, and maybe try using an absolute path.

share|improve this answer

Startned.cmd or unattend.xml

by using unattend you are (more) sure to have network connectivity when your scripts fire, AFAIK.

share|improve this answer

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.