Uninstalling dependent apps with Intune

Frenzel, Sophia 40 Reputation points
2024-10-10T10:21:05.75+00:00

Hi,

I have configured an app in Intune with two different packages, on is dependent with automatic install on the other.

The first one is run as a system and copies the required files in %programfiles(x86)% (as there is no real installation. Just copying the files and then create a link on the desktop).

The second package is run as user and creates the link on the user desktop.

Both packages are run with powershell install scripts with matching uninstall scripts (uninstall scripts just delete the files/link)

When I test the uninstallation, the uninstall command from the second package is run, but the uninstall of the first package is not run. The files are still in %programfiles(x86)%.

How do I configure the uninstallation, so both packages are removed?
Thanks!

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.
947 questions
{count} votes

Accepted answer
  1. Crystal-MSFT 49,006 Reputation points Microsoft Vendor
    2024-10-11T01:59:27.1133333+00:00

    @Frenzel, Sophia, Thanks for posting in Q&A. Agree with Rahul, Dependencies are applicable only when installing the Win32 app on the device. Dependencies are not applicable for uninstalling a Win32 app. And the app will not be removed automatically.

    For the dependent app, it is run as system account. It seems the install behavior of the win32 app is set as user. So when the uninstall script run, it fails with permission issue to uninstall the first package.

    For this situation, I think you can deploy a separate PowerShell script and set "Run this script using the logged on credentials" as no to let is run under system account to remove the files in package 1.

    https://zcusa.951200.xyz/en-us/mem/intune/apps/intune-management-extension

    As another method, you can deploy the dependent app via Intune win32 app as well. And add the user or device group under uninstall assignment of both apps under Intune to remove them.

    Hope the above information can help.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.