Posts: 34
Threads: 20
Joined: Oct 2007
can I run something after next reboot? If I use system restore some files are corrupted through this action. I want to replace these files with correctly ones after the new system restore point is build, that means after reboot with this point.
Posts: 1,769
Threads: 410
Joined: Feb 2003
yes, you can create your macro and then 'schedule' it via the macro's properties (ctl-p) then go to the Windows Schedule Task folder and open the new task then click on the Schedule tab then in the 'Schedule Task' choose at 'System Startup' and it'll start up when the machine reboots. if you only want it to run on the next startup, go into the Advanced tab and set it to start and end on the same day or have the macro put the command 'end' at the front of itself after running the commands you want.
Posts: 12,100
Threads: 142
Joined: Dec 2002
Here is how a macro can tell Windows to run another macro when Windows starts next time:
Macro
;set registry value that tells Windows to run QM and macro "macro x" when Windows starts
rset "qmcl.exe M ''Macro x''" "QM - macro x" "Software\Microsoft\Windows\CurrentVersion\Run"
In macro x insert this at the beginning:
Macro
if(!rget(_s "QM - macro x" "Software\Microsoft\Windows\CurrentVersion\Run")) ret ;;don't run accidentally if not set
rset "" "QM - macro x" "Software\Microsoft\Windows\CurrentVersion\Run" 0 -1 ;;delete the value