Forum Discussion
ScottonTap
Sep 21, 2021Copper Contributor
intuneWin - adding powershell cmds to uninstall app before isntalling new
Having issues w/ superseded deployment with new app versions. Figured it might be easier to just deploy the new version and have PS run the uninstall of pre-existing first. If I want to hav...
- Sep 22, 2021
You could create a powershell script which I mentioned earlier. Place that powershell script in the same folder as the installationfiles and convert it to a intunewin app
Here is how
Update Application via Win32App in Microsoft Intune - NielsKok.Tech
Upload it and change the install command to something likethis.
Sep 22, 2021
Create a poweshell script
First, I would "try" to check if the app is already installed and check if it has the right version you want to delete (I guess you could get that info from the registry) .
"if" the conditions are met, I would try to kill the app first to be sure nothing is running, then run the msiexec /x uninstall string (of course test the uninstall string first)
"else" install the app again with the msiexec silent switch
Something like that?
First, I would "try" to check if the app is already installed and check if it has the right version you want to delete (I guess you could get that info from the registry) .
"if" the conditions are met, I would try to kill the app first to be sure nothing is running, then run the msiexec /x uninstall string (of course test the uninstall string first)
"else" install the app again with the msiexec silent switch
Something like that?
- ScottonTapSep 22, 2021Copper ContributorThanks Rudy
Was looking for instructions for running a .bat file as the setup file for intunewin
Where the bat calls PS and deletes the file (I can do this)
then calls the msi to install new - this I dont understand.
If I want intunewin to run a PS script then run the installation? not clear how
thanks- Sep 22, 2021
You could create a powershell script which I mentioned earlier. Place that powershell script in the same folder as the installationfiles and convert it to a intunewin app
Here is how
Update Application via Win32App in Microsoft Intune - NielsKok.Tech
Upload it and change the install command to something likethis.
- ScottonTapSep 22, 2021Copper ContributorThank you