0

We installed an application to some client machines and we want to deploy the new version by
1) Uninstalling the prior version if there is, then
2) Installing the new version at the same step (because the msi of the application cannot uninstall the prior version and we have to perform uninstallation and installation of the application at the same step. Is it possible? If so how can we manage this on SCCM or msi side by using a script, etc? Any help would be appreciated.

Jack
  • 1
  • 1
  • 8

2 Answers2

1

My deployment of SCCM uninstalls one version and installs the subsequent version in a single step regularly. Here is how to achieve that.

Package both versions as applications whose full lifecycle is tested and working.

For this to work you need both the original and the new version to be packaged as an SCCM Application that SCCM can successfully put through the full lifecycle (start out uninstalled and undetected, install, detect, uninstall, undetected). Test the full lifecycle of each application separately before moving on to the next step.

Deploy version n

With a well-formed application, you can deploy the application to computers without regard for whether the application is already installed. If the application is already installed, CcmExec will detect it and do nothing. If the application is not detected, it will invoke the installer.

Supersede version n with version n+1

Supersedence is the key to achieving uninstallation and installation in a "single step". CcmExec actually processes uninstallation followed by installation, but I've always seen that happen back-to-back so you don't risk the user going without that application for an extended period of time.

Here is the supersedence screen you are working toward:

enter image description here

alx9r
  • 1,643
  • 3
  • 16
  • 37
  • +1 - Using the supersedence section within SCCM is probably the best and tidiest way. –  Dec 27 '15 at 22:10
0

Create a New Pacakge
Source Folder: \\server\here\there
Standard Program
Command Line: installThis.bat
Etc...

Source Folder should also contain "installThis.bat"
Minimum contents of InstallThis.bat

REM *** Get the "UninstallString" of the old version from this registry locaton
REM *** HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
REM *** Replace the first MSIEXEC here with that UninstallString
MsiExec.exe /X{071c9b48-7c32-4621-a0ac-3f809523288f}
MsiExec.exe newVersion.msi /this /that /other
Clayton
  • 4,483
  • 16
  • 24
  • Many thanks for your help. With this scripts, do you mean to create a script that uninstall and then reinstall the application using the msi file of the latest version? Could you please explain a little bit more and update your answer to explain step by step? – Jack Dec 11 '15 at 15:20
  • Any help please? – Jack Dec 11 '15 at 17:27
  • I realize it's a minimal answer, but packages in SCCM are less complex than applications. Which part are you not following? The basics of creating a package, or the script? – Clayton Dec 11 '15 at 19:57