Jump to content

ScreenCapture_Capture function doesn't work on a locked workstation


rahuroy
 Share

Recommended Posts

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

Link to comment
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

Link to comment
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?

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...