Jump to content

How do I save tasks status before restart the window and load it after Windows started?


h711
 Share

Recommended Posts

Hi, I have a script that needs to do a list of tasks. After each task been completed/cancelled, I need the script to restart the Windows OS. My problem is, if the script restarts Windows, all tasks will be lost and it has to start over again. I need a way to save the status/results and load it after Window got restarted.

What I can think of so far is to save all the tasks in a notepad. Before restart the OS, update the notepad and save all the status. After OS restarted, read the notepad to get infor. But this is not an easy way, as I need the script to seach and update the notepad. "Send" command is not very ideal for this task.

Is there is better way to deal with this?

Thanks!!!

Link to comment
Share on other sites

You could use an ini file to write what's been done or you could number the tasks and write a regkey to read. Once you know the task number you can start from there. You could also write a regkey to the RunOnce and pass parameters to your script to tell it where it left off.

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...