Skip navigation
1 2 3 Previous Next 5283 Views 32 Replies Latest reply: Feb 27, 2012 1:35 PM by AspenSkier RSS Go to original post
  • tanner SupportEmployee 155 posts since
    Jun 4, 2008

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

    You actually can use Patch Manager to install something as a specified user, just not automatically the currently logged on user. For example, you could run the patch/install/uninstall as a special domain service/administrator account, instead of the standard SYSTEM account on the client. That option is set up in the Scan and Repair settings in the "MSI Information" section. It is a bit misleading because an account configured here will be used for all patch installations, not just MSIs. You can see more here: http://community.landesk.com/support/docs/DOC-10654#MSI_Information.

     

    It would be very interesting to see the error in the vulscan log when the direct running of the MSI for the uninstall doesn't work.

  • RichardA Apprentice 152 posts since
    Apr 14, 2010

    Has received 4 of 9 achievements.
    Currently Being Moderated
    16. Feb 24, 2012 7:26 AM (in response to tanner)
    Re: How does one get Patch Manager to uninstall .msi?
    MSI Information: Some patches require access to the install MSIs and this allows them to find the correct MSIs.
    • Original package location: This is used to specify a network path containing original MSIs.

     

    Okaaaaaay. That sounds like it's designed to fix exactly the problem that Mr Skier is trying to work around in the first place!

     

    And that's a really useful document, thanks Tanner. In several places it does a far better job of explaining the purpose of options than the LANDesk manual itself. Which begs the question I find myself asking all-too-often: Why is it hidden away in a Community document and not simply included in the LANDesk Manual/Help file?

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

    Has received 8 of 9 achievements.

    Try without the whole path, just msiexec. It should be in the windows path variable.  Frank

  • tanner SupportEmployee 155 posts since
    Jun 4, 2008

    Has received 5 of 9 achievements.

    Can you attach the vulscan log where the repair is attempted? That can be extremely helpful.

     

    You can find it on the client at C:\ProgramData\vulscan or C:\Documents and Settings\All Users\Application Data\vulscan. A cool shortcut is to open Start > Run and type "vulscan e". It will open right to the log directory. There may be several vulscan logs. If you aren't sure which one has the repair, zip up all the vulscan.log and vulscan.x.log and attach them.

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

    Has received 8 of 9 achievements.

    Another idea... Instead of using the MSI, why dont you lookup the uninstall string from your msi in the registry and call that? From memory, you need to change the command from /x to /u though... That way you take the msi out of the picture.  Frank   Ah, also, just came to my mind, check the properties from the copied MSI. Maybe it's 'blocked' by downloading from an untrusted source

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

    Has received 9 of 9 achievements.

    As mentioned, you do not need to (on a normal system) change to the system32 directory for msiexec, it should already be set in the environment.

     

    If you feel you need to change directories, this would be best:

     

     

    cd %WINDIR%\system32

     

    I use "Windows Installer" command lines vs. "Standard Installer" commands, I tried to find information on which is "best" but could not.... most commands I see in use on appdeploy, etc, use the "Windows Installer" commands.

     

     

     

    This is how I would make my batch file look:

     

     

    @ECHO ON

     

    msiexec.exe /x %WINDIR%\TEMP\student.msi /qn REBOOT=Suppress

     

     

    It might exit with a failure in your task, even if it succeeded if the exit code is something other than "0", which is often the case do to a rending reboot.

     

    You might need to test this out by adding this as the next line in a batch file you are testing with to see what the exit code was:

     

     

    @ECHO ON

     

    msiexec.exe /x %WINDIR%\TEMP\student.msi /qn REBOOT=Suppress

    ECHO %ERRORLEVEL%

    Pause

     

    You could then take that error code and add in exit code checking and IF statements...

     

    Say the exit code was 3010 (a standard return code)  Here is a list of standard exit codes and their meaning

     

    http://desktopengineer.com/windowsinstallererrorcodes

     

     

    @ECHO ON

     

    msiexec.exe /x %WINDIR%\TEMP\student.msi /qn REBOOT=Suppress

    IF %ERRORLEVEL%==3010 EXIT /B 0

    IF %ERRORLEVEL%==0 EXIT /B 0
    EXIT /B %ERRORLEVEL%

     

    I have been remiss in using exit codes in a lot of my scripts, and am rather new to them.... so there might be some better ways that others will pont out.

     

    Also, a great read is this article, though I have trouble getting the format of their exit codes to work..

     

    "Understanding Batch File.."

    http://community.landesk.com/support/docs/DOC-2320

     

     

    Hope this helps

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

    Has received 9 of 9 achievements.
    Currently Being Moderated
    23. Feb 24, 2012 3:08 PM (in response to mrspike)
    Re: How does one get Patch Manager to uninstall .msi?

    To add what Frank said about checking the .msi regarding it might be blocked... (I find doing this from a Server 2008 box works better, but Windows 7 should work), right click on the .msi and choose properties... where you see "read only" does it say "BLOCKED"?

  • tanner SupportEmployee 155 posts since
    Jun 4, 2008

    Has received 5 of 9 achievements.
    Currently Being Moderated
    25. Feb 24, 2012 3:28 PM (in response to mrspike)
    Re: How does one get Patch Manager to uninstall .msi?

    The important line for me is :

     

    Executing C:\Windows\system32\msiexec.exe /uninstall "C:\Windows\TEMP\student.msi" /passive
    ERROR: C:\Windows\system32\msiexec.exe /uninstall "C:\Windows\TEMP\student.msi" /passive returned a bad exit code (1612)

     

    The (1612) is the error that msiexec returned. The link James shared has the exit codes. You can also look here: http://msdn.microsoft.com/en-us/library/ms681385(v=vs.85).aspx

     

    1612 means "ERROR_INSTALL_SOURCE_ABSENT" I know you are copying it down there, so I'm not sure why msiexec can't find it. Maybe some MSI logging can help? - http://support.microsoft.com/kb/223300. I think it can be added to the command line as well.

     

    It is odd that it works manually, because you aren't using anything I would expect LocalSystem (the user running vulscan) to have a problem with (like user folders and such)

     

    What about x86 vs x64? Have you tried this on both architectures? I wonder if there is something odd in there.

  • tanner SupportEmployee 155 posts since
    Jun 4, 2008

    Has received 5 of 9 achievements.
    Currently Being Moderated
    27. Feb 24, 2012 3:34 PM (in response to tanner)
    Re: How does one get Patch Manager to uninstall .msi?

    Also, I don't think you need the zip file and the unzip step. I think it adds complication. I would set the patch so that it has to download the MSI, then the MSI will be in the sdmcache on the client. Then set it up like this one:

    How to create a custom definition and install a MSI file.

     

    Basically you will just have one 'Execute a program' command. Set the path to %windir%\system32\msiexec.exe (or skip the path as James has said), then set the commands to something like /x "$(FULLPATHTOBINARY)$(PATCHBINARY)" /q

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

    Has received 9 of 9 achievements.
    Currently Being Moderated
    29. Feb 24, 2012 3:39 PM (in response to tanner)
    Re: How does one get Patch Manager to uninstall .msi?

    Tanner, the reason I had the zip mentioned was in in his (?) first post he wanted a single package to uninstall "x" and then install "y", which to me is eaiser done with a script and everything zipped together...

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