1.

Solve : continuing bat file after restart?

Answer»

hi there...is there a way where I can run a bat file which shuts down the computer then continue running the bat file after it restarts? i've search HIGH and low and still cant find the command or procedure to do it. thanks for any help.Not directly and not easily. The computer remembers remarkably little from boot to boot.

On a windows machine, you'd need two files. The first would update the runonce registry key with a reference to the second file, then reboot the system. The second would be the file containing the commands to run after the boot.

For more details: Run Once

reg /? at any command prompt

On a MS-DOS machine, you'd need a file to update the autoexec.bat with the commands to run after the boot, then reboot the machine. After the boot, the autoexec will run the commands you requested.

Note: the autoexec approach is an every time thing, your commands will run after every boot. The registry approach in windows is just run once. Deleting the entry from the registry is automatic.

There is also the startup folder. What are you really trying to do?thanks for replying SIDEWINDER. what i really want to do is to create a bat file which restarts the computer then run a memory TEST then print the result to a text file. thanks...You really can't expect to run a batch file that reboots the system have that same batch file pickup from where it left off after the boot

Either of the two methods posted above will work. Just require a little planning.

Using the startup folder, you could start a batch file to do your memory test. You could reboot the system manually and be sure to remove the batch file from the startup folder before the next boot.

Not for nothing but what OS are you using?

8-)I am using XP. Ok thanks sidewinder for letting me know that it can't be done easily. I dont have to waste ANYMORE time searching for it. I will try your METHOD above. Thanks again sidewinder



Discussion

No Comment Found