Skip to content

Instantly share code, notes, and snippets.

@tubone24
Created January 15, 2021 12:59
Show Gist options
  • Save tubone24/1e7d036f34cb26d28ab278ea0cc370d8 to your computer and use it in GitHub Desktop.
Save tubone24/1e7d036f34cb26d28ab278ea0cc370d8 to your computer and use it in GitHub Desktop.
会社支給PCの自動ロックを無効にするVBスクリプト
Set sh = CreateObject("WScript.Shell")
dim runMsg
runMsg = "Run PuruPuru"
wscript.echo runMsg
If WScript.arguments.Count = 0 Then
sh.Run "cmd /K " & "cscript """ & WScript.ScriptFullName & """ 1", 1
Else
While True
sh.SendKeys "+" 'Shiftキーを押す
wscript.echo runMsg
'60秒待つ
WScript.Sleep 60 * 1000
Wend
End If
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment