<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 & ":" & args.Item(k)
next
LogName = "Application"
LogSource = "VMMPro"
Set WshShell = WScript.CreateObject("WScript.Shell")
strCommand = "eventcreate /T Information /ID 1 /L " & LogName & " /SO " & LogSource & " /D " & Chr(34) & LogDesc & Chr(34)