How to lock the computer after completion of script execution in QTP
The good thing about Automation Testing is that Scripts are run in an
unattended mode. Thus, what people usually do is, prepare the batch of
scripts and leave for their homes. After the batch gets over, no
matter even if it passes or even get failed, the PC is unlocked
inviting others to view your sensitive information related to your
project especially if it is Banking/Finance etc.,
Set obj = CreateObject("WScript.Shell")
sCmnd = "%windir%\SYSTEM32\rundll32.exe user32.dll,LockWorkStation"
obj.Run sCmnd, 0, False
The above QTP script will lock your PC automatically. Moreover, I will
suggest you to create this script as a separate script and call this
script lastly in your batch.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


On Tue, Mar 20, 2012 at 6:03 PM, Ganesh muralidharan
<[email protected]> wrote:
> QTP 11 supports minimized or locked machines via RDC -
> http://h30499.www3.hp.com/t5/Functional-Testing-QTP-Support/QTP-11-supports-running-tests-on-on-Minimized-RDP-Remote-Desktop/td-p/2406124
>
> http://www.sqaforums.com/showflat.php?Cat=0&Number=420045&page=0&fpart=all&vc=1
>
> http://www.softtreetech.com/24x7/archive/51.htm
>
> Are you using Windows Scheduler to trigger script execution?
>
>
> On Tue, Mar 20, 2012 at 5:48 PM, KRISHNA CHAITHANYA
> <[email protected]> wrote:
>>
>> Ganesh - Thank you very much for your quick response.
>>
>> Its my local machine. Actually we are developing a internal tool
>> for automation execution, in that process when we schedule a automation task
>> at any particular time , it had to start its execution.
>>
>> When it was unlocked stated working as expected , but when its in locked
>> state it is not able run the vb & mts scripts through QTP.
>>
>> We were using QTP 9.5.
>>
>> We had browsed in the google , but no use.
>>
>> any suggestions or work around for this.
>>
>> --
>> Thank you,
>>
>> Krishna Chaithanya Chinthakayala (Kris)  | Mobile: +91 9885066684
>>
>> --
>> You received this message because you are subscribed to the Google
>> "QTP - HP Quick Test Professional - Automated Software Testing"
>> group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/MercuryQTP?hl=en
>
>
>
>
> --
> Regards,
>
>
> Ganesh Muralidharan
> 'God Never Forgets'
>
> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en

-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

Reply via email to