SOLVED

Intune Uninstall Error

Copper Contributor

Hoping someone can help me with this issue?

 

I am having an issue uninstalling a Win32 app deployed from Intune. The installation works fine but whenever I try and un-install from Company portal I get an error saying uninstall failed. 

 

I believe the .msi uninstall command in Intune is correct and it works fine if I run in command prompt as admin. The detection rules are right as its updating the installation install status in Intune. 

 

Looking through the Intune logs, I keep getting this when I try to run uninstall 

 

"GetRegistryValue encountered an exception: System.NullReferenceException: Object reference not set to an instance of an object.at Microsoft.Management.Services.IntuneWindowsAgent.AgentCommon.RegistryHelper.GetRegistryValue(String key, String valueName, String defaultValue, Boolean check32BitOn64)"

 

 

The application was a msi and packed up as a intunewin file. 

 

Any help would be great

18 Replies
Could you share your settings for the Intune package? What's your detection?

@Harm_Veenstra 

 

Sure, here is the setup:

 

1.png2.png

The last " in the uninstall command shouldn't be there

@Harm_Veenstra 

 

Thanks, I will try removing and report back. 

@Harm_Veenstra 

 

So I try removing the extra " in the uninstall command but still failing.

The latest logs show this.

 

Exception happens when processing existing DO job aed99da0-ab1a-46a1-984c-876c7ef4a362 for app 8ad7229b-29c2-4d5a-a282-e55204d2f32f, ex = System.Runtime.InteropServices.COMException (0x80D02003): Exception from HRESULT: 0x80D02003
   at Microsoft.Management.Clients.IntuneManagementExtension.Win32AppPlugIn.ContentManagement.DeliveryOptimization.IBackgroundCopyManager.GetJob(Guid& jobID, IBackgroundCopyJob& ppJob)
   at Microsoft.Management.Clients.IntuneManagementExtension.Win32AppPlugIn.ContentManagement.DeliveryOptimization.DOUtilities.GetJobFromId(Guid jobId)
   at Microsoft.Management.Clients.IntuneManagementExtension.Win32AppPlugIn.DOUtilitiesWrapper.GetJobFromId(Guid jobId)
   at Microsoft.Management.Clients.IntuneManagementExtension.Win32AppPlugIn.ContentDownloaderDeliveryOptimization.DownloadContent(Win32AppResult win32AppResult, SideCarApplicationClientPolicy appPolicy, SideCarContentInfo sidecarContentInfo, SideCarContentMetadata contentMetadata, String encryptedFilePath, String downloadFilePath, Boolean& fallback, Boolean& downloadRunningInBackground, EspPhase espPhase, Boolean isAvailableCheckIn)

Just another question... Why did you package the .MSI file? Is it just the .MSI file, or are more files in the installation folder? You could alternatively add the .MSI file to Intune as a Line-of-business app. The install/uninstall/detection is based on MSI technology and is done automatically.

-Edit-

 

Never mind, you want to have users to be able to uninstall it themselves.

Could you add this to the uninstall string and check the log?

/l*v "c:\windows\temp\uninstall.log"

@Harm_Veenstra 

 

Yeah it’s just a .msi file with no other files.

 

i was under impression it was best practise to deploy as a Win32 app rather than using a line or business app. I am fairly new to the packaging game in intune.

 

Are there any negatives to using a line of business app. I really need to the ability to remove this app both from company portal and from the remove app section in Intune admin 

Thanks will try that. Do you add that to the end of the uninstall command?
Yes, after the /qn with a space in between.
Any update?
Sorry for slow reply, No I am still facing the same problem. I even tried as a line of business app.

I have a PowerShell script which kills the app and removes perfect. If I package that up with the .msi as a intune.wim file. Can someone confirm what I should put as the uninstall command on Intune.

Thanks
powershell.exe -executionpolicy bypass -file .\nameofpowershellscript.ps1
Thank you, I think I tried this already but I will try again today.

Could you also confirm, if you have a .cmd file to trigger the install, what do you type in the install command on intune? Can you just type filename.cmd or do you have to type something before it?

Thanks
Just filename.cmd is sufficient
Any update?
best response confirmed by JoshB531 (Copper Contributor)
Solution
This has now been resolved. I found out late Friday that our new VPN client was blocking PowerShell and cmd scripts from Intune.

Thank you for all your help.

@JoshB531 Ah! Didn't expect that. Good find, and I'm happy that it's resolved!

Please click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.

If the post was helpful in other ways, please consider giving it a Like.

1 best response

Accepted Solutions
best response confirmed by JoshB531 (Copper Contributor)
Solution
This has now been resolved. I found out late Friday that our new VPN client was blocking PowerShell and cmd scripts from Intune.

Thank you for all your help.

View solution in original post