Created
March 6, 2019 13:28
-
-
Save navchandar/6dbdaf5024df44d875cda1b8f6e74fdd to your computer and use it in GitHub Desktop.
Revisions
-
navchandar created this gist
Mar 6, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ Set objShell = CreateObject("WScript.Shell") X = objShell.Popup("Delay Windows Locking?", 10, "WinUnlock", vbYesNo) Select Case X Case vbYes Do objShell.SendKeys ("{F15}") 'MsgBox("Pressed F15 Key") WScript.Sleep 5000 Loop Case vbNo 'MsgBox("Exiting...") With CreateObject("WScript.Shell") ' Pass 0 as the second parameter to hide the window... .Run "taskkill /f /im Cscript.exe", 0, True .Run "taskkill /f /im wscript.exe", 0, True End With End Select