4

Need to rollout the newest Lenovo ThinkVantage System Update (v5.06.0034) via SCCM 2012. I want this update to supersede all lower versions and for that I need to uninstall those previous version silently.

Usually, one could do that by using TVSU's UninstallString with the /quiet or /qn parameter:

MsiExec.exe /X{25C64847-B900-48AD-A164-1B4F9B774650} /qn

Technically, that works. However, the Lenovo installer asks the user if they want to delete the program folder after uninstallation, which requires user input (yes or no). Therefore, when uninstallation is started silently, the installer will hang indefinitely since there's no way for the user to interact with the installer.

Is there any way to provide an unattend.xml for this installer or does anyone know about a specific command switch I could use with Lenovo's System Update installer .exe ?

EDIT

As @kce suggested (thank you!), I turned up msiexec's logging level during uninstallation. Whereas I couldn't find any properties that might be passed manually through msiexec, here's the part where the installer creates the "Delete Folder?"-dialog along with the function that is called if the user presses yes. Maybe it helps anyone:

MSI (s) (80!84) [10:52:44:046]: Creating MSIHANDLE (77) of type 790531 for thread 3716
InstallShield 10:52:44: Registering Msi Server...
MSI (s) (80!84) [10:52:44:046]: Closing MSIHANDLE (77) of type 790531 for thread 3716
MSI (s) (80!84) [11:03:27:239]: Creating MSIHANDLE (78) of type 790531 for thread 3716
InstallShield 10:52:44: Invoking script function DeleteInstallDir

I didn't persue the problem any further since I saw that the installer v5.06.0034 (newest release) does indeed check wheather older versions are installed and properly uninstalls older versions (folder structure and registry values are cleaned up).

slagjoeyoco
  • 253
  • 1
  • 4
  • 13

2 Answers2

7

Ah. The joys of automated software installation in a Windows environment. SCCM can only do so much with terrible vendor provided installers as you have discovered.

My first stop when trying to build a Application-Program or a Package-Program is to take a look at ITNinja which used to be called App Deploy before Dell decided to buy and rebrand it. Unfortunately there's not much there for Lenovo ThinkVantage System Update.

If you are on your own there is a few general steps you can try:

  • Try different installer methods. A lot of times vendors will package their application as a .MSI installer with .EXE bootstrap program. Sometimes if you can find documentation on the .EXE's command switches (if any), they will work better than directly running the .MSI and using the standardized .MSI switches. I have no idea why...
  • Turn up the logging to 11. Pass msiexec the /lvx uninstallation.log switch so you have debug and verbose logging information. Work through the installer and monitor the log with CM32Trace as you do so. When you get to the step where the dialog is asking for the Yes or No button, press the desired button and see if you can find a PROPERTY in the logfile that can be passed back into msiexec.exe when you run the uninstaller via SCCM. If you pair this SysInternal's ProcMon you can learn a great deal about how and what the installer does and sometimes this information is enough to figure out what the sticking point is.
  • Try community support. Some other poor soul has probably tried to do this as well, often those aimless cries for help can be found among your vendor's community support forums. For example, there is a lengthy thread on TVSU on Levono's Forums regarding silent installation. Apparently there is a magical incantation, ahem, I mean installer switch /verysilent which the .exe-based installer will accept; however the results people are getting seem inconsistent. Maybe it will work for the uninstallation too? Additionally my help desk staff tell me that /r/sccm is surprisingly helpful.
  • Do an in-place install. If you are upgrading a piece of software, it is important to test to see if it does an in-place install or a side-by-side install. Again, the behavior here is wildly vendor, application and version dependent. Sometimes the software will install right over the top of the existing older install, sometimes it will look for all older versions of itself and attempt to uninstall them first and other times it will do a side-by-side install with both versions co-existing. With software that does an in-place install or has an uninstallation of older versions task, it often works better to just let the installer do whatever insane thing it wants to do instead of using the SCCM Application Supersedence model. Test, test and test some more.
  • Repackage the vendor's installer. Sometimes you have to build a better mouse-trap. There are tools like Advanced Installer that assist in repacking software into a custom .MSI installer. This can also be a decent, albeit laborious workaround for a vendor provided installer that does silly things.
  • Complain to your vendor. I have never seen this work but it sure makes me feel better.
  • Give up and use a hack. Sometimes the path to victory is failure. As Konrad Gajewski's has pointed out there a number of applications that can automate the clicking of buttons because life as an SCCM Administrator is absurd and without meaning.
  • +1, also I would say that in some cases the exe can be extracted to a bunch of files and folders that may contain an msi as well. – MDMoore313 May 15 '15 at 12:18
  • @kce Wonderful answer, thank you! (especially for the last two paragraphs :)) I adopted your suggestions and edited my question above. – slagjoeyoco May 19 '15 at 09:45
1

This answer is suboptimal, but since there no other ones I decided to post it:

Use autohotkey to press yes.

Konrad Gajewski
  • 1,498
  • 3
  • 15
  • 29