olo Posted July 5, 2013 Share Posted July 5, 2013 Well I tried to upload an exe file to see if anyone wants to try this for themselves. But basically once executed its prints 'abnormal termination'. Now you only see this message when you run it through command prompt. Its error level is 3. Otherwise when you click the exe and run it you normally dont see anything. Say I am running a program and get this type of error. Where would I go checking? Example: Say I run microsoft word and this error comes up.(you dont see it, but you know its there) Link to comment Share on other sites More sharing options...
orbs Posted July 5, 2013 Share Posted July 5, 2013 the executable name and the exit code (a.k.a. errorlevel) is practically all Google needs to give you your answer. "abnormal termination" is a commonly used message, probably not useful, but anyway not necessary. Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
olo Posted July 5, 2013 Author Share Posted July 5, 2013 (edited) This is the code I got:(my own code that is) expandcollapse popup#include-once #include <Constants.au3> ;#include <.\backup_100\Library\Error_log.au3> Func AbnormalCmd() Local $DOS, $message = "" ;$gInteractiveLog = 0 ;ACRAOpenLog("OLOS.log", 2) Local $DOS = Run(@ComSpec & " /k unhandled_exception.exe", "", @SW_HIDE, $STDERR_MERGED) While 1 ProcessWaitClose($DOS) $message = StdoutRead($DOS) If @error = 0 Then ACRAOutputinfo("") ACRAOutputerror($message) Return ">0" ExitLoop Else ACRAOutputinfo("No Error detected") EndIf WEnd Return 0 ;ACRACloseLog() EndFunc ;==>AbnormalCmd ;Func Test_Abnormal() ; Return AbnormalCmd() ;EndFunc ;==>Test_Abnormal ;Test_Abnormal() Edited July 5, 2013 by olo Link to comment Share on other sites More sharing options...
guinness Posted July 5, 2013 Share Posted July 5, 2013 You have a Return above ExitLoop, if you didn't know. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
olo Posted July 5, 2013 Author Share Posted July 5, 2013 You have a Return above ExitLoop, if you didn't know. Yea i know ...i want both Link to comment Share on other sites More sharing options...
guinness Posted July 5, 2013 Share Posted July 5, 2013 You can if remove that first Return and use a variable to assign your return data. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
water Posted July 5, 2013 Share Posted July 5, 2013 You need to give us additional information. Operating system? 32 or 64 bit? Is unhandled_exception.exe a 32 or 64 bit application? Do you run the AutoIt script as 32 or 64 bit? Version of AutoIt you run? Any entries in the event log? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
water Posted July 5, 2013 Share Posted July 5, 2013 You can if remove that first Return and use a variable to assign your return data. But that's not really related to the OPs problem, is it? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
orbs Posted July 5, 2013 Share Posted July 5, 2013 (edited) 1) what stops you from disclosing the executable name to this forum? 2) what is the origin of the name of your variable ACRAOutputinfo ? what is ACRA? edit: sorry, water beat me to it, 2 posts ago. Edited July 5, 2013 by orbs Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
water Posted July 5, 2013 Share Posted July 5, 2013 Google offers a lot of explanations: ACRA (Application Crash Reports for Android) Air Canada Recreation Association Accounting and Corporate Regulatory Authority Singapore ... Let's see what the OP tells us. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
olo Posted July 5, 2013 Author Share Posted July 5, 2013 well firstly for some reason I am not allowed to upload an exe file as an attachment. @water everything is 32-bit Basically: I am running a program.(Microsoft word) I get an error message(I dont see it, but I know its there) Where do I check to see if that error message occured? unhandled_exceptions is an exe file designed to simulate the problem. I use it in my code but in reality I want to just detect it I get a message somewhere saying "abnormal termination occured" Link to comment Share on other sites More sharing options...
olo Posted July 5, 2013 Author Share Posted July 5, 2013 Google offers a lot of explanations: ACRA (Application Crash Reports for Android) Air Canada Recreation Association Accounting and Corporate Regulatory Authority Singapore ... Let's see what the OP tells us. ACRA is the company I work for. It is not important at all(ACRAOutputinfo is just a call to a print function in a log I have) Link to comment Share on other sites More sharing options...
orbs Posted July 5, 2013 Share Posted July 5, 2013 ACRA (Application Crash Reports for Android) yes, i saw this, but i thought it'd be better coming from the OP Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
water Posted July 5, 2013 Share Posted July 5, 2013 You know that Autoit comes with an UDF to automate Microsoft Word. Error handling would be much easier with this UDF. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
olo Posted July 5, 2013 Author Share Posted July 5, 2013 (edited) You know that Autoit comes with an UDF to automate Microsoft Word. Error handling would be much easier with this UDF. microsoft word is just an example I use for the forum here(everyone knows about it). Ideally I want to run a software at work. That will run some tests. I want to see while its running those tests if I get an "abnormal termination occurred" message which has an %errorlevel% of 3 Edited July 5, 2013 by olo Link to comment Share on other sites More sharing options...
orbs Posted July 5, 2013 Share Posted July 5, 2013 I am running a program.(Microsoft word) unhandled_exceptions is an exe file designed to simulate the problem winword.exe does not issue exit codes. if you succeeded to simulate the issue so well, then you obviously know how to create the failure, so you know what the failure is. did you create unhandled_exceptions.exe? if so, why won't you reverse-engineer to understand it? generally, it is the role of the vendor of any executable, to provide it's exit codes and their meanings. Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
orbs Posted July 5, 2013 Share Posted July 5, 2013 do you mean that you want to write a script to capture and analyse exit code 3 of other executables? olo 1 Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
olo Posted July 5, 2013 Author Share Posted July 5, 2013 do you mean that you want to write a script to capture and analyse exit code 3 of other executables? Yea. Exactly(so I dont have a specific executable as I want to run the script for different programs(word, excel, software at work...) And when that errorlevel of 3 is capture I will return ">0" as I have in my code. Link to comment Share on other sites More sharing options...
orbs Posted July 5, 2013 Share Posted July 5, 2013 (edited) so you have the "capture" part going well? the "analyse" will differ between executables - exit code 3 would mean very different conditions for different executables. if you are asking for a database that stores info about many executables and their exit codes (like eventid.net for event log entries), then i don't know of any, but someone else might. anyway most likely it will not have just what you will be looking for (Murphy in action, you know). Edited July 5, 2013 by orbs Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
olo Posted July 5, 2013 Author Share Posted July 5, 2013 so you have the "capture" part going well? the "analyse" will differ between executables - exit code 3 would mean very different conditions for different executables. if you are asking for a database that stores info about many executables and their exit codes (like eventid.net for event log entries), then i don't know of any, but someone else might. anyway most likely it will not have just what you will be looking for (Murphy in action, you know). I have everything else setup correctly(or at least Im happy with) It is finding the capture point that I want instead of using the unhandled_exceptions.exe all the time 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