Link to home
Start Free TrialLog in
Avatar of Roger Pray
Roger Pray

asked on

Change Lock Program on Windows PC

We have a third part piece of software that is part of our SSO product, when staff lock the computer using the SSO software there are no issues, but when we use the windows native lock using either CAD and choosing lock or hitting WindowsKey-L, when the staff member unlocks the PC and goes back in a second copy of our primary software will launch.  This software is only licensed and configured to run once on any given PC and it will cause errors to appear on the screen.

Is there a way that anyone knows of to change the functionality of CAD/Lock and WindowsKey-L to lock the computer so that it will be redirected to the application that is part of our SSO product to lock the device.

Thank you.
Avatar of John
John
Flag of Canada image

The Windows Lock function in Windows 10 works properly and has been well implemented.

Have you asked the Software Vendor for an updated Version. Software need to adapt to Windows 10, not the other way round.
Avatar of Shaun Vermaak
redirected to the application that is part of our SSO product to lock the device.
That requires a hook to these APIs
If you really want a one-off test, then the answer here uses OpenDesktop() and SwitchDesktop() to open a handle to the default desktop and activate it - if this fails then it's a good sign that the desktop is locked right now.

If you want notification on lock/unlock, and you have a user-mode application with a window and a message pump, then you need to call WTSRegisterSessionNotification() and catch the WM_WTSSESSION_CHANGE message.

If you want notifications, and you're running as a Windows service, then you can register for session change events by calling SetServiceStatus() and adding SERVICE_ACCEPT_SESSIONCHANGE to dwControlsAccepted in your status structure. You will then receive callbacks to your own service control HandlerEx() function with dwControl set to SERVICE_CONTROL_SESSIONCHANGE.
https://stackoverflow.com/questions/768314/detect-if-desktop-is-locked?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
ASKER CERTIFIED SOLUTION
Avatar of Roger Pray
Roger Pray

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Roger Pray
Roger Pray

ASKER

we found a work around that resolved the issue we were experiencing, by using AutoIT my team member was able to create an easily importable file that we could distribute to the specific devices impacted by the issue.