Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unlock computer programmatically?

Status
Not open for further replies.

JustLJ

MIS
Oct 15, 2002
70
US
Greetings all!

I am looking for a way to programmatically unlock a workstation from a MS Access application.

Scenario: workstation is locked (Ctrl-Alt-Del/lock computer) and this application would be run from scheduler in background to “log in” as the person to unlock the computer, allowing some application updates to run (some of which require Outlook to email some things and with the Outlook anti-email-sending object model guard, the workstation must be unlocked – and no, we can’t use Redemption and I don’t want to go through that discussion with you!).

So, I was wondering if there are Windows objects that could be controlled via code (VB/VBA?) to unlock the computer (and ideally, re-lock after completion using the rundll.exe user32.dll LockWorkStation function). I’m thinking having the password in a table, so as it is changed on the computer, the user can update this table so the unlocking can still occur nightly.

Am I chasing a dream or is this doable? The reason I would think it’s doable is because surely someone creating a new lockable screensaver would be needing to tap into the Windows objects to unlock…

Thanks!
LJ

 
LJ,

Maybe I am missing something here, BUT why do you need to Unlock the workstation????? If the user is logged in and the workstation is "locked" the applications are still "running". Locking of a workstation does not log the user out of the network (etc.). Have your scheduled job process using Outlook (or whatever) as you need.


As I said maybe I am missing something from your explanation...

 
HiTech:
I want to do this because we have database updating and reporting that starts at 0300 and needs to email reports. The workstations are locked via corporate group policy. Because of the object model guard, Outlook puts up the "a program is trying to send on behalf of..." and so things like PTFB or ClickYes can't respond to the message to allow Outlook to send. We are not allowed to disable the group policy nor are we allowed to run substitute applications, like Redemption.

Therefore, I was trying to play around with writing something that could be kicked off with the scheduled update (which happens fine in background with the WS locked) so that the workstation would be unlocked for the 45 minutes that the reports generate and ship out.

So, back to the question I asked. Anyone know of a way to reference the proper windows objects to unlock a workstation programmatically?

Thanks.
LJ

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top