• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 332
  • Last Modified:

lock workstation - run an application at the same time?

I want to have an application run in the background whenever I "lock workstation". I don't want to bind a shortcut key to a batch file to lock the workstation and launch the program, I want it to launch when the workstation is locked from any source. This can be a service or a program running in the background watching for the user to lock the workstation, or possibly a setting in the registry I don't know about. This is fairly urgent, so I'd like a soloution ASAP.

Thanks
0
kwallace01
Asked:
kwallace01
  • 8
  • 6
1 Solution
 
sathishkumar_sriCommented:
What you have said cannot be done using just the features of Windows XP itself. However you can write a small program in Visual Basic using the Windows API to check if the workstation is locked and then run the required program/process. I was facing the same problem sometime back and found the following article useful:

http://gethelp.devx.com/techtips/nt_pro/10_minute_solutions/10minNT0701.asp

Hope this helps you!
0
 
kwallace01Author Commented:
Hm. That looks like what I need, but I don't have a copy of VB. :( Would anyone be willing to write me a small app that does this or find a pre-made one?
0
 
CrazyOneCommented:
I am working one right now. I was trying to make it a service but it doesn't work the way I wanted to. This is going to be very basic and a bit crude. It will use the registry to house which program you want to run and the only configurable part will be to set which program you want to run. There will be an icon that sits in the tray.

And the only way to end it will be to kill it using the task manager.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
kwallace01Author Commented:
That'll work great. Thanks.
0
 
CrazyOneCommented:
I almost got it. Do you know if the system in question is going to be locked more then once. Or if is going to be locked more than once do you always want the program to run?
0
 
kwallace01Author Commented:
The system is going to be locked quite often, actually. I want the program to run any time it is locked, as it will terminate on its own before the workstation is unlocked.
0
 
CrazyOneCommented:
Ok does locked applied to a password protected screensaver?
0
 
kwallace01Author Commented:
Nope, the system won't be locked by the screensaver, just by winkey+L and ctrl-alt-del>"lock computer"
0
 
CrazyOneCommented:
Okie dokie thanks that will make it a lot easier. :>)
0
 
CrazyOneCommented:
Ok here is a beta version.

To run it at startup place in the startup folder or use the or

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run


HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run

To to tell it which program to run right click on the Tray Icon and select Configure

This is the registry key that it uses
HKEY_CURRENT_USER\Software\CAPC\Run App Locked computer
Programs

http://www.geocities.com/eecrazyone/crazyone.html
scroll down near the bottom to
Run App When Computer Locked
and click on it.
0
 
kwallace01Author Commented:
Cool, that works great. There is one issue I have with it, which shouldn't be too hard to fix. I'd like it to check if the computer's locked every 5 seconds, and it looks like it is currently 10-15. Maybe you could add that to the configuration dialog?
0
 
CrazyOneCommented:
Ok sounds like a good idea. It is currently set at 30 seconds so as if somebody does ctrl-alt-del it appears to the program that the computer is locked but the user just might be wanting to get to the task manager instead. However it makes sense to make this configurable so I should have something in the next few hours an no later than this time tommorrow.

By the way I have three other utilities I have put together on that page so if you have time take a look at them and see what you think about them I would aprecaite it. If you don't want to or don't have the time then I understand. But if you know anybody that may find them useful then let them know about the utilities, they are all free. :>)

Registry Backup
Flip Startup Items
Shutdown/Restart
0
 
CrazyOneCommented:
Ok I fixed it so one can set the delay in seconds to the way they would like. Min is 5 seconds Max is 300 seconds the Default is 15 seconds.

When you open the configuration window I think it will be obvious how to set the delay. Eventually I will refine the whole thing and tidy it up a bit and when I do I will post here and/or you can periodically check the web page for updates. I will put a date and/or version number by the link so you can tell if there is an update.
0
 
kwallace01Author Commented:
That's perfect! Thanks!
0
 
CrazyOneCommented:
You are welcome. :>)
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 8
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now