none
Reset my System every Day at 00:00 RRS feed

  • Question

  • We plan to set up 100 Notebooks with the MicrosoftSteadyState Toolkit, but i got one Problem.
    Normally i just can reset my Computer every Restart, or on a specific date. Is it possible, to reset my computer every Day at 00:00, to be a clean System when i start my Computer in the morning?

    I dont find any of this Preferences in the Windows Scripts - can anyone help me please?

    Thanks in advance,

    Dieter


    Wednesday, July 18, 2007 8:52 AM

Answers

  • Hi,

     

    Thanks for your reply.

     

    To get the aim, we can take the following steps:

     

    Step 1: Write a script to retain changes temporarily.

     

    The SteadyState has a feature to retain changes temporarily. For example, you can keep the changes for 30 days. But here we only need to keep changes for one day. You can run the script we provided to retain the change to 12:00 AM of the next day.

     

    SetWDPersist.vbs

    ------------------------------------------------------------------

    const WDP_MODE_PERSIST = 1

     

    set dateTime = CreateObject ("WBemScripting.SWbemDateTime")

     

    dateToday = Date()

     

    dateTime.SetVarDate dateToday + 1

     

    ' Identify the computer to manage

    strComputer= "."

          

    set objWbemServices = GetObject ("winmgmts:\\" & strComputer & "\root\wmi")

    set setWdpObjects   = objWbemServices.ExecQuery ("SELECT * FROM WDP_Control")

     

    for each objWdp in setWdpObjects

       objWdp.CurrentMode  = WDP_MODE_PERSIST

       objWdp.PersistDateTime = dateTime.GetFileTime

       objWdp.Put_

    next

     

     

    Microsoft provides programming examples for illustration only, without warranty expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. The sample code is provided for your reference. You need to customize it to meet your requirement.

     

    More info:

    Description of the API for the Windows Disk Protection feature in Windows SteadyState

    http://support.microsoft.com/?id=938335

     

    Step 2: Create the following two scheduled tasks.

     

    1.     Create a scheduled task to restart computer at 12:05 AM every day.

    2.     Create a scheduled task to run script SetWDPersist.vbs at 12:15 AM every day.

     

    More info:

     

    How To Schedule Tasks in Windows XP

    http://support.microsoft.com/kb/308569

     

    Hope the information helps.

     

    If you need further assistance, please don’t hesitate to let me know.

    Friday, July 20, 2007 11:47 AM
  • Hi Tic1745,

     

    If you need to clear all user profile and only keep the McAfee updates, you can do the following:

     

    1.       Open Disk Protection.

    1)      Open SteadyState.

    2)      Click Protect the Hard Disk.

    3)      Click On and Remove all changes at restart.

     

    2.       Schedule McAfee Update.

    1)      Open SteadyState.

    2)      Click Schedule Software Updates.

    3)      Click Security Program Updatets and McAfee under Select Updates.

     

    Windows can detect and automatically update the McAfee antivirus software programs listed in the “Security Program Updates” section.

     

    The following is how the SteadyState Schedule Software Updates works with Windows Disk Protection:

     

    §  Logging off any active user.

    §  Restarting the computer so that Windows Disk Protection can clear disk changes.

    §  Disabling shared user accounts to prevent unapproved disk changes from being introduced while updates are in progress.

    §  Turning on Retain all changes permanently in Windows Disk Protection to ensure that the updates are not removed the next time the computer restarts.

    §  Downloading and installing updates.

    §  Restarting the computer.

    §  Turning Windows Disk Protection back to Remove all changes at restart for increased security on your shared computer once updates have been installed.

     

    Also, this question is different from the original one. In order to concentrate fully on the new issue we ask that you post it as a separate thread. That way each issue can receive full attention  and will also make the thread more clear and consistent for others reference. Please feel free to open a new post for this issue and we will be very glad to work with you.

     

    Hope this helps.

     

    If you need further assistance, please don’t hesitate to let me know.

    Monday, July 30, 2007 6:22 AM

