Detection method for user-based application

DukenTee 245 Reputation points
2025-01-12T11:48:30.18+00:00

We are deploying an user-based application, it is installed under folder C:\Users\username\AppData\Roaming, that meams I need a dynamic detection method. I'm wondering how to write the detection method.

Anyone has experience on this?

Microsoft Security | Intune | Configuration Manager | Other
0 comments No comments
{count} votes

Accepted answer
  1. JM 1,166 Reputation points
    2025-01-12T17:15:35.54+00:00

    You can create a PowerShell script to detect the presence of a file or application binaries. Utilize environment variables in the script to target the current users.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. AllenLiu-MSFT 49,316 Reputation points Microsoft External Staff
    2025-01-13T02:25:11.4233333+00:00

    Hi, @DukenTee

    Thank you for posting in Microsoft Q&A forum.

    Like JM mentioned, you may use a PowerShell detection script like below to see if it helps:

    $i=0
    If (Test-Path "C:\Users\*\AppData\Roaming\xxx.exe"){$i++}
    If ($i -gt 0){Write-Host "Installed"}
    

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Add comment".


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.