Hello,

Here is a snippet from my code. It grabs all events that meet a certain
criteria
LogFile = 'Application'
EventCode = '11707'
This works fine. It grabs all the new software installations. I want to
narrow this down to Office XP.
The Message I want to grab is 'Product: Microsoft Office XP Professional --
Installation operation completed successfully.'

I tried to add this

msgCheck = "Product: Microsoft Office XP Professional -- Installation
operation completed successfully."
<<< code >>>
if msgCheck = objEvent.Message then
<<< do something >>>

It doesn't work.
I also tried "Select * from Win32_ntllogEvent where Message = msgCheck" in
an ExecQuery

Any ideas?

Thanks in advance

Re: Event Log - Office XP by Roland

Roland
Fri Jun 18 03:09:27 CDT 2004

"D VanDerMark" <dvanderm@twcny.rr.com> wrote in message
news:ewd8T6LVEHA.384@TK2MSFTNGP10.phx.gbl...
: Here is a snippet from my code. It grabs all events that meet a certain
: criteria
: LogFile = 'Application'
: EventCode = '11707'
: This works fine. It grabs all the new software installations. I want to
: narrow this down to Office XP.
: The Message I want to grab is 'Product: Microsoft Office XP
Professional --
: Installation operation completed successfully.'
:
: I tried to add this
:
: msgCheck = "Product: Microsoft Office XP Professional -- Installation
: operation completed successfully."
: <<< code >>>
: if msgCheck = objEvent.Message then
: <<< do something >>>
:
: It doesn't work.
: I also tried "Select * from Win32_ntllogEvent where Message = msgCheck" in
: an ExecQuery

What are you using to read the log file?

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp



Re: Event Log - Office XP by D

D
Fri Jun 18 04:48:05 CDT 2004

FileSystemObject


"Roland Hall" <nobody@nowhere> wrote in message
news:ubrnUuQVEHA.2928@tk2msftngp13.phx.gbl...
> "D VanDerMark" <dvanderm@twcny.rr.com> wrote in message
> news:ewd8T6LVEHA.384@TK2MSFTNGP10.phx.gbl...
> : Here is a snippet from my code. It grabs all events that meet a certain
> : criteria
> : LogFile = 'Application'
> : EventCode = '11707'
> : This works fine. It grabs all the new software installations. I want
to
> : narrow this down to Office XP.
> : The Message I want to grab is 'Product: Microsoft Office XP
> Professional --
> : Installation operation completed successfully.'
> :
> : I tried to add this
> :
> : msgCheck = "Product: Microsoft Office XP Professional -- Installation
> : operation completed successfully."
> : <<< code >>>
> : if msgCheck = objEvent.Message then
> : <<< do something >>>
> :
> : It doesn't work.
> : I also tried "Select * from Win32_ntllogEvent where Message = msgCheck"
in
> : an ExecQuery
>
> What are you using to read the log file?
>
> --
> Roland Hall
> /* This information is distributed in the hope that it will be useful, but
> without any warranty; without even the implied warranty of merchantability
> or fitness for a particular purpose. */
> Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
> WSH 5.6 Documentation -
http://msdn.microsoft.com/downloads/list/webdev.asp
> MSDN Library - http://msdn.microsoft.com/library/default.asp
>
>



Re: Event Log - Office XP by D

D
Fri Jun 18 05:19:22 CDT 2004

Sorry,

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,}!\\" & _
strComputer & "\root\cimv2")
Set colLogFiles = objWMIService.ExecQuery _
("Select * from Win32_NTEventLogFile")

Thanks,
Doug