All replies

  • Hi Dieter,

     

    To restart computers at 00:00, you can try the following steps:

     

    1. Create a text file, input the command and save it to c:\restart.bat.

     

    C:\windows\system32\shutdown.exe –r –f –t 0

     

    2. Click StartàAll ProgramsàAccessoriesàSystem ToolsàScheduled Tasks.

    3. Double click Add Scheduled Task and click Next.

    4. Click Browse and input c:\restart.bat.

    5. Select Performance this task Daily.

    6. Select Start time: 00:00 every day.

    7. Input your password and click Next.

    8. Click Finish.

     

    For more information, you can take a look at the following article:

     

    How To Schedule Tasks in Windows XP

    http://support.microsoft.com/kb/308569

     

    How To Troubleshoot Scheduled Tasks in Windows XP

    http://support.microsoft.com/?id=308558

     

    Hope the information helps.

     

    If you have any concern on this issue, please don’t hesitate to let me know.

     

    Thursday, July 19, 2007 6:01 AM
  • Thanks for your reply Robert Li.

    But i dont thing, that will work so how i want. When one of the users start the Computers daily some times, the computer will reset too.

    So what i want is:

    User can work with the Notebook. When he restart the Notebook, nothing should happened. So he can work one Day with the Notebook, can do everything what he want, but when the day is over, the computer resets all preferences from the user every day at 00:00.

    It should work like the sheduled reset, but not with a specific date. Just every Day at 00:00 (or when the Computer is getting startet in the following morning)

    Is this Possible?

    Thursday, July 19, 2007 7:37 AM
  • Hi,

     

    Thanks for your reply.

     

    To get the aim, we can take the following steps:

     

    Step 1: Write a script to retain changes temporarily.

     

    The SteadyState has a feature to retain changes temporarily. For example, you can keep the changes for 30 days. But here we only need to keep changes for one day. You can run the script we provided to retain the change to 12:00 AM of the next day.

     

    SetWDPersist.vbs

    ------------------------------------------------------------------

    const WDP_MODE_PERSIST = 1

     

    set dateTime = CreateObject ("WBemScripting.SWbemDateTime")

     

    dateToday = Date()

     

    dateTime.SetVarDate dateToday + 1

     

    ' Identify the computer to manage

    strComputer= "."

          

    set objWbemServices = GetObject ("winmgmts:\\" & strComputer & "\root\wmi")

    set setWdpObjects   = objWbemServices.ExecQuery ("SELECT * FROM WDP_Control")

     

    for each objWdp in setWdpObjects

       objWdp.CurrentMode  = WDP_MODE_PERSIST

       objWdp.PersistDateTime = dateTime.GetFileTime

       objWdp.Put_

    next

     

     

    Microsoft provides programming examples for illustration only, without warranty expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. The sample code is provided for your reference. You need to customize it to meet your requirement.

     

    More info:

    Description of the API for the Windows Disk Protection feature in Windows SteadyState

    http://support.microsoft.com/?id=938335

     

    Step 2: Create the following two scheduled tasks.

     

    1.     Create a scheduled task to restart computer at 12:05 AM every day.

    2.     Create a scheduled task to run script SetWDPersist.vbs at 12:15 AM every day.

     

    More info:

     

    How To Schedule Tasks in Windows XP

    http://support.microsoft.com/kb/308569

     

    Hope the information helps.

     

    If you need further assistance, please don’t hesitate to let me know.

    Friday, July 20, 2007 11:47 AM
  • Thank you for posting that Robert.  I’m thinking about using this script in my environment, as it may address the issues of what happens to user files when a power outage happens.  Should I run the SetWDPersist.vbs script before or after Steady State is configured to perform updates?  In my case that would be at 4:00 AM.

    Tuesday, July 24, 2007 4:01 PM
  • Hi,

     

    When Windows Disk Protection is turned on, it creates a cache file to retain all of the modifications to operating system or program directories. Histories, saved files, and logs are all stored in this cache file that has been created on a protection partition of the system drive. If the computer is shut down due to power outrage, the information will not lost. Of cause, all the information will be cleared automatically after the time you set in the Retain changes temporarily.

     

    If you configure SteadyState to download and install updates automatically at 4 AM, you can take the steps at following:

     

    1.     Modify SetWDPersist.vbs to retain the change to 3:50 AM of the next day.

    2.     Create a scheduled task to restart computer at 3:55 AM every day.

    3.     Create a scheduled task to run script SetWDPersist.vbs at 5:00 AM every day

     

    Note: Since Windows Updates may take a long period of time to complete, so we need run SetWDPersist.vbs at a later time such as 5:00 AM.

     

    Hope this helps.

     

    If you have any questions about this issue, please don’t hesitate to let me know.

    Wednesday, July 25, 2007 7:05 AM
  •  

    Hi Robert Li,

     

    i am wondering if i have a case, i want to clear all user profile but i want update McAfee dat file daily.  How should i do that?  Will schedule the update for McAfee will return the new dat file but clean all the users profile at reboot.

     

    Thanks

     

    Tic1745

    Friday, July 27, 2007 8:12 PM
  • Hi Tic1745,

     

    If you need to clear all user profile and only keep the McAfee updates, you can do the following:

     

    1.       Open Disk Protection.

    1)      Open SteadyState.

    2)      Click Protect the Hard Disk.

    3)      Click On and Remove all changes at restart.

     

    2.       Schedule McAfee Update.

    1)      Open SteadyState.

    2)      Click Schedule Software Updates.

    3)      Click Security Program Updatets and McAfee under Select Updates.

     

    Windows can detect and automatically update the McAfee antivirus software programs listed in the “Security Program Updates” section.

     

    The following is how the SteadyState Schedule Software Updates works with Windows Disk Protection:

     

    §  Logging off any active user.

    §  Restarting the computer so that Windows Disk Protection can clear disk changes.

    §  Disabling shared user accounts to prevent unapproved disk changes from being introduced while updates are in progress.

    §  Turning on Retain all changes permanently in Windows Disk Protection to ensure that the updates are not removed the next time the computer restarts.

    §  Downloading and installing updates.

    §  Restarting the computer.

    §  Turning Windows Disk Protection back to Remove all changes at restart for increased security on your shared computer once updates have been installed.

     

    Also, this question is different from the original one. In order to concentrate fully on the new issue we ask that you post it as a separate thread. That way each issue can receive full attention  and will also make the thread more clear and consistent for others reference. Please feel free to open a new post for this issue and we will be very glad to work with you.

     

    Hope this helps.

     

    If you need further assistance, please don’t hesitate to let me know.

    Monday, July 30, 2007 6:22 AM
  •  

    hi im a begginer you say to write a text file how?  well to begin all i realy need is , i am trying to reset my computer daily at start with all the setttings that i put in .it is a internet caffe which people will load pics and info that i want to clear every time i restart my computer daily thanks mauricio.
    Friday, December 26, 2008 6:23 PM
  • I have a similar question that your solution may help.  I have a lab with 30 laptops and we start training every Sunday and complete training on Wednesday.  Changes are made to a program that the users are trained on.  Once Wednesday arrives and training is complete, we reset the computers back to a state using our solution today (not very user friendly). Then on Thursday, the students take a test using the same computers.  Once the test is complete we have the system reset again.

     

    What is your thought or direction on how to best achieve that?

    We can have them manually trigger the reset for Wednesday and if I can tell your vbs script to run every Thursday night or Friday morning that would be great.

     

    What is the best to way to approach that?  

     

    Thanks,

    Rod Cohen

     

    Saturday, December 27, 2008 4:45 PM