开发者

Run Powershell script on machine start?

开发者 https://www.devze.com 2023-03-08 18:03 出处:网络
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, an开发者_StackOverflowd it works.But how do I get it to run when the machine st

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, an开发者_StackOverflowd 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


Task Scheduler - Run at Startup


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

0

精彩评论

暂无评论...
验证码 换一张
取 消