/build/static/layout/Breadcrumb_cap_w.png

What is the best way to use Runonce when deploying software?

Any best practices to follow here? thank u in advance


0 Comments   [ + ] Show comments

Answers (3)

Answer Summary:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce] "setup"="C:\\Drivers\\Scripts\\install3.cmd"
Posted by: dugullett 11 years ago
Red Belt
3

Put whatever you need to run at HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce. After a reboot then whatever you have there will run.

Example:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]

"setup"="C:\\Drivers\\Scripts\\install3.cmd"

Posted by: piyushnasa 11 years ago
Red Belt
1

Why do you want to use RunOnce in deploying software? If you can tell the reason we can give you better options..

RunOnce is not at all a good option.


Comments:
Posted by: SMal.tmcc 11 years ago
Red Belt
1

The gotcha of doing this is, whatever you call from the run once is subject to the user rights on that machine.


Comments:
  • If the person is an admin it can be very useful
    This run once line ran gpupdate, displayed the user info, restarted the machine in 5 min, ran a program and a batch file in one line.
    start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /v RunGPUpdate /d "cmd.exe /k \"gpupdate /force\"&&whoami&&shutdown -r -f -t 305&&\\dr-acad\programs\installs\w2d\closeie.exe&&\\dr-acad\programs\fixip.bat" - SMal.tmcc 11 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