none
using %userprofile% variable WMI Filter for GPO RRS feed

  • Question

  • Hi,

    We are trying to put a wmi filter for a GPO so that we could define different path for different users based on folder presence under their profile. It works fine if its a fixed path i.e.

    Select * From Win32_Directory Where Name = "C:\\Business\\Office Templates Path" 

    Select * From Win32_Directory Where Name = "C:\\HR\\Office Templates Path" 

    But we have to determine the folder presence in userprofile and not under C:

    Select * From Win32_Directory Where Name = "%userprofile%\\Business\\Office Templates Path" 

    Select * From Win32_Directory Where Name = "%userprofile%\\HR\\Office Templates Path" 

    I have tried various options but hasn't been successful. Any suggestions?

    Thanks,

    Sumit Kumar

    • Moved by Bill_Stewart Wednesday, September 13, 2017 8:55 PM This is not "teach me how to use WQL in a GPO WMI filter" forum
    Thursday, July 20, 2017 10:15 AM

All replies

  • You cannot use environment variables in a filter.  They are only valid in a script.


    \_(ツ)_/

    Thursday, July 20, 2017 11:12 AM