Forum Discussion

Sk-73's avatar
Sk-73
Iron Contributor
Mar 11, 2022

Intunewin file install command and uninstall command

Dear all,

 

Wondering to know which is the best way. I found several diffs install and uninstall commands by Google search.

 

Here's one of the commands I found.

 

msiexec /i "Software.exe" /q

msiexec /x "Software GUID" /q

 

and also

 

Install command Software name.exe /sAll /rs /rps /msi /norestart /quiet EULA_ACCEPT=YES

Uninstall command msiexec /x “{Software GUID}” /q

 

I usually will install the target software on my computer first, then try to get the GUID and the folder path. Then I will uninstall it later on.

 

But sometimes, I will not able to find the target software GUID by PowerShell. Here's the command I use.

 

get-wmiobject Win32_Product | Sort-Object -Property Name | Format-Table IdentifyingNumber, Name, LocalPackage -AutoSize

 

In this case, how do I get uninstall command?

 

I found some people put like this as uninstall command C:\Program Files\software name\uninstall.exe /S However, is not all the software can found uninstall.exe

 

Do you guys have any easy way to push intunewin file to all the devices?

 

I do successfully pushed Adobe Reader to my device, but I'm not sure why, installed but I still receive the notification say My org distribution the software to my device, download and install. Then end up becoming an error and show on the Intune install failed. But in fact, earlier on was installed.

 

I believe this is something with the detection rules. How do you guys set up the detection rules? 

 

My way is, I will choose to detect by File, then install the target software on my device first, then file location, copy the path and the file name to fill up the column.

 

I'm still trying. I hope will not continue to keep pushing the software to my machine if already been installed.

 

Will be grateful for any help you can provide.

 

    • Sk-73's avatar
      Sk-73
      Iron Contributor

      Hi Harm_Veenstra Thank you. Here are my detection rules.

      With regards to the software already installed but the Intune still, try to distribute again I'm thinking maybe because I changed something but I'm not sure. What I have done was upload a software logo.

       

       

      Perhaps, this caused Intune to try to push the software again. Also, I think during that time the detection rules have slightly diff.

       

      As of now, I do not see the Intune try to distribute the software again so far. Monitoring.

       

       

       

      • Detection Rule seems ok if you're installing the 32-Bit version... Changing a logo could trigger installation, but the detection is always done first and if the executable is there it won't start installation again.

Resources