Jump to content

Rebooting machine and script continues


Recommended Posts

Hi All,

Can some one tell me how can I write script for below scenario.

I have to invoke my application 25 times, for each iteration I have to reboot my machine.

After rebooting script should continue next iteration until it finishes.

Can some one help me on this?

Thanks,

Chaitanya

Link to comment
Share on other sites

I would say the best way would be to write a .ini file with where your script left of when it shutdown, then put it in Startup folder. So when it next starts it would read the file and know where it left off.

IniRead

IniDelete

.... check the helpfile

Link to comment
Share on other sites

1.You need to auto start your script in Windows - there are several ways :

a. Registry

b. Scheduled task

2.You need to write to a file the number of iterations and read it in the beginning and execute until it reaches 25.

Link to comment
Share on other sites

I have some script that I use to configure some installs. What I do is increase the dword value before I force a reboot.

RegWrite ("HKLM\SOFTWARE\ALTIRIS","FLAG", "REG_DWORD", "1")

I place my autoit exe in the all users startup folder. That way it runs when the workstation restarts and logs in. The script starts and reads the value of the dword, then the script uses a case select to know where to start the next config stage. Each time changing the value of the dword once it gets done with the script.

Hope this helps.

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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