How can I use a wildcard for intune app detection path?

Landon Tran 1 Reputation point

When uploading a win32 app to intune, there is a section where I manually configure detection on if the app has already been installed or not. The app will install in folder C:\ProgramData\Bom_______. The \Bom______\ folder has a different name each install because it gets its name from some component on the local device. How can I have a wildcard in the detection path so it will go in regardless of name?

Can I do something like C:\ProgramData\Bom*\?

Microsoft Intune Application management
Microsoft Intune Application management
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Application management: The process of creating, configuring, managing, and monitoring applications.
890 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Jarvis Sun-MSFT 10,096 Reputation points Microsoft Vendor

    Hi @Landon Tran Thanks for posting in our Q&A.

    For our problem, as far as I know that the Detect rules file option does not support the use of wildcards.

    Thus, you need to use other way around this, like finding other changes on registry, use detection script etc. Complex detection methods often require writing a script. Such as

    If (Get-ChildItem C:\ProgramData\ -Recurse -Force -Include "Bom")


    Write-Host "File detected"  


    More details please refer to :

    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments