Author Topic: System Lockout API  (Read 3691 times)

Offline test king

  • Sr. Member
  • ****
  • Posts: 320
  • Software Engineer
System Lockout API
« on: April 02, 2009, 06:14:28 am »
hi Tarun,

I have downloaded system Lockout API and the format of the tool was KInbox_SystemLockoutAPI.msi. I have double clicked and installed the tool and i was able to view Interval and Prevent lockout in the expert view.

Now to prevent the screen saver to be displayed in my system at the interval of 10 minutes. I have pasted the following lines of codes and saved it in the extension.vbs and added into the File->Settings-> Resource tab

These are the following lines of code present in the resource tab(only three lies of code is there in vbs file)

Set oPreventSystemLock = CreateObject("KnowledgeInbox.SystemLockout")
oPreventSystemLock.PreventLockout = True
Set oPreventSystemLock = Nothing

After that i have called specifically this line of code (SystemLockout.PreventLockout=True)at the beginning of script and started executing the script and below this my script follows. But again i was able to view the screen saver at the interval of 10 minutes why??

I am using remote desktop all the software is installed in the remote and i am accessing everything from remote.

Let me know where i am going wrong. ??? :'(

Thanks
testking123
« Last Edit: April 02, 2009, 06:19:18 am by testking123 »

Offline Tarun Lalwani

  • Administrator
  • Hero Member
  • *****
  • Posts: 3029
    • KnowledgeInbox
Re: System Lockout API
« Reply #1 on: April 04, 2009, 05:35:55 am »
There is a DLL on the system in the "C:\Program Files\KnowledgeInbox\" folder for SystemLockout folder.

Register that DLL using

RegSvr32 "<DLLPath>"

Regards,
Tarun
KnowledgeInbox Administrator

KnowledgeInbox" style="border:0

Offline test king

  • Sr. Member
  • ****
  • Posts: 320
  • Software Engineer
Re: System Lockout API
« Reply #2 on: April 07, 2009, 12:36:37 am »
hi Tarun,

As you said i can find Dll in this path C:\Program Files\KnowledgeInbox\SystemLockout API, but really don't know where and how to register the dll. I am totally confused please help me out. :'(

Thanks


Offline Tarun Lalwani

  • Administrator
  • Hero Member
  • *****
  • Posts: 3029
    • KnowledgeInbox
Re: System Lockout API
« Reply #3 on: April 07, 2009, 02:32:46 am »
go to windows run window and type the below command

regsvr32 "<CompleteDLLPath>"
Regards,
Tarun
KnowledgeInbox Administrator

KnowledgeInbox" style="border:0

Offline test king

  • Sr. Member
  • ****
  • Posts: 320
  • Software Engineer
Re: System Lockout API
« Reply #4 on: April 09, 2009, 03:08:07 am »
hai Tarun,

Set oPreventSystemLock=CreateObject ("KnowledgeInbox.SystemLockout")
oPreventSystemLock.Interval =3600000
oPreventSystemLock=True

I have used these lines at the top of the script but a blank screen is displayed at the interval of 20 minutes. Again i have to click on Esc key.

Let me know where i am going wrong

Thanks
testking123


Offline Tarun Lalwani

  • Administrator
  • Hero Member
  • *****
  • Posts: 3029
    • KnowledgeInbox
Re: System Lockout API
« Reply #5 on: April 09, 2009, 03:29:10 am »
Did you do that in a Action or your main library?
Regards,
Tarun
KnowledgeInbox Administrator

KnowledgeInbox" style="border:0

Offline test king

  • Sr. Member
  • ****
  • Posts: 320
  • Software Engineer
Re: System Lockout API
« Reply #6 on: April 09, 2009, 04:07:55 am »
hi Tarun,

I  have written those lines of code in my action.

Thanks
testking123

Offline Tarun Lalwani

  • Administrator
  • Hero Member
  • *****
  • Posts: 3029
    • KnowledgeInbox
Re: System Lockout API
« Reply #7 on: April 09, 2009, 04:23:20 am »
It should be in a associated library file
Regards,
Tarun
KnowledgeInbox Administrator

KnowledgeInbox" style="border:0

Offline Tarun Lalwani

  • Administrator
  • Hero Member
  • *****
  • Posts: 3029
    • KnowledgeInbox
Re: System Lockout API
« Reply #8 on: April 09, 2009, 04:24:23 am »
Actually you can better put that code in a external VBS file and run it. Write a infinite loop in the file so that the Script does not finish. This will run the code external to QTP and not let machine get locked at all
Regards,
Tarun
KnowledgeInbox Administrator

KnowledgeInbox" style="border:0

Offline test king

  • Sr. Member
  • ****
  • Posts: 320
  • Software Engineer
Re: System Lockout API
« Reply #9 on: April 09, 2009, 04:27:15 am »
Hai Tarun,

I am attaching the those three lines in to functional library,will execute and let you know.

Thanks
testking123

Offline test king

  • Sr. Member
  • ****
  • Posts: 320
  • Software Engineer
Re: System Lockout API
« Reply #10 on: April 09, 2009, 05:59:39 am »
Hai Tarun,

Used these lines of code at function library

Set oPreventSystemLock=CreateObject ("KnowledgeInbox.SystemLockout")
oPreventSystemLock.Interval =36000000
oPreventSystemLock=True

I have created the above given lines as a function and then called in my script. But again screen saver is displayed at the interval of 20 minutes.

Thanks
testking123
« Last Edit: April 09, 2009, 07:06:04 am by testking123 »

Offline Tarun Lalwani

  • Administrator
  • Hero Member
  • *****
  • Posts: 3029
    • KnowledgeInbox
Re: System Lockout API
« Reply #11 on: April 09, 2009, 08:39:10 pm »
Try setting a lower interval. Set it to 1000

This interval is not for how much the screen saver takes. It is after what interval a dummy key event has to be thrown.
Regards,
Tarun
KnowledgeInbox Administrator

KnowledgeInbox" style="border:0

Offline test king

  • Sr. Member
  • ****
  • Posts: 320
  • Software Engineer
Re: System Lockout API
« Reply #12 on: April 15, 2009, 04:48:56 am »
Hi Tarun,

I have tried setting interval time to 1000, but no luck for me this time too. Blank screen is displayed at the interval of 20 minutes. Please let me know where i am going wrong.

Thanks
testking123

Offline test king

  • Sr. Member
  • ****
  • Posts: 320
  • Software Engineer
Re: System Lockout API
« Reply #13 on: April 16, 2009, 12:26:02 am »
hai Tarun,

Need your guidance for this issue waiting for your guidance.

Thanks
testking123

Offline Tarun Lalwani

  • Administrator
  • Hero Member
  • *****
  • Posts: 3029
    • KnowledgeInbox
Re: System Lockout API
« Reply #14 on: April 16, 2009, 01:06:22 am »
Will take a look
Regards,
Tarun
KnowledgeInbox Administrator

KnowledgeInbox" style="border:0