rahuroy Posted February 16, 2011 Share Posted February 16, 2011 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 EndIfEndFunc Link to comment Share on other sites More sharing options...
rahuroy Posted February 16, 2011 Author Share Posted February 16, 2011 (edited) I tried using Lazy Cat Capt.dll but doesn't work on locked workstation.Any solution? Edited February 16, 2011 by rahuroy Link to comment Share on other sites More sharing options...
whim Posted February 16, 2011 Share Posted February 16, 2011 Take a look here Link to comment Share on other sites More sharing options...
rahuroy Posted February 16, 2011 Author Share Posted February 16, 2011 Take a look here@Whim:Thanks for info.But i am not using any winactive commands or send keys in my scripts Link to comment Share on other sites More sharing options...
Xenobiologist Posted February 16, 2011 Share Posted February 16, 2011 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 More sharing options...
whim Posted February 16, 2011 Share Posted February 16, 2011 Unless I misunderstood above FAQ, it means you can't interact with any Window Link to comment Share on other sites More sharing options...
rahuroy Posted February 16, 2011 Author Share Posted February 16, 2011 @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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now