?
Solved

lock workstation - run an application at the same time?

Posted on 2003-03-19
15
Medium Priority
?
331 Views
Last Modified: 2012-06-27
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
Comment
Question by:kwallace01
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 6
15 Comments
 

Expert Comment

by:sathishkumar_sri
ID: 8171190
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
 

Author Comment

by:kwallace01
ID: 8177665
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
 
LVL 44

Expert Comment

by:CrazyOne
ID: 8177712
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
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 

Author Comment

by:kwallace01
ID: 8177915
That'll work great. Thanks.
0
 
LVL 44

Expert Comment

by:CrazyOne
ID: 8178537
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
 

Author Comment

by:kwallace01
ID: 8178593
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
 
LVL 44

Expert Comment

by:CrazyOne
ID: 8178656
Ok does locked applied to a password protected screensaver?
0
 

Author Comment

by:kwallace01
ID: 8178772
Nope, the system won't be locked by the screensaver, just by winkey+L and ctrl-alt-del>"lock computer"
0
 
LVL 44

Expert Comment

by:CrazyOne
ID: 8178778
Okie dokie thanks that will make it a lot easier. :>)
0
 
LVL 44

Expert Comment

by:CrazyOne
ID: 8183289
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
 

Author Comment

by:kwallace01
ID: 8184539
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
 
LVL 44

Expert Comment

by:CrazyOne
ID: 8184644
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
 
LVL 44

Accepted Solution

by:
CrazyOne earned 2000 total points
ID: 8186793
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
 

Author Comment

by:kwallace01
ID: 8187583
That's perfect! Thanks!
0
 
LVL 44

Expert Comment

by:CrazyOne
ID: 8187902
You are welcome. :>)
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Can you find a fax from a vendor you saved a decade ago in seconds? Have you ever cursed your PC under your breath during an audit because you couldn’t find the requested statement or driver history?  If you answered no to the first question or yes …
Sometimes people don't understand why download speed shows differently for Windows than Linux.Specially, this article covers and shows the solution for throughput difference for Windows than a Linux machine. For this, I arranged a test scenario.I…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

770 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