’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