How to lock the PC after automatically running Quick Test Professional scripts?
Being a graphical interface record-playback automation tool, Quick Test Professional makes wonders enabling the professionals to work with any web, java or windows client application. Ranging from testing standard web pages, web objects, and ActiveX controls. Quick Test Professional (Quick Test Professional) also enables to test Java applets and applications and multimedia objects on Applications as well as standard Windows applications, Visual Basic 6 applications and .NET framework applications…
Interactive Testing tool
Quick Test Professional is a revolutionary testing tool that is powered with Mercury Interactive Functional Testing. For instance, Mercury QTP provides the industry’s best solution for functional test and regression test automation – addressing every major software application and the environment. This next-generation automated testing solution deploys the concept of Keyword-driven testing to radically simplify test creation and maintenance. Unique to QTP’s Keyword-driven approach, test automation experts have full access to the underlying test and object properties, via an integrated scripting and debugging environment that is round-trip synchronized with the Keyword View.
![]()
The most important advantage of Automation Testing is that Scripts are run in an unattended mode. It allows the tester to prepare the batch of scripts and leave their homes. Once the batch scripts are successfully completed running, no matter even if it passes or even get failed, the PC is unlocked inviting others to view your secret project related data. Sometimes, this could pose a security issue or efficiently issue in an organization. However, it can become an extremely devastating issue in a case of a company having Finance or Banking related projects, having top most concern for the security of its data. Here are some simple tricks to lock the PC once the scripts are over.
You can use the following Quick Test Professional Script to Lock your PC :
Set obj = CreateObject("WScript.Shell")
sCmnd = "%windir%\SYSTEM32\rundll32.exe user32.dll,LockWorkStation"
obj.Run sCmnd, 0, False
The above Quick Test Professional Script will lock your PC automatically. Moreover, I will suggest you create this Script as a separate Script and call this Script lastly in your batch. This will solve the purpose.
Find a course provider to learn QTP
Java training | J2EE training | J2EE Jboss training | Apache JMeter trainingTake the next step towards your professional goals in QTP
Don't hesitate to talk with our course advisor right now
Receive a call
Contact NowMake a call
+1-732-338-7323Enroll for the next batch
QTP Training coures and Certification
- Nov 3 2025
- Online
QTP Training coures and Certification
- Nov 4 2025
- Online
QTP Training coures and Certification
- Nov 5 2025
- Online
QTP Training coures and Certification
- Nov 6 2025
- Online
QTP Training coures and Certification
- Nov 7 2025
- Online
Related blogs on QTP to learn more

Why QTP is the best functional/regression testing tool?
Quick Test Professional (QTP) is nothing but a simple and Windows based software application that is used as a testing tool to check the applications developed for web and desktops. Software testers learn QTP

Seamless testing with the help of QTP!
QTP (Quick Test Professional) is a tool for testing the functionality of software as an automated process. As soon the script is developed, software tester can seamlessly perform this automated functionality testing and generate the report.

QTP- Is It The Right Choice For You?
QTP is the acronym of Quick Test Professional. It is a product of Hewlett Packard (HP). QTP helps testers to execute an automated functional testing flawlessly without examining after the completion of script development.

How To Manage Test Data in QTP Test Scripts?
Well, QTP is the acronym of Quick Test Professional. It is an automation testing tool. In 2011, QTP was released as a product under the UFT (Unified functional Test Software). QTP is one of the popular automation tools available in the market. The be
Latest blogs on technology to explore

Cyber Security in 2025: The Golden Ticket to a Future-Proof Career
Cyber security jobs are growing 35% faster than any other tech field (U.S. Bureau of Labor Statistics, 2024)—and the average salary is $100,000+ per year! In a world where data breaches cost businesses $4.45 million on average (IBM, 2024), cyber secu

SAP SD in 2025: Your Ticket to a High-Flying IT Career
In the fast-paced world of IT and enterprise software, SAP SD (Sales and Distribution) is the secret sauce that keeps businesses running smoothly. Whether it’s managing customer orders, pricing, shipping, or billing, SAP SD is the backbone of sales o

SAP FICO in 2025: Salary, Jobs & How to Get Certified
AP FICO professionals earn $90,000–$130,000/year in the USA and Canada—and demand is skyrocketing! If you’re eyeing a future-proof IT career, SAP FICO (Financial Accounting & Controlling) is your golden ticket. But where do you start? Sulekha IT Serv

Train Like an AI Engineer: The Smartest Career Move You’ll Make This Year!
Why AI Engineering Is the Hottest Skillset Right Now From self-driving cars to chatbots that sound eerily human, Artificial Intelligence is no longer science fiction — it’s the backbone of modern tech. And guess what? Companies across the USA and Can

Confidence Intervals & Hypothesis Tests: The Data Science Path to Generalization
Learn how confidence intervals and hypothesis tests turn sample data into reliable population insights in data science. Understand CLT, p-values, and significance to generalize results, quantify uncertainty, and make evidence-based decisions.

What Is a Security Classification Guide in Cybersecurity?
A Security Classification Guide (SCG) defines how to categorize information assets by sensitivity, with clear instructions from authorized officials to ensure consistent, compliant data handling.

Artificial Intelligence – Field of Study
Explore how Artificial Intelligence blends Machine Learning, Deep Learning, NLP, and Computer Vision to build intelligent systems that learn, reason, and decide. Discover real world applications, ethics, and booming career scope as AI education deman

Understanding Artificial Intelligence: Hype, Reality, and the Road Ahead
Explore the reality of Artificial Intelligence (AI) — its impact, how it works, and its potential risks. Understand AI's benefits, challenges, and how to navigate its role in shaping industries and everyday life with expert training programs

How Much Do Healthcare Administrators Make?
Discover how much healthcare administrators make, the importance of healthcare, career opportunities, and potential job roles. Learn about salary ranges, career growth, and training programs with Sulekha to kickstart your healthcare administration jo

How to Gain the High-Income Skills Employers Are Looking For?
Discover top high-income skills like software development, data analysis, AI, and project management that employers seek. Learn key skills and growth opportunities to boost your career.