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.

  • It seems to me like this question got clipped when it was posted and that there's something missing... – GregL Dec 11 '15 at 13:17
  • Sorry, but I have no enough knowledge SCCM and I would be happy if you inform me about what is missing? – Jack Dec 11 '15 at 13:22
  • I mean to say that your question doesn't seem to be complete. Re-read the last few sentences and clarify if needed. – GregL Dec 11 '15 at 13:28
  • Ok, I update the question. I hope now it is clear :) – Jack Dec 11 '15 at 13:56
  • @GregL Any help pls? – Jack Dec 11 '15 at 17:26
2

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

  • +1 - Using the supersedence section within SCCM is probably the best and tidiest way. – Joe S 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
  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.