Solved

a script to unlock a computer remotely

Posted on 2004-08-19
5
2,092 Views
Last Modified: 2012-06-27
i am trying to write a script to unlock a computer remotely but i have encountered a major setback.... i can't find a command to unlock even a local computer. the effect i am trying to produce is something along the lines of:

1. notify user of the updates and workstation lock
2. lock computer
3. perform tasks without fear of user interuption
4. unlock computer

this "notice" will run as a sub of a main script that does the actual work.
if anyone knows the command to unlock a system you would be my official hero.  also if anyone can let me know how to bypass waiting for a user response on the popup window (without making it run from yet another script) that would rock.  

what i'm working off of is:

-------

set WshShell = CreateObject("WScript.Shell")
Set WshShell = WScript.CreateObject("WScript.Shell")
 
WSHShell.Popup " READ ME! UPDATE NOTICE! " & vbnewline & "" & vbnewline & " Your system is currently being updated in an effort to protect your computer. " & vbnewline & " Do not attempt to use the computer until this process is complete." & vbnewline & " You will be prompted to login as usual once the updates have finished. " & vbnewline & "" & vbnewline & " Thank you for your cooperation. ", 15, "Your system is being locked for updating. "

WshShell.Run("rundll32 user32.dll,LockWorkStation ")

-------

there's an extra 300 available if you can answer both questions
0
Comment
Question by:3v1lj1m
5 Comments
 
LVL 4

Expert Comment

by:nagraves
ID: 11848154
Here is something in VB6:

http://www.vb-helper.com/howto_lock_computer_trap_mouse.html

It seems to keep users from doing anything outside of the form. So have the for pop up with nothing to do in it, run your update script, when script is done have it close form. Hope it helps
0
 
LVL 3

Author Comment

by:3v1lj1m
ID: 11852667
the main problem with that is that the script has to validate to the server and therefore has the username and password which, needless to say, we don't need the end user seeing.  that's why i want to use the lock function, the only problem being that we have no way to unlock via the script.
0
 
LVL 2

Expert Comment

by:zonaltech
ID: 11854530
Are you asking to Log-In in an automated fashion? To my knowledge you can't "un-lock" a locked workstation.  Once you lock a workstation, the User/Pass must be re-entered via Control-Alt-Delete for security purposes.
0
 
LVL 49

Accepted Solution

by:
DanRollins earned 500 total points
ID: 11858152
0
 
LVL 3

Author Comment

by:3v1lj1m
ID: 11864556
looks like i'm out of luck on unlocking the workstation. thanx for the backup info on the links mr Dan.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question