VBS run sendKeys command to systempropertiesprotection menu

user2559533 Source

I trying to get a vbs to open "System properties protection" windows. Then run the Sendkeys command to Configure button. The script open the System Properties protection fine. But same its not getting the sendkeys sent to to. The echo box does popup. But, doesn't see to go to the configure button and open it. I hope someone out there can help me with it. It look like the script is not accessing the System Properties protection window.

 Option Explicit
 Dim WshShell:Set WshShell=CreateObject("Wscript.Shell")
 WshShell.run "systempropertiesprotection"
    Wscript.Sleep 1000
    WshShell.SendKeys ("{tab}")
    WshShell.SendKeys ("{tab}")
    WshShell.SendKeys ("{~}")
    Wscript.echo "Open"


answered 2 years ago HelpingHand #1

Try running your script from an administrative command prompt.


set s=createobject("wscript.shell")
s.run "systempropertiesprotection"
wscript.Sleep 500
s.sendkeys("{tab} 2")
s.sendkeys("{ }")

... works for me when launched in this way.

comments powered by Disqus