Any best practices to follow here? thank u in advance

Answer Summary:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce] "setup"="C:\\Drivers\\Scripts\\install3.cmd"
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

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"

Answered 08/17/2012 by: dugullett
Red Belt

Please log in to comment

Answers

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.

Answered 08/20/2012 by: piyushnasa
Red Belt

Please log in to comment
1

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

Answered 08/17/2012 by: SMal.tmcc
Red Belt

  • 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"
Please log in to comment
Answer this question or Comment on this question for clarity