1 2 3 Previous Next 32 Replies Latest reply: Feb 27, 2012 1:35 PM by AspenSkier Go to original post RSS
      • 15. Re: How does one get Patch Manager to uninstall .msi?
        Tanner Lindsay SupportEmployee

        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.

        • 16. Re: How does one get Patch Manager to uninstall .msi?
          RichardA Apprentice
          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?

          • 17. Re: How does one get Patch Manager to uninstall .msi?
            AspenSkier Specialist

            I appreciate all the help:

             

            contents of one .bat file:

             

            cd\windows\system32
            msiexec.exe /uninstall C:\windows\temp\student.msi /passive /norestart

             

             

             

            The only thing that maybe is missing is a C: to start things off, in the event that somehow the patch manager doesn't launch in a working directory on the C: drive.  Everything related to the system and to landesk is on C:\.

             

             

             

            The publisher of the MSI tells me that they have a pretty straight forward product with no weird requirements or behaviors.  I wasn't counting on anything being problematic with the MSI side of the equation.

             

            So at this point I'm not sure what to do.  I updated my scan & repair settings and put in some credentials for run as, didn't change anything.  The results are still the same with the same error code.

            • 18. Re: How does one get Patch Manager to uninstall .msi?
              Frank Wils SSMMVPGroup

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

              • 19. Re: How does one get Patch Manager to uninstall .msi?
                Tanner Lindsay SupportEmployee

                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.

                • 20. Re: How does one get Patch Manager to uninstall .msi?
                  AspenSkier Specialist

                  I am attaching some relevant info from the vulscan.log file

                   

                   

                  -------------------Patch Installation----------------------
                  Getting list of autofix patches
                  Sat, 18 Feb 2012 11:36:20 HTTP POST: http://LANDESK/WSVulnerabilityCore/VulCore.asmx
                  Sat, 18 Feb 2012 11:36:20 Setting a proxy...
                  Sat, 18 Feb 2012 11:36:20 Setting socket timeout to 1000 * 60 * 4
                  Sat, 18 Feb 2012 11:36:21 Success
                  Last status:
                  1 patches were found to run
                  Last status: Done.  1 patches were found
                  File 'C:\Program Files (x86)\LANDesk\LDClient\sdmcache\InsightStudent751.zip' is up to date
                  mutex is locked.
                  Launched vulscan to detect full screen app.  It returned: 0
                  Found an active WTS session at index 1
                  Creating UI executable
                  Succeeded
                  Sending WM_REPAIRMESSAGE: LANDesk Security and Compliance Manager has scanned this computer and found that it requires software updates.  Your computer should update but not restart.  You should be able to continue working.

                   

                  -this activity is normal in most cases, however if you see this message frequently, please contact David @ xtn 1137

                   

                  1:  removes version 7.51 of Faronics Insight Classroom Management software, both teacher and student versions


                  Last status: Done.  Beginning repair
                  Running patch InsightStudent751.zip
                  ShouldScan InsightStudent751.zip before repairing returned: 0
                  Patch directory : 'C:\Program Files (x86)\LANDesk\LDClient\sdmcache\'
                  Patch name : 'InsightStudent751.zip'

                  Command Interpreter running
                  Unzip C:\Program Files (x86)\LANDesk\LDClient\sdmcache\InsightStudent751.zip to directory C:\Windows\TEMP
                  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)
                  ERROR(Execute) Failed to run command  - 80004005
                  DownloadPatch ERROR: Failed to run commands (80004005).
                  Last status: Failed
                  In SendRequest: Action = SOAPAction: "http://tempuri.org/SetPatchInstallStatus"


                  Sat, 18 Feb 2012 11:37:24 SendRequest: SOAPAction: "http://tempuri.org/SetPatchInstallStatus"


                  Sat, 18 Feb 2012 11:37:25 Success
                  Last status:
                  Last status: Done
                  RunPatches completed.  1 processed.  0 installed.  1 failures.
                  Reboot and rescan.  Rescan set to false, so doing nothing.
                  Sat, 18 Feb 2012 11:37:25 Exiting with return code 0x8db3019c.

                   

                  --------------

                   

                  -------------------ProcessRules of type 4----------------------
                  Getting definition data from core LANDESK
                  Fri, 24 Feb 2012 14:21:30 HTTP POST: http://LANDESK/WSVulnerabilityCore/VulCore.asmx
                  Fri, 24 Feb 2012 14:21:30 Setting a proxy...
                  Fri, 24 Feb 2012 14:21:30 Setting socket timeout to 1000 * 60 * 4
                  Fri, 24 Feb 2012 14:21:30 Success
                  Last status:
                  Last status: Done
                  Last status: Done
                  Last status: Done
                  Last status: Done
                  Processing vulnerability AHSremove-FaronicsInsightv7.51
                  Checking vulnerability AHSremove-FaronicsInsightv7.51, rule index 0
                  In SendRequest: Action = SOAPAction: "http://tempuri.org/IsComputerIdnInQueryResult"


                  Fri, 24 Feb 2012 14:21:30 SendRequest: SOAPAction: "http://tempuri.org/IsComputerIdnInQueryResult"


                  Fri, 24 Feb 2012 14:21:30 Success
                  Last status:
                       Computer is in result set for query: landesk_20
                       No products specified for vulnerability.  Assuming it applies.
                  File C:\Program Files (x86)\Faronics\Insight\student.exe version within specified
                  File c:\Program Files (x86)\Faronics\Insight\student.exe version less than 7.62.2232.7620
                  AHSremove-FaronicsInsightv7.51 detected
                  VUL: 'AHSremove-FaronicsInsightv7.51' DETECTED.  Reason 'File that must NOT exist was found'.  Expected ''.  Found 'C:\Program Files (x86)\Faronics\Insight\student.exe'.  Patch required 'ASD\InsightStudent751.zip'.

                     Patch is NOT installed
                  Checking vulnerability AHSremove-FaronicsInsightv7.51, rule index 1
                  In SendRequest: Action = SOAPAction: "http://tempuri.org/IsComputerIdnInQueryResult"


                  Fri, 24 Feb 2012 14:21:31 SendRequest: SOAPAction: "http://tempuri.org/IsComputerIdnInQueryResult"


                  Fri, 24 Feb 2012 14:21:31 Success
                  Last status:
                       Computer is in result set for query: landesk_20
                       No products specified for vulnerability.  Assuming it applies.
                  VUL: 'AHSremove-FaronicsInsightv7.51' not detected.  File/OS version(s) verified

                     Patch is NOT installed

                  &*(^^^^^^^^^^^^^^^

                   

                   

                  Processing vulnerability AHSinstall-FaronicsInsightv7.62
                  AHSinstall-FaronicsInsightv7.62 detected
                  VUL: 'AHSinstall-FaronicsInsightv7.62' DETECTED.  Reason 'One or more prerequisite definitions were detected.'.  Expected ''.  Found 'AHSremove-FaronicsInsightv7.51'.  Patch required 'Dependency'.

                  Processing vulnerability AHSremove-SophosAntivirusv10
                  Checking vulnerability AHSremove-SophosAntivirusv10, rule index 0
                  In SendRequest: Action = SOAPAction: "http://tempuri.org/IsComputerIdnInQueryResult"


                  Fri, 24 Feb 2012 14:21:32 SendRequest: SOAPAction: "http://tempuri.org/IsComputerIdnInQueryResult"


                  Fri, 24 Feb 2012 14:21:33 Success

                  Fri, 24 Feb 2012 14:21:33 Success
                  Last status:
                  Last status: Done
                  ProcessRules Succeeded.
                  -------------------Patch Installation----------------------
                  Getting list of autofix patches
                  Fri, 24 Feb 2012 14:21:33 HTTP POST: http://LANDESK/WSVulnerabilityCore/VulCore.asmx
                  Fri, 24 Feb 2012 14:21:33 Setting a proxy...
                  Fri, 24 Feb 2012 14:21:33 Setting socket timeout to 1000 * 60 * 4
                  Fri, 24 Feb 2012 14:21:33 Success
                  Last status:
                  1 patches were found to run
                  Last status: Done.  1 patches were found
                  File 'C:\Program Files (x86)\LANDesk\LDClient\sdmcache\InsightStudent751.zip' is up to date
                  mutex is locked.
                  Launched vulscan to detect full screen app.  It returned: 0
                  Found no active WTS sessions.  Looking for the logged on user process token
                  Last status: Done.  Beginning repair
                  Successfully loaded user profile
                  RunPatches completed.  1 processed.  0 installed.  1 failures.
                  Reboot and rescan.  Rescan set to false, so doing nothing.
                  Fri, 24 Feb 2012 14:22:05 Exiting with return code 0x8db3019c.

                   

                   

                   

                  The last entry is after I made some changes to the scan and repair settings.

                   

                   

                   

                   

                   

                  **********

                  changed the .BAT file to call MSIEXEC.EXE w/o the CD ahead of it>got the following:

                   


                  Last status: Done.  Beginning repair
                  Running patch InsightStudent751.zip
                  ShouldScan InsightStudent751.zip before repairing returned: 0
                  Patch directory : 'C:\Program Files (x86)\LANDesk\LDClient\sdmcache\'
                  Patch name : 'InsightStudent751.zip'

                  Command Interpreter running
                  Unzip C:\Program Files (x86)\LANDesk\LDClient\sdmcache\InsightStudent751.zip to directory C:\Windows\temp
                  Executing C:\Windows\temp\uninstallinsightstudent.bat
                  ERROR: C:\Windows\temp\uninstallinsightstudent.bat  returned a bad exit code (1)
                  ERROR(Execute) Failed to run command  - 80004005
                  DownloadPatch ERROR: Failed to run commands (80004005).
                  Last status: Failed
                  Sending status to core
                  In SendRequest: Action = SOAPAction: "http://tempuri.org/SetPatchInstallStatus"


                  Fri, 24 Feb 2012 14:52:38 SendRequest: SOAPAction: "http://tempuri.org/SetPatchInstallStatus"


                  Fri, 24 Feb 2012 14:52:39 Success
                  Last status:
                  Last status: Done
                  RunPatches completed.  1 processed.  0 installed.  1 failures.
                  Reboot and rescan.  Rescan set to false, so doing nothing.
                  Failed
                  Fri, 24 Feb 2012 14:53:03 Exiting with return code 0x8db3019c.

                  • 21. Re: How does one get Patch Manager to uninstall .msi?
                    Frank Wils SSMMVPGroup

                    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

                    • 22. Re: How does one get Patch Manager to uninstall .msi?
                      mrspike SSMMVPGroup

                      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

                      • 23. Re: How does one get Patch Manager to uninstall .msi?
                        mrspike SSMMVPGroup

                        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"?

                        • 24. Re: How does one get Patch Manager to uninstall .msi?
                          AspenSkier Specialist

                          before my first post on this topic I tried the msiexec.exe /x {string} and it failed.  I tried again with the .MSI and it worked.  From that Point I set about using Patch Manger to take care of it.  I'm not sure why the /x option failed but I am sure I'd rather devote troubleshooting time to learning Patch Manager...

                           

                           

                          ...regarding the 'blocked' idea; that sounds like a good idea to me, but didn't I rule that out when I manually executed the .bat file on the client?  That should have covered both the .MSI and .BAT files, right?

                          • 25. Re: How does one get Patch Manager to uninstall .msi?
                            Tanner Lindsay SupportEmployee

                            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.

                            • 26. Re: How does one get Patch Manager to uninstall .msi?
                              AspenSkier Specialist

                              I was going to save the following question for the end of this thread, once the fix was in place, but I have changed my mind.  Please excuse me, but I really feel the need to ask what i consider an important and valid question:

                               

                              After paying for Patch Manager, or LDMS for that matter, why the heck do I need to write a script to remove or install a piece of software, especially a MSI package?

                               

                               

                              I very clearly have the ability to push an install package down to a client and it is very clear that I am being provided an opportunity to specify the command line with arguments.  Why am I having to create a separate script and then create complex custom definition to get this to work?  It does not inspire confidence when Landesk publishes a document which says that a single file should be .zipped, downloaded, expanded, then run instead of just downloading and running it.  I've got the notion from reading other posts that others are not relying on simplicity either...Is it just that the Patch Manger is so unreliable that we have to resort to this kind of complexity in constructing solutions with it?

                              • 27. Re: How does one get Patch Manager to uninstall .msi?
                                Tanner Lindsay SupportEmployee

                                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

                                • 28. Re: How does one get Patch Manager to uninstall .msi?
                                  AspenSkier Specialist

                                  RE x86 vs 64

                                   

                                   

                                  I have only 64-bit systems, so I'm kind of stuck on that front.

                                  • 29. Re: How does one get Patch Manager to uninstall .msi?
                                    mrspike SSMMVPGroup

                                    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...