r/vbscript • u/B4tty_M4n • Jan 05 '24
How do i make a vbs continue running after restart?
I am making a vbs code and i wrote a line of code that restarts the computer.
Now i want it to continue with the rest of the code after the restart, is it possible?
2
Upvotes
2
u/raging_radish Jan 05 '24
Add an entry to RunOnce
https://learn.microsoft.com/en-us/windows/win32/setupapi/run-and-runonce-registry-keys
1
u/jcunews1 Jan 06 '24
If you want the script to continue where it was interrpted in the middle of processing something, then you'll have to modify the wcript to keep a log of what it should be working on, and each of task it has done, into a file.
So that, when the cript is started again and the log file indicates that the whole task was not yet completed, it can continue where it was left off based on the l9g file.
1
u/Jaikus MOD Jan 05 '24
Scheduled task?