MAKEMSI quickly and reliably creates MSI files in a non-programmatic way
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
[Bottom][Contents][Prev]: Environment[Next]: EventLogSource
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->Source Code->Commands->EventLogCustomView

The "EventLogCustomView" Command

This command can be used to programatically add custom event views to the Windows event viewer (EventVwr.msc / EventVwr.exe).

You may wish to create a filter for specific sources if you have used "EventLogSource".

You use the eventviewer to manually create or update your filters and then take a copy of the definitions it creates to deploy to as many workstations or servers that you wish:

The macro takes these parameters:

You can also use any of the following predefined options:

#define? DEFAULT_EVENTLOG_PROTECTED     Y            ;;By default we protect files
#define? DEFAULT_EVENTLOG_VITAL         N            ;;By default file is not important enought to FORCE an about *user allowed to ignore issues on these files)
#define? EVENTLOG_FILTER_ROOT_DIR       [CommonAppDataFolder]\Microsoft\Event Viewer\Views  ;;You can add to this if you want your root to be a company name under this etc

EXAMPLES

The following demonstrates some variations:

<$EventLogCustomView  FilterXml="ALL WSH (last 30 days).xml">

;--- The following both go into same menu location ---
<$EventLogCustomView  FilterXml="Some filter name1.xml"  Folder="Product X\Sub Menu">
<$EventLogCustomView  FilterXml="[Product X, Sub Menu] Some filter name2.xml">

This shows how to add all the available filter files (as long as you can supply a mask that only selects them):

#DefineRexx ''
    ;--- Get list of "[*.xml" files ---
    call Files4Mask  "[*.xml", "CustomView"
#DefineRexx
#{  FOR FileNumber = 1 to CustomView.0
    ;--- Process each of the files in turn ---
    <$EventLogCustomView FilterXml="<??CustomView.FileNumber>">
#}


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: Environment[Next]: EventLogSource


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Saturday December 09 2017 at 9:30am
Visit MAKEMSI's Home Page
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.