12-21-2013 07:47 AM
Hi,
I am trying to create simple VI which will turn off the monitor (or turn on screensaver) and block input from mouse and keyboard - so user will not be able to see the display and make any action. I am using system32.dll to do that.
My problem is that when my VI turn off the monitor, user can turn it back again by simply moving mouse or using keyboard, even that these devices are blocked (by function BlockInput from System32.dll).
How can i make ultimate freeze?
Attached VI is based on Danny_Funk "Turn off monitor.vi".
Solved! Go to Solution.
12-21-2013 08:39 PM
Why do you want to do this?
It sounds like you want a PC to just lock up and you force someone to pull the cord to get it to reboot?
12-22-2013 02:11 AM
ctrl+alt+del to restore control. I need that to force to fair competition in programming championships.
12-23-2013 03:06 AM
Dear bieneck,
That is a very interesting problem you've got there. I've been snooping around Microsoft's support for a bit, and the only reasonably simple method I found was running powercfg.exe from an elevated comand line. You can query wake programmable devices with powercfg -devicequery wake_programmable, and the disable them using powercfg -devicedisablewake "Name of your device". Here you can find some more detailed documentation.
Save that, I could not find any reliable method that spares you excessive digging in the registry. Maybe some 3rd-party tool?
One additional thing: If your goal is to stop the user from interacting with anything, would not it be easier just to pop up a big modal window that does not allow bypass? To me at least, this seems a whole lot more staightforward to using a Windows native function that is not at all intended for this purpose.
Kind regards:
12-23-2013 05:04 AM
I forgot about modals Thanks ValkoA!