Super User is a question and answer site for computer enthusiasts and power users. 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 want to write a script that will be run from my CD any time the OS finishes to go up.

My questions:

  1. What type of script to write?
  2. What should I write to cause the script to run automatically when the OS is up (this is so important to me!!)?

My OS is Windows XP PE.

Thank you all!

share|improve this question
Found the way to do it with WinPE: WinPE has an option to add a customized script runs automatically. Windows PE provides three methods for launching custom scripts, see the link below: [][1] – RRR Jan 29 '12 at 11:51

This can be done by adding a startup item which then runs the program on the CD.

The most obvious way to do this would by to simply make a shortcut to the application on the CD and then put that shortcut in the Startup directory for your user profile (under XP this is located at C:\Documents and Settings\<UserName>\Start Menu\Programs\Startup.)

In my testing I found that Windows apparently doesn't put up an error box if a shortcut in the Startup folder is invalid. So, you can take the CD out and not be annoyed every time you log in.

Note that this method won't work quite as well in versions of Windows newer than XP, since such startup items are blocked by default.

share|improve this answer

There is a file named Autorun.ini which would kind of do what you are trying. It would allow an option to be added to the autorun box that occurs when you put in a CD.

I haven't been using Windows reliably in a few years but I believe that having stuff automagically happen has been disabled as a security precaution.

share|improve this answer
Thanks, if my CD was alreay in the computer, will the script run when the OS will finish to go up? – RRR Jan 29 '12 at 7:43
No, you would need to put the CD back in to get the autorun window. – Sion Jan 29 '12 at 7:45
but I want that it starts to run from my CD without any action from me, how can I do it? – RRR Jan 29 '12 at 8:02

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.