locked
Retain Changes Temporarily until Friday 20:00 ? RRS feed

  • Question

  •  

    We are using SteadyState on our training PCs to ensure that each training session starts with a clean standard installation.  We need to be able to retain changes for the length of the training, which is from Monday to Friday. WDP is configured to install available updates on Friday evening at 21:00. Note that it is possible to schedule windows updates on specific days, but the "Retain changes temporarily" uses a calendar.

     

    It is possible to configure WDP to retain changes until Friday evening 20:00, so that the reboot occurs to clean the machine before the updates are installed ?

     

    Wednesday, October 31, 2007 10:31 AM

Answers

  • Hi Adrian,

     

    Thank you for your clarification. Unfortunately, SteadyState doesn't have this feature. However, you can create a Schedule Task to run the following script when update is completed. It will automatically configure "Retain changes temporarily" to next Friday. If this is a domain environment, you can also deploy the script directly.

     

    Note: To make sure there is enough time to install all updates, I recommend we run the Schedule Task at Saturday morning.

     

    1. Create a text file, input the following contents and save it to c:\Persist.vbs. (The location can be changed)

     

    set dateTime = CreateObject ("WBemScripting.SWbemDateTime")

    Const WDP_MODE_PERSIST = 1

     

    ' Persist until 6+20/24=6.8333 days later (next 20:00PM, Friday).

    dateToday = Date()

    dateTime.SetVarDate dateToday + 6.8333

     

    ' 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

     

    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:\Persist.vbs. (Or the location you specified)

    5. Select Perform this task Weekly.

    6. Select Start time such as 4:00AM. Select the check box before Saturday.

    7. Input an administrator account and its password, click Next.

    8. Click Finish.

     

    You can also modify your system time and then run the Schedule Task manually to check if it works or not.

     

    Related Threads:

     

    Can I change the level of Disk Protection from remote?

    http://forums.microsoft.com/WindowsToolsandUtilities/ShowPost.aspx?PostID=2117002&SiteID=69

     

    Reset my System every Day at 00:00

    http://forums.microsoft.com/WindowsToolsandUtilities/ShowPost.aspx?PostID=1889736&SiteID=69

     

    Regards,

    Friday, November 2, 2007 3:50 AM

All replies

  • Hi Steady_Ed,

     

    Your understanding is correct. Based on your configuration, the following message will be received at 20:00PM, Friday. Then the system will restart the system automatically at 20:10 to remove all changes and then restore WDP to "Remove all changes at restart".

     

    "The computer will restart in  minutes and Windows Disk Protection will clear all changes to the hard disk. Save your work to a floppy disk or other removable storage media to avoid losing your work."

     

    At 21:00PM, Friday, scheduled updates will be installed.

     

    Best Regards,

    Thursday, November 1, 2007 6:50 AM
  •  

    Hi Shaun,

     

    The aspect of the updates is clear, I know that the machine will reboot every Friday and install the updates.

     

    WDP allows  me to keep changes temporarily until a set time and date, which is configured using a calendar. This means, that I have to set the date every week, on every machine. I would like to configure SteadyState to store changes until Friday evening, so that I only need to configure the machines once. As we use the PCs for software training, the users need to reboot windows during the week without losing their changes.

     

    Hope this clarifies the question!

     

    Adrian

     

     

    Thursday, November 1, 2007 8:25 AM
  • Hi Adrian,

     

    Thank you for your clarification. Unfortunately, SteadyState doesn't have this feature. However, you can create a Schedule Task to run the following script when update is completed. It will automatically configure "Retain changes temporarily" to next Friday. If this is a domain environment, you can also deploy the script directly.

     

    Note: To make sure there is enough time to install all updates, I recommend we run the Schedule Task at Saturday morning.

     

    1. Create a text file, input the following contents and save it to c:\Persist.vbs. (The location can be changed)

     

    set dateTime = CreateObject ("WBemScripting.SWbemDateTime")

    Const WDP_MODE_PERSIST = 1

     

    ' Persist until 6+20/24=6.8333 days later (next 20:00PM, Friday).

    dateToday = Date()

    dateTime.SetVarDate dateToday + 6.8333

     

    ' 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

     

    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:\Persist.vbs. (Or the location you specified)

    5. Select Perform this task Weekly.

    6. Select Start time such as 4:00AM. Select the check box before Saturday.

    7. Input an administrator account and its password, click Next.

    8. Click Finish.

     

    You can also modify your system time and then run the Schedule Task manually to check if it works or not.

     

    Related Threads:

     

    Can I change the level of Disk Protection from remote?

    http://forums.microsoft.com/WindowsToolsandUtilities/ShowPost.aspx?PostID=2117002&SiteID=69

     

    Reset my System every Day at 00:00

    http://forums.microsoft.com/WindowsToolsandUtilities/ShowPost.aspx?PostID=1889736&SiteID=69

     

    Regards,

    Friday, November 2, 2007 3:50 AM
  • Hi Shawn,

     

    Implemented the script and scheduled task as above. Works fine, but instead of setting the reboot for Friday, it chose Thursday. As I am not familiar with windows scripting (yet), could you please recheck the formula. I will manually reconfigure the machines for this week and then check them again on the weekend after the scheduled task re-runs on Friday evening. We prefer to reboot on Friday and install the updates then to ensure that the machines are patched as quickly as possible after the training. Also we log onto the machines on Saturday mornings to check that all is well for the following trainings.

     

    Thanks for the excellent support,

     

    Adrian

     

     

    Monday, November 5, 2007 9:35 AM
  • Hi Adrian,

     

    It can be related to the following line which is designed to run on Saturday:

     

    dateTime.SetVarDate dateToday + 6.8333

     

    This line will plus 6.8333 days to the current system date. Thus, if you run it on Friday, WDP will retain changes temporarily until 6.8333 days later (next Thursday, 20:00PM).

     

    If WDP has been configured to 6.8333 days later when testing it, that means it works. There will be no problem when the scheduled time (Saturday morning) comes. You can also temporarily change the system time to Saturday and then run the script again to check.

     

    Note: When saving the script on your hard drive, please make sure WDP is configured to "Retain all changes permanently". If WDP is configured to "Retain changes temporarily", the script may be deleted.

     

    Best Regards,

    Tuesday, November 6, 2007 2:18 AM
  • Hi Shawn,

     

    Further testing has shown that this solution works fine. We would however still prefer for the reboot to be carried out on Friday as opposed to Saturday. How do I adapt this line of code to give me 7 days instead of 6?

     

    dateTime.SetVarDate dateToday + 6.8333

     

    Best regards,

    Adrian

     

    Thursday, November 22, 2007 10:46 AM
  • Hi Adrian,

     

    I am glad to hear it works.

     

    If you would like to run it on Friday and postpone the retain changes temporarily time to next Friday 20:00PM, we can change the value to 7.8333:

     

    dateTime.SetVarDate dateToday + 7.8333

     

    Note: If you run it on Friday, +7 will set the time to next Friday 0:00AM, + 7.8333 will set the date to the exact time (next Friday 20:00PM).

     

    You can temporarily change the system date to Friday and then run the script again to check.

     

    Regards,

    Friday, November 23, 2007 1:55 AM