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.
Detection method for user-based application
DukenTee
245
Reputation points
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
4,608 questions
Accepted answer
1 additional answer
Sort by: Most helpful
-
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".