Uninstalling a Win32 Apps in Intune

PemaYangden-3875 0 Reputation points
2025-09-02T06:39:44.1266667+00:00

Hi guys,

I have deployed a Win32 App from Intune.
The app has been packaged into an intunewin app.
The installation was successful, but the uninstallation is failing with error code " The system cannot find the file specified. (0x80070002)".
The app was deployed as a user-based app.
The uninstall command is "C:\Users%username%\AppData\Local\Programs\softwarenamefolder\Uninstall Softwarename.exe" /currentuser /S

Has anyone faced any similar issues?

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

1 answer

Sort by: Most helpful
  1. Prathista Ilango 435 Reputation points Microsoft Employee
    2025-10-08T09:50:05.36+00:00

    Hello PemaYangden-3875,

    This is because Environment variable expansion (%username%) is not supported in uninstall command.

    Refer to the note under uninstall command from here: https://free.blessedness.top/en-us/intune/intune-service/apps/apps-win32-add#step-2-program

    For your case, try using a custom wrapper script within your win32 package to wrap the command and use this script for the uninstall command.

    Hope this helps!

    If you found the information above helpful, please Click Yes. This will assist others in the community who encounter a similar issue, enabling them to quickly find the solution and benefit from the guidance provided.

    1 person found this answer helpful.
    0 comments No comments

Your answer

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