How to lock your system automatically

’If you want lock your sustem once your script running is done automatically just you call the below function.

‘If you want lick ur system(for manual users)save this function in a .VBS file and then give one double click.

Function Lock_Mysystem()

Dim oSys,Syscmd

Set oSys = CreateObject("WScript.Shell")

Syscmd = "%windir%\SYSTEM32\rundll32.exe user32.dll,LockWorkStation"

oSys.Run Syscmd, 0, False

End Function
------------------------------------------------
Lock_Mysystem()'to call the function
Advertisement
Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.