Run Once after reboot?

R

Rob

I am using a run once registry entry to assist in the
process of configuring freshly built servers. I have no
problem calling a batch file with a single run once entry
but how would I call subsequent batch files say after the
second or third reboot? I have been using a confusing
method of running another batch file from the
allusers\startup folder to place another entry in the
registry but this doesn't always work.

Any help would be appreciated.

Thanks
Rob
 
T

Torgeir Bakken \(MVP\)

Rob said:
I am using a run once registry entry to assist in the
process of configuring freshly built servers. I have no
problem calling a batch file with a single run once entry
but how would I call subsequent batch files say after the
second or third reboot? I have been using a confusing
method of running another batch file from the
allusers\startup folder to place another entry in the
registry but this doesn't always work.

Any help would be appreciated.
Hi

In those types of cases, I have created a VBScript that is placed
not in RunOnce but in Run, and let the script have its own counter
number (saved to registry and incremented once for each run).
When the counter number reaches it's max number (all tasks done),
it deletes itself from Run (and the vbscript file itself as well
if necessary).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top