Forum Discussion

dmarquesgn's avatar
dmarquesgn
Iron Contributor
May 31, 2022

Uninstall and Install Application on same Policy

Hi,

 

I'm new to Intune and trying to set up some Application policies.

Now I've got a challenge which I'm not sure if I can accomplish it via Intune and I need some guidance just to understand if this is possible or not.

I have an Application, basically a VPN Agent installed on most of our 2000 computers, it's a Win32 app, which was not installed via Intune and now I need to remove that application and install the new one with an updated version and the VPN configurations.

For that, basically we need the following steps:
1 - Uninstall VPN App

2 - Restart Computer
3 - Install New VPN App

Is this something I can do within Intune App management?

 

Thanks

  • Probably when packaging the VPN app and creating a powershell script that first removes the software ... configures a scheduled task (that runs only ONCE at system and will launch the second part .. a powershell script that silently install the new VPN software..) and reboots the device?

  • Just off the top of my head I'm thinking:

    • Deploy the 'new' app but add a detection rule that detects the 'old' app, preventing it from installing as long as the 'old' app is present. 
    • Create another app/script that will uninstall the 'old' app (and restart the device).

    This works under the following assumptions:

    1. You can create a detection rule to specifically target the 'old' app (maybe a file version or date?).
    2. You can afford a (slight) delay between removal and installation. 

    Oh, and then there's "Supersedence" but that's still in preview. 

    • Rudy_Ooms_MVP's avatar
      Rudy_Ooms_MVP
      MVP
      Mmm sounds like a good idea... but I guess when the old version is deleted and the new version is installed it sort of fails at detection.....
      • dmarquesgn's avatar
        dmarquesgn
        Iron Contributor
        Hi,
        Thanks for the replies.
        One of my main problems on dealing separately is precisely the delay. We cannot control when will Intune really uninstall the app on all devices. This can take up a couple of days from the tests I've done with Intune. Then only when the first task ran on all devices, I can launch the second task. So this will take a long time and create an issue, which is that some users will need the VPN agent installed off working hours. That's the main reason I would want to do it all in one task.

Resources