VBS Windows 7 Lock Workstation

Nel caso si voglia richiamare in uno script la funzionalità di “Blocca il computer” è

possibile utilizzare il seguente comando:

%windir%\System32\Rundll32.exe user32.dll,LockWorkStation

Per esempio uno script vbs può essere il seguente:

Dim WshShell, oExec 
Set WshShell = WScript.CreateObject("WScript.Shell") 
Set oExec = WshShell.Exec("%windir%\System32\Rundll32.exe user32.dll,LockWorkStation") 
This entry was posted in VBScript. Bookmark the permalink.