none
Script with schedule update at certain time and disk protection on and set to remove changes RRS feed

  • Question

  •  

    Hi,

    Can I write a  script to configure the Schedule Software Updates at certain time and Disk Protection on and set to remove changes? 

     

    I want to push out the steadystate installation to remote machines.

     

    thanks for the help

     

    tic1745

    Tuesday, July 31, 2007 6:33 PM

Answers

  • This is a sloppy vbscript.  The real downside to doing this type of automation is it assumes everything is at a set point every time the script starts but it should give you the general idea.  This being MS’s forum, figured I’d use their technology.    There are other scripting languages out there better suited for this task.

     

    Code Snippet

     

    set oshell=createobject("wscript.shell")
    oshell.run """C:\Program Files\Windows SteadyState\SCTUI.exe"""
    oshell.appactivate "Windows SteadyState"
    wscript.sleep 600
    oshell.appactivate "Windows SteadyState"
    wscript.sleep 600
    oshell.sendkeys "{tab}"
    wscript.sleep 100
    oshell.sendkeys "{tab}"
    wscript.sleep 100
    oshell.sendkeys "{tab}"
    wscript.sleep 100
    oshell.sendkeys "{tab}"
    wscript.sleep 100
    oshell.sendkeys "{tab}"
    wscript.sleep 100
    oshell.sendkeys "{enter}"
    wscript.sleep 600
    oshell.sendkeys "{tab}"
    wscript.sleep 100
    oshell.sendkeys "{up}"
    wscript.sleep 100
    oshell.sendkeys "{tab}"
    wscript.sleep 100
    oshell.sendkeys "{tab}"
    wscript.sleep 100
    oshell.sendkeys "{down}"
    wscript.sleep 100
    oshell.sendkeys "{down}"
    wscript.sleep 100
    oshell.sendkeys "{tab}"
    wscript.sleep 300
    oshell.sendkeys " "
    wscript.sleep 100
    oshell.sendkeys "{tab}"
    wscript.sleep 100
    oshell.sendkeys "{tab}"
    wscript.sleep 100
    oshell.sendkeys "{enter}"
    wscript.sleep 500
    oshell.sendkeys "%{F4}"

     

     

     

    Thursday, August 2, 2007 4:49 AM
  •  

    Hi Tic1745,

     

    Thank you for JC’s input and sharing.

     

    Based on design of Windows Disk Protection’s API, turning on/off it with script is currently not supported. However, we can query/change the current mode for Windows Disk Protection (WDP) after it is enabled manually.  Please refer to the following threads:

     

    Steadystate disk protection script?

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

     

    Managing Windows Disk Protection through Active Directory Managing Windows Disk Protection through Active Directory

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

     

    Best Regards,

    Thursday, August 2, 2007 8:32 AM

All replies

  •  

    I have tired both vbscript and AutoIt to automate turning on disk protection without successes.  I’m able to get it all the way to the point that it creates the cache file and starts to install the driver but then aborts with Disk Protection was not successfully installed with no details about why.  What is odd is I can send the same Keyboard commands by hand and everything works.

     

    The turning on the Auto Updates using AutoIt works with no problems though and I can post a copy of that script for you.

    Wednesday, August 1, 2007 12:04 PM
  • This is a sloppy vbscript.  The real downside to doing this type of automation is it assumes everything is at a set point every time the script starts but it should give you the general idea.  This being MS’s forum, figured I’d use their technology.    There are other scripting languages out there better suited for this task.

     

    Code Snippet

     

    set oshell=createobject("wscript.shell")
    oshell.run """C:\Program Files\Windows SteadyState\SCTUI.exe"""
    oshell.appactivate "Windows SteadyState"
    wscript.sleep 600
    oshell.appactivate "Windows SteadyState"
    wscript.sleep 600
    oshell.sendkeys "{tab}"
    wscript.sleep 100
    oshell.sendkeys "{tab}"
    wscript.sleep 100
    oshell.sendkeys "{tab}"
    wscript.sleep 100
    oshell.sendkeys "{tab}"
    wscript.sleep 100
    oshell.sendkeys "{tab}"
    wscript.sleep 100
    oshell.sendkeys "{enter}"
    wscript.sleep 600
    oshell.sendkeys "{tab}"
    wscript.sleep 100
    oshell.sendkeys "{up}"
    wscript.sleep 100
    oshell.sendkeys "{tab}"
    wscript.sleep 100
    oshell.sendkeys "{tab}"
    wscript.sleep 100
    oshell.sendkeys "{down}"
    wscript.sleep 100
    oshell.sendkeys "{down}"
    wscript.sleep 100
    oshell.sendkeys "{tab}"
    wscript.sleep 300
    oshell.sendkeys " "
    wscript.sleep 100
    oshell.sendkeys "{tab}"
    wscript.sleep 100
    oshell.sendkeys "{tab}"
    wscript.sleep 100
    oshell.sendkeys "{enter}"
    wscript.sleep 500
    oshell.sendkeys "%{F4}"

     

     

     

    Thursday, August 2, 2007 4:49 AM
  •  

    Hi Tic1745,

     

    Thank you for JC’s input and sharing.

     

    Based on design of Windows Disk Protection’s API, turning on/off it with script is currently not supported. However, we can query/change the current mode for Windows Disk Protection (WDP) after it is enabled manually.  Please refer to the following threads:

     

    Steadystate disk protection script?

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

     

    Managing Windows Disk Protection through Active Directory Managing Windows Disk Protection through Active Directory

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

     

    Best Regards,

    Thursday, August 2, 2007 8:32 AM
  • I ran into this problem last year as well and was able to solve it through a creative script similar to the one posted above.  Fortunately now Grisoft provides the necessary scripts on its tools page.

     

    http://www.avg.com/download-tools

    Wednesday, September 17, 2008 5:07 PM