Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > Re: Script

Reply
 
 
Peter Foldes
Guest
Posts: n/a

 
      12-24-2009
crossposted to the windows.server.scripting newsgroup

--
Peter

Please Reply to Newsgroup for the benefit of others
Requests for assistance by email can not and will not be acknowledged.

"Ricardo Ito" <> wrote in message
news:19939896-4161-4C03-AED2-...
> Hi.
> I found some scripts and I try to merge and the result was:
>
> --
> strComputer = "mycomputer"
> Set objWMIService = GetObject("winmgmts:" _
> & "{impersonationLevel=impersonate}!\\" & _
> strComputer & "\root\cimv2")
>
> Set colMonitoredEvents = objWMIService.ExecNotificationQuery _
> ("SELECT * FROM __InstanceModificationEvent WITHIN 10 WHERE " _
> & "TargetInstance ISA 'CIM_DataFile' and " _
> & "TargetInstance.Name='c:\\temp\\text.txt'")
>
> Do
> Set objLatestEvent = colMonitoredEvents.NextEvent
> Set objEmail = CreateObject("CDO.Message")
> objEmail.From = ""
> objEmail.To = ""
> objEmail.Subject = "The growth of the file"
> objEmail.Textbody = "The file is growing!!!"
> objEmail.Send
> Loop
> --
>
> but I would like the oposite...
> When the file "text.txt" doesn´t grow, send a e-mail.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Script to add existing AD users to a group Paul Bergson [MVP-DS] Active Directory 0 12-22-2009 04:24 PM
Login Script does not run on SBS2008 with win7 client Ivan Windows Small Business Server 1 12-16-2009 06:32 AM
logon script for mapping Bonno Bloksma Scripting 1 11-27-2009 05:18 PM
Trivial startup script won't run in Vista Jeff Vandervoort Windows Vista Administration 1 10-07-2008 08:23 PM
Vista Startup Script problem (loading registry hive issue) ejmichaud@hotmail.com Windows Vista Administration 5 03-11-2008 11:27 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59