Microsoft.SystemCenter.VirtualMachineManager.Pro.CreateEvent (WriteActionModuleType)

Element properties:

TypeWriteActionModuleType
IsolationAny
AccessibilityInternal
RunAsDefault
InputTypeSystem.BaseData

Member Modules:

ID Module Type TypeId RunAs 
CreateEventLogEntry WriteAction Microsoft.Windows.ScriptWriteAction Default

Overrideable Parameters:

IDParameterTypeSelector
EventParameterstring$Config/EventParameter$

Source Code:

<WriteActionModuleType ID="Microsoft.SystemCenter.VirtualMachineManager.Pro.CreateEvent" Accessibility="Internal" Batching="false">
<Configuration>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="EventParameter" type="xsd:string"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="EventParameter" Selector="$Config/EventParameter$" ParameterType="string"/>
</OverrideableParameters>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<WriteAction ID="CreateEventLogEntry" TypeID="Windows!Microsoft.Windows.ScriptWriteAction">
<ScriptName>CreateEventLogEntry.vbs</ScriptName>
<Arguments>"$Config/EventParameter$"</Arguments>
<ScriptBody><Script>
' Main
' Create the log entry and then execute eventcreate
' Use the command line parameter as the description of the event
'

dim argsCount

set args = WScript.Arguments

argsCount = args.Count

if argsCount = 0 then

WScript.quit 1

end if

'append all the parameters to the log description object

LogDesc = args.Item(0)

for k = 1 to argsCount - 1

LogDesc = LogDesc &amp; ":" &amp; args.Item(k)

next

LogName = "Application"

LogSource = "VMMPro"

Set WshShell = WScript.CreateObject("WScript.Shell")

strCommand = "eventcreate /T Information /ID 1 /L " &amp; LogName &amp; " /SO " &amp; LogSource &amp; " /D " &amp; Chr(34) &amp; LogDesc &amp; Chr(34)

WshShell.Run strcommand , 0
</Script></ScriptBody>
<TimeoutSeconds>120</TimeoutSeconds>
</WriteAction>
</MemberModules>
<Composition>
<Node ID="CreateEventLogEntry"/>
</Composition>
</Composite>
</ModuleImplementation>
<InputType>System!System.BaseData</InputType>
</WriteActionModuleType>