Sign in to follow this  
Followers 0
rahuroy

ScreenCapture_Capture function doesn't work on a locked workstation

7 posts in this topic

I have written installation scripts and use scripts to install application on remote machines using psexec.I am capturing screenshot if any error window pop up during installation.But this funtion works fine if Machine is opened and session is active.But ScreenCapture_Capture function doesn't work on a locked workstation..Any workarounds ? Below is snippet of code where i am taking snapshot

OnAutoItExitRegister("Errorchk")

;Error handling function

AdlibRegister("Errorchk",25000)

Func Errorchk()

;... execution must be non blocking, avoid ...Wait(), MsgBox(), InputBox() functions

If WinExists("ERROR") Then

; Capture full screen

$hBmp = _ScreenCapture_Capture ("")

; Save bitmap to file

_ScreenCapture_SaveImage (@ScriptDir & "\Install.jpg", $hBmp)

_FileWriteLog($sLogPath,"ERROR:Installation failed due to error,Please refer screenshot for reason of failure")

_FileWriteLog($sLogPath,"------------END Installer Log-------------")

Exit 1

EndIf

EndFunc

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I tried using Lazy Cat Capt.dll but doesn't work on locked workstation.Any solution?

Edited by rahuroy

Share this post


Link to post
Share on other sites

Take a look here

@Whim:Thanks for info.But i am not using any winactive commands or send keys in my scripts

Share this post


Link to post
Share on other sites

I don't think you'll solve the problem.

Why do you lock the workstation?


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Unless I misunderstood above FAQ, it means you can't interact with any Window

Share this post


Link to post
Share on other sites

@Whim:Can interact with window but only scan capture function is not working.

@Xenobiologist:Workstations get locked automatically after 30 min of inactivity.i have to run install application scripts on several remote machines, i wanted to capture screenshot if there are any failures.I am using psexec to run scripts on remote machines.

Any idea or workaround?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0