4

I have a script that I need to have run every time a certain Windows XP machine boots up. I've written it in Powershell, and it works. But how do I get it to run when the machine starts? Not when I log in, but on machine start.

Thank you

1
  • Thank you for the edit Jared. I was in such as hurry to fix this before the long weekend! Commented May 28, 2011 at 0:35

2 Answers 2

6

Task Scheduler - Run at Startup

Sign up to request clarification or add additional context in comments.

Comments

3

add a new key to the following registry hive. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

if you want the program be executed once only then add it to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce keys in this hive will be deleted after it is executed. You can add ! at the beginning of the name to force the deletion to happen at the end of the execution.

The sequence of execution is listed in the following link http://support.microsoft.com/kb/179365

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.