Jump to content

Recommended Posts

Posted (edited)

I have cmd file right now and its intalling programs.... lets call it

1.cmd

now.... what I want to do is when 1.cmd finishes I want the computer to restart... and after that I want that 2.cmd will restart its files....

or

to write a command that in some point of the 1.cmd file the comp. will restart and after the restart it will continue the file....

this is very important question and can help me much....

Edited by CompMaster

Posted

You must place your cmd in the RunOnceEx registry key ... in each file you set the next cmd to execute ... for reboot use "shutdown -r -t xx" (where xx are the seconds)

Goodbye.

Posted (edited)

hmm, It don't have to be RunoncEX :no:

Heres what I do to start something after the reboot.

In this example I'm opening the Fonts folder which register's the Fonts I have added.

Shouldn't be too hard to modify that to call your *.cmd file

Just add it to your cleanup.cmd right before the Shutdown

NOTICE: Its not RunoncEX but simply Runonce I have experimented and added like 10 things there as a test, all work just fine as long as they are correct Path's. This also goes to the Current User and can be applied to other Users.

REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Runonce /V RegisterFonts /D "%SystemRoot%\explorer.exe /e,/root,%systemroot%\Fonts"

BTW, The reason I don't use Runoncex is I have had occasions where certain software added something there and i don't want to Jack with it...

Bing Bada Boom

Edited by maxXPsoft

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...