From: Jonathan Liu [MSFT] on 1 Feb 2006 13:02 Try and cut and past my code into yours and see if it works. I only have 2 "\\" by the "C:" Your example shows four "c:\\\\" My code: Set colMonitoredEvents = objWMIService.ExecNotificationQuery ("SELECT * FROM __InstancecreationEvent WITHIN 1 WHERE Targetinstance ISA ""CIM_DirectoryContainsFile"" and TargetInstance.GroupComponent= ""c:\\progra~1\\scopet~1\\mobile~1\\outbound""") Your code: Set colMonitoredEvents = objWMIService.ExecNotificationQuery _ ("SELECT * FROM __InstanceCreationEvent WITHIN 10 WHERE " _ & "Targetinstance ISA 'CIM_DirectoryContainsFile' and " _ & "TargetInstance.GroupComponent= " _ & "'Win32_Directory.Name=""c:\\\\progra~1\scopet~1\mobile~1\outbound""'") -- This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm <rich.green(a)gmail.com> wrote in message news:1138811102.171415.278660(a)z14g2000cwz.googlegroups.com... > Thanks for the reply Jonathan, I tried this and still got a parsing > error. In the end i've worked around the problem by defining a drive > using the 'subst' command, and referring to the drive letter rather > than the path. A little dirty but will do the trick. > > Cheers, > Rich >
First
|
Prev
|
Pages: 1 2 Prev: Permission Denied: Msgbox - Client-side Error Next: Permission denied Code: 800A0046 |