WMI task and WQL query

  • Hi don't know if this helps but I decided to keep things simple and used a VB script to build a variable to pass into wmi

    Query = "SELECT * FROM __InstanceCreationEvent WITHIN 10 WHERE TargetInstance ISA " _

    & """CIM_DirectoryContainsFile"" AND TargetInstance.GroupComponent = ""Win32_Directory.Name=\""" _

    & Folder & "\"""""

    Albeit - I have a single folder variable this is working quite happily - although I haven't yet tried it on 64 bit. Probably irrelevant - but do you have Run64BitRuntime set to False?

    Regards

  • Yes I have it set to False. I had to do that so the package would work without the Event Watcher Task.

  • Hi opc.three I will review the link you sent thanks. So far nothing I have tried has worked. I asked our IS to look into it but I have not received any feedback yet and we have to get permission before we can use a third party tool.

  • eclispe66 (10/30/2012)


    Hi opc.three I will review the link you sent thanks. So far nothing I have tried has worked. I asked our IS to look into it but I have not received any feedback yet and we have to get permission before we can use a third party tool.

    You may need elevated permissions to attach to the specific WMI event being used. When you launch Visual Studio, do you select "Run as Administrator"?

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

Viewing 4 posts - 16 through 18 (of 18 total)

You must be logged in to reply to this topic. Login to reply