This utility is now updated to auto prevent at startup.
This utility is developed to prevent windows from locking during executions of automated test cases.
Below is the link to download this utility
Windows lock prevention utility
Prevent Windows from locking
To prevent windows from locking during executions, download the utility and run the .exe file.
Click on the prevent lock button. You will see the message “Windows Lock Prevented”. Utility should be minimized and running for preventing windows from locking.
Once the executions are done and you want to resume the windows locking, then you can either click on the resume or close the application.
How it works
This utility will not send any key strokes/mouse movements. This utility will also not edit registry keys on the system.
When you click on the “prevent lock” button, this utility will send message to windows operating system that the current program needs system to be awake and unlocked. Basically this will have the same effect when you play a movie, the only difference is that we are not playing any movie. So as soon as you will close app, windows will resume locking the system.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SUMEET SINGH KUSHWAH or SUMEETKUSHWAH.COM BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Let me know, if you have any questions/concerns.
Interesting utility. Usually the reason a system falls asleep during an automated test run is that the mouse is not moving.
Just moving the mouse one pixel from it’s current location and back again should keep the system awake during the run as well. Most automation frameworks have an itterive loop or a commonly called function where this could be inserted.
I provide this as an alternative for clients who may have security policies in place that allow only in-house developed code to run on their systems.
LikeLiked by 1 person
I was using the same kind of functionality to keep the system awake during the executions, moving the mouse one pixel. But, when i actually started the executions using Jenkins (CI) system, sometimes due to delay in moving from one test to another, remote machines were getting locked and at that point of time UFT was not running to take care of moving the mouse.
Also, i didn’t want to implement the iterative loop within external vbs to move the mouse because it will consume the system resources and might interfere with the executions.
This solution works fine with the security policies, because this will not try to change anything within the system. No registry editing or anything else. You also dont need any admin rights/installation to run this program, so you don’t need any changes to the system to run this program.
Is there an option to run this tool from commandline and have it automatically prevent locks at startup?
I am working on an update to give you the option to Auto prevent lock on startup, I will upload the new code by today evening.
Sumeet Singh Kushwah
Hello Sumeet, did I completely miss the update or something gone wrong?
How about the possibility to auto prevent on startup?
Hi Sumeet, do you have an update for this (with the Auto prevent lock on startup). Thanks.
Please download the utility again. I have updated the utility.