"Roland Hall" <nobody@nowhere> wrote in message
news:ubrnUuQVEHA.2928@tk2msftngp13.phx.gbl...
> "D VanDerMark" <dvanderm@twcny.rr.com> wrote in message
> news:ewd8T6LVEHA.384@TK2MSFTNGP10.phx.gbl...
> : Here is a snippet from my code. It grabs all events that meet a certain
> : criteria
> : LogFile = 'Application'
> : EventCode = '11707'
> : This works fine. It grabs all the new software installations. I want
to
> : narrow this down to Office XP.
> : The Message I want to grab is 'Product: Microsoft Office XP
> Professional --
> : Installation operation completed successfully.'
> :
> : I tried to add this
> :
> : msgCheck = "Product: Microsoft Office XP Professional -- Installation
> : operation completed successfully."
> : <<< code >>>
> : if msgCheck = objEvent.Message then
> : <<< do something >>>
> :
> : It doesn't work.
> : I also tried "Select * from Win32_ntllogEvent where Message = msgCheck"
in
> : an ExecQuery
>
> What are you using to read the log file?
>
> --
> Roland Hall
> /* This information is distributed in the hope that it will be useful, but
> without any warranty; without even the implied warranty of merchantability
> or fitness for a particular purpose. */
> Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
> WSH 5.6 Documentation -
http://msdn.microsoft.com/downloads/list/webdev.asp
> MSDN Library - http://msdn.microsoft.com/library/default.asp
>
>



Re: Event Log - Office XP by jeff

jeff
Fri Jun 18 10:44:08 CDT 2004

On Thu, 17 Jun 2004 18:58:12 -0400, "D VanDerMark"
<dvanderm@twcny.rr.com> wrote:

>Hello,
>
>Here is a snippet from my code. It grabs all events that meet a certain
>criteria
>LogFile = 'Application'
>EventCode = '11707'
>This works fine. It grabs all the new software installations. I want to
>narrow this down to Office XP.
>The Message I want to grab is 'Product: Microsoft Office XP Professional --
>Installation operation completed successfully.'
>
>I tried to add this
>
>msgCheck = "Product: Microsoft Office XP Professional -- Installation
>operation completed successfully."
><<< code >>>
>if msgCheck = objEvent.Message then
><<< do something >>>
>
>It doesn't work.
>I also tried "Select * from Win32_ntllogEvent where Message = msgCheck" in
>an ExecQuery
>
>Any ideas?

This might be easier using Microsoft's Log Parser tool.

Otherwise, I assume you're using a WMI object and creating a logfile
collection, so you may need to iterate through the collection and see
what matches your criteria (not sure offhand what the collection
actually returns, use a FOR EACH loop and print them out to review
it...).

Jeff

Re: Event Log - Office XP by D

D
Fri Jun 18 15:41:04 CDT 2004

Thanks Jeff, we are actually trying to grab this information on over 500
machines or so. So will the Microsoft Parser Tool work for this?


"Jeff Cochran" <jeff.nospam@zina.com> wrote in message
news:40e50cfe.744908271@msnews.microsoft.com...
> On Thu, 17 Jun 2004 18:58:12 -0400, "D VanDerMark"
> <dvanderm@twcny.rr.com> wrote:
>
> >Hello,
> >
> >Here is a snippet from my code. It grabs all events that meet a certain
> >criteria
> >LogFile = 'Application'
> >EventCode = '11707'
> >This works fine. It grabs all the new software installations. I want to
> >narrow this down to Office XP.
> >The Message I want to grab is 'Product: Microsoft Office XP
Professional --
> >Installation operation completed successfully.'
> >
> >I tried to add this
> >
> >msgCheck = "Product: Microsoft Office XP Professional -- Installation
> >operation completed successfully."
> ><<< code >>>
> >if msgCheck = objEvent.Message then
> ><<< do something >>>
> >
> >It doesn't work.
> >I also tried "Select * from Win32_ntllogEvent where Message = msgCheck"
in
> >an ExecQuery
> >
> >Any ideas?
>
> This might be easier using Microsoft's Log Parser tool.
>
> Otherwise, I assume you're using a WMI object and creating a logfile
> collection, so you may need to iterate through the collection and see
> what matches your criteria (not sure offhand what the collection
> actually returns, use a FOR EACH loop and print them out to review
> it...).
>
> Jeff



Re: Event Log - Office XP by Roland

Roland
Sat Jun 19 03:09:59 CDT 2004


"D VanDerMark" <dvanderm@twcny.rr.com> wrote in message
news:OwNSbSXVEHA.808@tk2msftngp13.phx.gbl...
: Thanks Jeff, we are actually trying to grab this information on over 500
: machines or so. So will the Microsoft Parser Tool work for this?

http://www.microsoft.com/downloads/details.aspx?FamilyID=8cde4028-e247-45be-bab9-ac851fc166a4&displaylang=en

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp