Skip navigation
1 2 3 Previous Next 5284 Views 32 Replies Latest reply: Feb 27, 2012 1:35 PM by AspenSkier RSS
AspenSkier Specialist 479 posts since
Apr 29, 2010

Has received 3 of 9 achievements.
Currently Being Moderated

Feb 16, 2012 6:26 PM

How does one get Patch Manager to uninstall .msi?

So I must admit that am am still new to LDMS 9.0 SP2 patch manager, but I should at least stick up for myself and say that I have several custom definitions working.

 

Today I'm trying to expand my patch manager skills a bit and create a dependancy relationship between two custom definitions.  It looks like this:

 

  • I have some existing software that needs to be updated
  • the new software requires that the old software be removed before being installed
  • First I need to bring a OLDsoftware.MSI file down to a client because the original was on a network share
  • I need to use MSIEXEC.EXE with that OLDsoftware.MSI file to remove the old version of the software
  • Next I need to have the NEWsoftware.MSI file down to the client
  • Then I need to use MSIEXEC.EXE with the NEWsoftware.MSI file to get the new version installed.

 

this seems very straightforward to me.  I've got the 2nd part down such that I can install the new software when the old software is gone.  That custom definition works fine.

 

My problem lies in the other custom definition that removes the old software.  Eventually I will create the dependency between the two definitions, but I can't get this one to work.  I can get detection to work just fine, even bring the OLDsoftware.MSI file down, but I can never get it to uninstall the old software.

 

***quick sidebar, I am bringing the OLDsoftware.MSI file back down to the client in order to simplify this scenario because it was originally on a network share and I want to avoid any permissions problems and just have the local computer remove the software with a locally stored MSI file***

 

I've tried several different ways of getting the uninstall action to happen.

 

I've tried a .ZIP file of the .MSI, unpacking it to %SDMCACHE% as well as %TEMP%, then executing MSIEXEC.EXE with the appropriate %variable%.  Whatever I do here the execution will fail.

 

I've tried bringing the .MSI file across to the same two locations and just going about the uninstall with MSIEXEC.EXE against it, still fails.

 

I've tried connecting to the network share with hard-coded credentials to copy the file down, etc.  Again, the execution of MSIEXEC.EXE fails.

 

In each case I can go to the SDMCACHE folder and see the OLDsoftware.MSI file or .ZIP.  Whenever I try to use %temp% and zip I don't see it get unzipped to that location.  If I use the command line and manually execute MSIEXEC.EXE and point it to where Patch Manager put the .MSI, it will uninstall w/o problem.  It is always a simple matter that Patch Manager just can't uninstall.

 

 

I know that I have the correct command line arguments to get the package uninstalled; I know I have the correct .MSI file necessary for the uninstall to happen; I know I can always manually execute the uninstall command when I have the MSI file...I just can't get patch manager to actually make the uninstall happen.

 

any ideas on how I can get this to work?

  • MarXtar SSMMVPGroup 2,061 posts since
    Jul 2, 2008

    Has received 8 of 9 achievements.

    This sounds more like what normal software distribution is designed to achieve. Define two packages, one which is an uninstall for the old one, one that is an install for the new one but with a dependency on the uninstall. Create a query that targets your install package and away you go. Obviously a bit more than that, but in essence it is built to do this.

     

    Mark McGinn

    MarXtar Ltd

    http://landesk.marxtar.co.uk

    LANDesk Silver ESP

     

    Join us on the 23rd Feb for our UK LANDesk Mobility Seminar (Smart, Laptop & Data) - Food & Fun too!

     

    The One-Stop Shop for LANDesk Enhancements

    - Wake-On-WAN - Distributed Wake-On-LAN, Scheduled Power Down, and SWDist Sequencing

  • RichardA Apprentice 152 posts since
    Apr 14, 2010

    Has received 4 of 9 achievements.

    Unless something is broken (or you've gone out of your way to clean up certain caches) you shouldn't need the old MSI to uninstall the old package -  msiexec.exe /x {productguid} should do the trick.

     

    You could include that as the first action in your repair steps, thus removing the need to have two separate definitions.

     

    Besides, I don't think dependancies in Patch Manager work the way you're thinking. If a patch it dependant on another, it won't even be detected until the other patch is repaired, as far as I'm aware. It's for handling things like a hotfix that only applied to a certain service pack.

  • Frank Wils SSMMVPGroup 1,214 posts since
    Feb 25, 2008

    Has received 8 of 9 achievements.

    What is in your vulscan.log files? Can you get any clue from there as to why the MSIEXEC might fail?

     

    Frank

  • mrspike SSMMVPGroup 1,321 posts since
    Dec 19, 2007

    Has received 9 of 9 achievements.

    I have done similar things by using a .bat file that handles everything.

     

     

    Some things to do and know...

     

    The sdmcache folder in Win 7 is restricted, so do not call anything from that location

     

    What I do is create a batch file that calls all of the commands to uninstall, install etc.

     

    I suggest using this as a variable in the batch file for the location:

    %WINDIR%\TEMP\your_package_name

     

    Gather all .msi , .exe and your bat file and zip them into a single file, we will call it widget.zip

     

    In the patch secion of your custom def, add the widget.zip file as the patch and hash it.

     

    Now in the patch installation steps you add unzip a file, then add execute a file

     

    See the images in the pdf I attached for help on that

     

    Good luck

  • mrspike SSMMVPGroup 1,321 posts since
    Dec 19, 2007

    Has received 9 of 9 achievements.

    Let's try the pdf again

    Attachments:
  • Frank Wils SSMMVPGroup 1,214 posts since
    Feb 25, 2008

    Has received 8 of 9 achievements.

    What does your batch file look like? Can you post it here?

     

    Frank

  • RichardA Apprentice 152 posts since
    Apr 14, 2010

    Has received 4 of 9 achievements.

    Is it conceivable you're running into good ol' user context issues? That's usually the root cause when something works fine when run manually, but fails when run using a management tool such as LANDesk. If uninstallation works when run as a user, but fails as system, is it possible the MSI is somehow crafted such that is need a real user context?

     

    Software distribution can run installers under the current user context. I'm not sure if Patch Manager can do the same, although you may be able to coerce it by having vulscan call sdclient /runasuser.

  • mrspike SSMMVPGroup 1,321 posts since
    Dec 19, 2007

    Has received 9 of 9 achievements.
    Currently Being Moderated
    12. Feb 23, 2012 8:14 AM (in response to RichardA)
    Re: How does one get Patch Manager to uninstall .msi?

    vulscan and sdclient cannot run at the same time if my memory serves correctly

  • Frank Wils SSMMVPGroup 1,214 posts since
    Feb 25, 2008

    Has received 8 of 9 achievements.
    Currently Being Moderated
    13. Feb 23, 2012 8:21 AM (in response to mrspike)
    Re: How does one get Patch Manager to uninstall .msi?

    Correct. The SDclient will either fail cause the vulscan is running or stay in the taskqueque. I just dont know if this will cause the vulscan action to fail and the SDclient to run after, or that the vulscan will wait for the sdclient to finish, creating a never-ending loop...

     

    Frank

  • RichardA Apprentice 152 posts since
    Apr 14, 2010

    Has received 4 of 9 achievements.

    Good point. Sorry, forgot about that.

1 2 3 Previous Next

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 20 points
  • Helpful Answers - 10 points
LANDESK Community powered by Jive SBS® 4.5.7.1  |  Legal Notices  |  Privacy Policy  |  Icon 

TweeterOn Twitter  |  Icon FacebookOn Facebook © 2007 LANDESK Software