In my previous post, I created test button on Login Screen changer GUI, when you clicked on them it lock your workstation.
I got few queries that which code I used behind the above Test button. I used the below code to lock the workstation.
$shell = New-Object -com "Wscript.Shell"
$shell.Run("%windir%\System32\rundll32.exe user32.dll,LockWorkStation")
Just shoot the above code and when you paste the last line, you computer will be locked.
I found it cool! i hope you may also like it.
Aman Dhally
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.