QTP scripts fail to execute when the system is locked/minimized. In order to make your script work when the remote machine on which you are executing is minimized, you can read one of my posts – https://learn2automate.wordpress.com/2013/11/07/how-to-run-qtp-script-in-minimized-mode/
Now that “minimized” is taken, lets take on “locked” ! There are two ways which I use to prevent system unlock, the first one is :-
1. Using a Third Party tool called Caffeine – This is a simple exe which prevents your system from getting unlocked by simulating certain events. It can be downloaded from – http://www.zhornsoftware.co.uk/caffeine/index.html#download
2. Using Registry to disable locking of the Workstation – I feel that this is the most effective way to do this. This is how you can set this up :-
Open up regedit.exe through the start menu search box, and then browse down to the following key, creating it if it doesn’t exist:
On the right-hand side, create a new DWORD 32-bit value named DisableLockWorkstation and give it one of these values:
- 1 – Disable Lock Workstation
- 0 – Enable Lock Workstation
The changes should be immediate, no need to restart anything.
Happy Automating !
Categories: Awesum Stuff