|
#1
|
|||
|
|||
|
Create events in eventlog
Hi,
since i rather prefer generating events during installations e.g. installation problems, starting, success i made some small function inside global functions, which uses the exe-file eventcreate.exe which comes with windows xp. With this util one can create individual events in eventlog. during large deployments in company looking up the eventvwr to see what went wrong is in my opionen much fast than searching / looking up the setuplogfile.... so, maybe also others like this function, so here it is: create inside global functions the function CREATE_EVENT: function CREATE_EVENT(EVENT_TYPE, EVENT_TXT) result = File.DoesExist(_SystemFolder.."\\eventcreate.exe") ;end call the function with as error-type: EVENT_TYPE="ERROR"; EVENT_TXT="Installation error: " .. STATUS .. " - " .. STATUSMESSAGE ; CREATE_EVENT(EVENT_TYPE, EVENT_TXT); or e.g. as information-type: EVENT_TYPE="INFORMATION"; EVENT_TXT="Installation successful ..."; CREATE_EVENT(EVENT_TYPE, EVENT_TXT); the variables STATUS and STATUSMESSAGE e.g. can be filled with Application.GetLastError() and tblErrorMessages[error]. On action "at startup" at the beginning i define them, just in case, Trap() wasn't called before using the function CREATE_EVENT, just to make sure, values are not empty... if during Trap() error occured both values with be filled autom. with the errorcode and text which occured... STATUS = 0; STATUSMESSAGE = "OK"; for detailed info about eventcreate.exe just call inside cmd eventcreate.exe /? or visit page like this one: http://windowsitpro.com/windowsscrip...s-sampler.html In my installations i created a function Trap() in the global functions, which i call after vital operations to check, if error occured, if not silent (using variable _SilentInstall ~= true) error message pops up for 5 secs: function Trap() error = Application.GetLastError();end |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Example: Creating Animated Images | Corey | AutoPlay Media Studio 5.0 Examples | 1 | 03-04-2006 01:44 AM |
| HOWTO: Create a Project Template | Support | AutoPlay Media Studio 4.0 Examples | 0 | 10-28-2002 02:49 PM |
| HOWTO: Create a Page Template | Support | AutoPlay Media Studio 4.0 Examples | 0 | 10-26-2002 06:20 AM |
| HOWTO: Create an Empty Folder | Support | Setup Factory 6.0 Knowledge Base | 0 | 10-21-2002 04:21 PM |
| HOWTO: Create Nested Shortcuts in the Start Menu | Support | Setup Factory 6.0 Knowledge Base | 0 | 09-24-2002 11:26 AM |
All times are GMT -6. The time now is 07:55 AM.








Linear Mode

