Find the answer to your Linux question:
Results 1 to 2 of 2
Hello, I was recently working on a script & couldnt figure out how to address the fact of the following. Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run "certmgr.msc",1 , true WshShell.AppActivate "certmgr" ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2012
    Posts
    3

    Wsh Script Help would be appreciated


    Hello, I was recently working on a script & couldnt figure out how to address the fact of the following.

    Set WshShell = WScript.CreateObject("WScript.Shell")
    WshShell.Run "certmgr.msc",1 , true
    WshShell.AppActivate "certmgr"
    WScript.Sleep 1000
    WshShell.SendKeys "{RIGHT 3}"
    WScript.Sleep 1000
    WshShell.SendKeys "{TAB}"
    WshShell.SendKeys "^A"
    WshShell.SendKeys "{DEL}"
    WshShell.SendKeys "{ENTER}"
    WScript.Sleep 1000
    WshShell.SendKeys "%fx"

    SendKeys will work to simulate keystrokes If I use a sleep Delay, but I was wondering how I could avoid using soo many sleep commands, . This will allow me to automatically clear personal store certificates in certmgr.exe & make things efficent on a slow machine if it happens.

    Thank You. Any Help would be appreciated.
    Last edited by dsmtaylor007; 06-07-2014 at 12:04 AM.

  2. #2
    Linux Engineer docbop's Avatar
    Join Date
    Nov 2009
    Location
    Woodshed, CA
    Posts
    941
    WSH == Windows Scripting Host and this is a forum for Linux and Linux/Unix related topics.

    Here's the MS home for WSH:
    Windows Script Host
    A lion does not lose sleep, over the opinion of sheep.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •