• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to unlock PC with Username & Password using VBA.

Nitesh Khot

Member
Hi....

Alway when we run macros and lock computer then macro not running...Using system windows7 and Excel 2007 and Internet Explorer 8.

I want macro code to Unlock PC using username password and then auto lock after my macro sucessfully run.

or

If any one have solution to run macro while screen lock pls assist.

Thanks in advance...

Nikh
 
Hi Nikh,

I'm not sure if what you asked is possible with VBA, but if it was, I would be very afraid. What you've described involves a macro gaining access to the computers operating system security and bypassing it, then locking itself, thereby leaving no trace that it ran. Such a power could be used for VERY malicious purposes. :eek:

IMO, if you really have a macro that takes that long, you can simply change the power settings so that there's no lock out/screen saver.
 
Hi Luke Sir..,,

Thanks for reply....

Is any other way to use sendkeys while screen lock...as I have created macro to download file from IE 8 everything is fine but when I lock computer and Macros is running behind lock screen Then IE File Save Download box not working (Sendkeys not accepting)...Is there any other method or code to work fine..

Thanks
Nikh
 
Hi Nikh,

AFAIK - What you are looking for is impossible. You will need the computer to be unlocked.

Work around is to use Windows PowerShell script to log in as user, along with Command line batch file to open your Excel file and to run the Macro. And after certain time or certain check is passed, use PowerShell to force log out from computer.

Without knowing your exact network setup, it's hard to say. But typically you will need to get your IT team involved to set things up as it will require Administrator level privileges.

Personally, I'd go with Luke's suggestion and keep the user logged in and computer unlocked for the duration (preferably in an office where you can lock door).
 
Back
Top