14 Replies Latest reply on Mar 19, 2014 12:07 PM by alan.dunne

    help with custom package

    alan.dunne

       

      I have created a custom package to install a product called changepro from
      litera.

       

      The package uninstalls previous version before installing the updated package.

      When I run the package it uninstalls the application fine. It then says
      download and install succeeded in the patch manager console but the application
      did not install on the target computer.

      Can anybody assist please.


       

        • Re: help with custom package
          Lawrence Garvin

          It then says download and install succeeded in the patch manager console but the application did not install on the target computer.


          If the installation is failing, but the WUA is reporting the update as installed successfully, that would suggest that the installer is not returning an error code on installation failure, or the wrong codes are being trapped by the package definition.


          Are you using PackageBoot? If so, it's also possible that the installation is not being launched at all, and may well not be generating any failure result codes at all, in which case the WUA would think it was a normal (successful) installation.


          A relevant question: What was logged in the WindowsUpdate.log for the installation?

            • Re: help with custom package
              alan.dunne

              Hi Lawrence

              Thanks for your reply.

               

              I am using the PackageBoot, and I do think the installation is not being launched. How would I go about fixing this, as i'm new to patch manager and support won't help as custom packages are not supported by them. I would appreciate any help.

               

              I had a look at the windowsupdate.log and it states that the application was installed.

               

              2014-03-12 15:39:11:482  428 580 Agent ** START **  Agent: Installing updates [CallerId = EminentWare Extension Pack - ARTHURCOX\swpm]

              2014-03-12 15:39:11:482  428 580 Agent *********

              2014-03-12 15:39:11:482  428 580 Agent   * Updates to install = 1

              2014-03-12 15:39:11:483  428 580 Agent   *   Title = Change Pro 7.5.0.80

              2014-03-12 15:39:11:483  428 580 Agent   *   UpdateId = {97616462-92F8-4793-BE05-13E9BF6B5C5C}.1

              2014-03-12 15:39:16:370  428 1038 Report CWERReporter finishing event handling. (00000000)

              2014-03-12 15:39:25:569  428 580 DnldMgr Preparing update for install, updateId = {97616462-92F8-4793-BE05-13E9BF6B5C5C}.1.

              2014-03-12 15:39:27:504 4556 10cc Misc ===========  Logging initialized (build: 7.6.7600.256, tz: -0000)  ===========

              2014-03-12 15:39:27:504 4556 10cc Misc   = Process: C:\Windows\system32\wuauclt.exe

              2014-03-12 15:39:27:504 4556 10cc Misc   = Module: C:\Windows\system32\wuaueng.dll

              2014-03-12 15:39:27:504 4556 10cc Handler :::::::::::::

              2014-03-12 15:39:27:504 4556 10cc Handler :: START ::  Handler: Command Line Install

              2014-03-12 15:39:27:504 4556 10cc Handler :::::::::

              2014-03-12 15:39:27:504 4556 10cc Handler   : Updates to install = 1

              2014-03-12 15:39:44:829 4556 10cc Handler   : Command line install completed. Return code = 0x00000667, Result = Succeeded, Reboot required = false

              2014-03-12 15:39:44:829 4556 10cc Handler :::::::::

              2014-03-12 15:39:44:829 4556 10cc Handler ::  END  ::  Handler: Command Line Install

              2014-03-12 15:39:44:829 4556 10cc Handler :::::::::::::

              2014-03-12 15:39:44:837  428 580 Agent *********

              2014-03-12 15:39:44:837  428 ea4 AU Triggering Offline detection (non-interactive)

              2014-03-12 15:39:44:837  428 580 Agent **  END  **  Agent: Installing updates [CallerId = EminentWare Extension Pack - ARTHURCOX\swpm]

              2014-03-12 15:39:44:837  428 ea4 AU #############

              2014-03-12 15:39:44:837  428 580 Agent *************

              2014-03-12 15:39:44:837  428 ea4 AU ## START ##  AU: Search for updates

              2014-03-12 15:39:44:837  428 ea4 AU #########

              2014-03-12 15:39:44:839  428 ea4 AU <<## SUBMITTED ## AU: Search for updates [CallId = {6BC64583-9AD2-4111-84E0-E7F8A3DE9B48}]

              2014-03-12 15:39:44:839  428 1038 Agent *************

              2014-03-12 15:39:44:839  428 1038 Agent ** START **  Agent: Finding updates [CallerId = AutomaticUpdates]

              2014-03-12 15:39:44:839  428 1038 Agent *********

              2014-03-12 15:39:44:839  428 1038 Agent   * Online = No; Ignore download priority = No

              2014-03-12 15:39:44:839  428 1038 Agent   * Criteria = "IsInstalled=0 and DeploymentAction='Installation' or IsPresent=1 and DeploymentAction='Uninstallation' or IsInstalled=1 and DeploymentAction='Installation' and RebootRequired=1 or IsInstalled=0 and DeploymentAction='Uninstallation' and RebootRequired=1"

              2014-03-12 15:39:44:839  428 1038 Agent   * ServiceID = {3DA21691-E39D-4DA6-8A4B-B43877BCB1B7} Managed

              2014-03-12 15:39:44:839  428 1038 Agent   * Search Scope = {Machine}

              2014-03-12 15:39:47:875  428 1038 Agent   * Added update {069146BB-FA95-4F69-B721-4AF488297BF5}.200 to search result

              2014-03-12 15:39:47:875  428 1038 Agent   * Added update {03E1B69D-A63B-4D2B-A2F3-C2AF43515A22}.200 to search result

              2014-03-12 15:39:47:875  428 1038 Agent   * Added update {9D437C33-CF8C-44A0-BA10-920C5F9C1B0A}.200 to search result

              2014-03-12 15:39:47:875  428 1038 Agent   * Added update {A8D01811-15DC-411F-B630-BAD762F4E18B}.200 to search result

              2014-03-12 15:39:47:875  428 1038 Agent   * Added update {CC5143ED-CE27-4DA2-A22D-C868CD8EA79F}.200 to search result

              2014-03-12 15:39:47:875  428 1038 Agent   * Added update {20B1E975-4559-4551-A2DE-E3ECD911F427}.200 to search result

              2014-03-12 15:39:47:875  428 1038 Agent   * Added update {6E98534F-0036-46CC-A51E-E97A5A3E8BA5}.201 to search result

              2014-03-12 15:39:47:875  428 1038 Agent   * Added update {8FD363A5-E64D-4DF2-8812-DB7C9715D722}.201 to search result

              2014-03-12 15:39:47:875  428 1038 Agent   * Added update {04A1DB2E-8BF3-4F31-B4FF-25ED264E3976}.201 to search result

              2014-03-12 15:39:47:875  428 1038 Agent   * Added update {53471355-B396-44DE-9049-DA91E8B1C749}.200 to search result

              2014-03-12 15:39:47:875  428 1038 Agent   * Found 10 updates and 83 categories in search; evaluated appl. rules of 454 out of 2525 deployed entities

              2014-03-12 15:39:47:875  428 1038 Agent *********

              2014-03-12 15:39:47:875  428 1038 Agent **  END  **  Agent: Finding updates [CallerId = AutomaticUpdates]

              2014-03-12 15:39:47:875  428 1038 Agent *************

              2014-03-12 15:39:47:890  428 ebc AU >>##  RESUMED  ## AU: Search for updates [CallId = {6BC64583-9AD2-4111-84E0-E7F8A3DE9B48}]

              2014-03-12 15:39:47:890  428 ebc AU   # 10 updates detected

              2014-03-12 15:39:47:890  428 ebc AU #########

              2014-03-12 15:39:47:890  428 ebc AU ##  END  ##  AU: Search for updates [CallId = {6BC64583-9AD2-4111-84E0-E7F8A3DE9B48}]

              2014-03-12 15:39:47:890  428 ebc AU #############

              2014-03-12 15:39:47:890  428 ebc AU Featured notifications is disabled.

              2014-03-12 15:39:47:891  428 ebc AU Setting AU scheduled install time to 2014-03-13 13:00:00

              2014-03-12 15:39:47:891  428 ebc AU Successfully wrote event for AU health state:0

              2014-03-12 15:39:47:891  428 ebc AU Successfully wrote event for AU health state:0

              2014-03-12 15:39:49:834  428 1038 Report REPORT EVENT: {5CE39F5D-CCEC-4558-9AD3-C5048EDC65D6} 2014-03-12 15:39:44:834-0000 1 183 101 {97616462-92F8-4793-BE05-13E9BF6B5C5C} 1 0 EminentWare Extension Pack - AR Success Content Install Installation Successful: Windows successfully installed the following update: Change Pro 7.5.0.80

                • Re: help with custom package
                  Lawrence Garvin

                  I am using the PackageBoot, and I do think the installation is not being launched. How would I go about fixing this.


                  I had a look at the windowsupdate.log and it states that the application was installed.

                  Technically, it doesn't actually say this. What it says is that the package with the name "Change Pro 7.5.0.80" completed without returning any failure error codes.

                  What actually completed is dependent upon what was configured to happen and how things took place within the wrappers, but the WUA is not actually able to determine, at this point, that the package is actually installed, only that it completed without errors.

                  On a subsequent detection event, the WUA will evaluate the Installed Rules, and report the state of "Installed" or "Not Installed" according to the results of that ruleset.


                  Consider this: The WUA launches the package. The package is actually wrapped inside a utility named packageboot.exe. PackageBoot reads the packageboot.xml and performs steps according to the logic defined therein. That logic may, or may not, actually result in the INSTALLER for the packaged product to be launched. In this case, it seems that is is not launching the INSTALLER.


                  Since  you are doing an uninstall in the <preexecution> task sequence, my best guess would be that you're not properly trapping the return codes from that uninstallation and as a result, the <preexecution> sequence is not returning the proper SUCCESS codes, causing the packageboot execution to drop out and never run the <execution> sequence. Could you load the PackageBoot Editor, click on "View XML", and copy and paste the full XML into a message here. Likely I can identify where it's breaking down from the XML.



                    • Re: help with custom package
                      alan.dunne

                      Hi

                      Below is the contents of the xml.  As I'm new to this I would say you have hit the nail on the head. How would I trap the return codes?

                       

                      <?xml version="1.0" encoding="UTF-8"?>

                      <packageboot version="2.0.0.0" id="dd53b76e-babc-410f-8901-426d0989f5f1">

                        <instructions>

                          <preexecution>

                            <filesinuse>

                              <fileinusecheck enabled="true" terminateinuseprocesses="true" type="simplepath" path="%PROGRAMFILES%\litrea\changepro" checkonlydllsandexes="true" />

                            </filesinuse>

                            <programs>

                              <program failureaction="continue" enabled="true" name="{6EEA9350-5775-407C-9D6E-A875E1312390}" type="msi" typeaction="uninstall" enablemsilogging="false" pathtype="regprependpath" regpath="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{6EEA9350-5775-407C-9D6E-A875E1312390}" regvalue="UninstallString" usewin32registry="true" successcode="0">/norestart</program>

                            </programs>

                            <services>

                              <service failureaction="stop" enabled="false" name="someservicename" action="stop" />

                              <service failureaction="stop" enabled="false" name="someotherservicename" action="stop" />

                            </services>

                            <programs>

                              <program failureaction="stop" enabled="false" name="program.exe" type="exe" typeaction="runandwait" successcode="0">/qn /norestart</program>

                              <program failureaction="stop" enabled="false" name="program.exe" type="exe" typeaction="sleepandrun" sleeptime="90">/qn /norestart</program>

                            </programs>

                            <processes>

                              <process failureaction="stop" enabled="false" name="iexplore.exe" action="terminate" />

                            </processes>

                            <filesinuse>

                              <fileinusecheck enabled="false" terminateinuseprocesses="true" type="simplepathlist" path="%PROGRAMFILES%\Java\jre\bin\client">

                                <file>jvm.dll</file>

                              </fileinusecheck>

                              <fileinusecheck enabled="false" terminateinuseprocesses="true" type="regprependpath" regpath="" regvalue="Path" usewin32registry="true" checkonlydllsandexes="true" />

                              <fileinusecheck enabled="false" terminateinuseprocesses="true" type="regprependpathlist" regpath="" regvalue="JavaHome" usewin32registry="true">

                                <file>bin\awt.dll</file>

                                <file>bin\axbridge.dll</file>

                                <file>bin\cmm.dll</file>

                                <file>bin\dcpr.dll</file>

                                <file>bin\deploy.dll</file>

                                <file>bin\deploytk.dll</file>

                                <file>bin\dt_shmem.dll</file>

                                <file>bin\dt_socket.dll</file>

                                <file>bin\eula.dll</file>

                                <file>bin\fontmanager.dll</file>

                                <file>bin\hpi.dll</file>

                                <file>bin\hprof.dll</file>

                                <file>bin\instrument.dll</file>

                                <file>bin\ioser12.dll</file>

                                <file>bin\j2pcsc.dll</file>

                                <file>bin\j2pkcs11.dll</file>

                                <file>bin\jaas_nt.dll</file>

                                <file>bin\java.dll</file>

                                <file>bin\java_crw_demo.dll</file>

                                <file>bin\jawt.dll</file>

                                <file>bin\JdbcOdbc.dll</file>

                                <file>bin\jdwp.dll</file>

                                <file>bin\jkernel.dll</file>

                                <file>bin\jli.dll</file>

                                <file>bin\jp2iexp.dll</file>

                                <file>bin\jp2native.dll</file>

                                <file>bin\jp2ssv.dll</file>

                                <file>bin\jpeg.dll</file>

                                <file>bin\jpicom.dll</file>

                                <file>bin\jpiexp.dll</file>

                                <file>bin\jpinscp.dll</file>

                                <file>bin\jpioji.dll</file>

                                <file>bin\jpishare.dll</file>

                                <file>bin\jsound.dll</file>

                                <file>bin\jsoundds.dll</file>

                                <file>bin\management.dll</file>

                                <file>bin\mlib_image.dll</file>

                                <file>bin\msvcr71.dll</file>

                                <file>bin\msvcrt.dll</file>

                                <file>bin\net.dll</file>

                                <file>bin\nio.dll</file>

                                <file>bin\npdeploytk.dll</file>

                                <file>bin\npjpi160_14.dll</file>

                                <file>bin\npoji610.dll</file>

                                <file>bin\npt.dll</file>

                                <file>bin\regutils.dll</file>

                                <file>bin\rmi.dll</file>

                                <file>bin\splashscreen.dll</file>

                                <file>bin\ssv.dll</file>

                                <file>bin\sunmscapi.dll</file>

                                <file>bin\unicows.dll</file>

                                <file>bin\unpack.dll</file>

                                <file>bin\verify.dll</file>

                                <file>bin\w2k_lsa_auth.dll</file>

                                <file>bin\wsdetect.dll</file>

                                <file>bin\zip.dll</file>

                              </fileinusecheck>

                            </filesinuse>

                          </preexecution>

                          <execution>

                            <programs>

                              <program failureaction="stop" enabled="true" name="lcp_tdc7m4.msi" type="msi" typeaction="install" enablemsilogging="false" successcode="0, 1234, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 1633, 1634, 1641, 3010">/norestart /qn</program>

                            </programs>

                          </execution>

                          <postexecution>

                            <programs>

                              <program failureaction="stop" enabled="false" name="postprogram.exe" type="exe" typeaction="runandwait" successcode="0"></program>

                              <program failureaction="stop" enabled="false" name="wusa.exe" type="exe" typeaction="sleepandrun" sleeptime="60" pathtype="simplepath" path="%windir%\system32">%MODULEPATH%\Windows6.0-KB968930-x86.msu /quiet /norestart</program>

                              <program failureaction="stop" enabled="false" name="helper.exe" type="exe" typeaction="runandwait" pathtype="regprependpath" regpath="HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox\3.0.14 (en-US)\Uninstall" regvalue="Uninstall Log Folder" successcode="0">-S</program>

                            </programs>

                            <services>

                              <service failureaction="continue" enabled="false" name="someservice" action="start" />

                            </services>

                          </postexecution>

                        </instructions>

                      </packageboot>

                        • Re: help with custom package
                          Lawrence Garvin

                          First thing I would suggest is to strip out all of the Sample Rules from your package, and republish the package with just your three rules.

                           

                          Taking all of the noise out of the XML file, this is what's actually there:

                           

                          <?xml version="1.0" encoding="UTF-8"?>

                          <packageboot version="2.0.0.0" id="dd53b76e-babc-410f-8901-426d0989f5f1">

                            <instructions>

                              <preexecution>

                                <filesinuse>

                                  <fileinusecheck enabled="true" terminateinuseprocesses="true" type="simplepath" path="%PROGRAMFILES%\litrea\changepro" checkonlydllsandexes="true" />

                                </filesinuse>

                                <programs>

                                  <program failureaction="continue" enabled="true" name="{6EEA9350-5775-407C-9D6E-A875E1312390}" type="msi" typeaction="uninstall" enablemsilogging="false" pathtype="regprependpath" regpath="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{6EEA9350-5775-407C-9D6E-A875E1312390}" regvalue="UninstallString" usewin32registry="true" successcode="0">/norestart</program>

                                </programs>

                              </preexecution>

                              <execution>

                                <programs>

                                  <program failureaction="stop" enabled="true" name="lcp_tdc7m4.msi" type="msi" typeaction="install" enablemsilogging="false" successcode="0, 1234, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 1633, 1634, 1641, 3010">/norestart /qn</program>

                                </programs>

                              </execution>

                              <postexecution>

                              </postexecution>

                            </instructions>

                          </packageboot>

                           

                          I notice that the Check Files In Use rule is missing a failureaction parameter. That may be a 'bug' in our XML generator, but I'm pretty sure it should be there.

                           

                          It's also important to understand the order of execution of steps. The <programs> section is executed before the <filesinuse> section, so if the uninstallation is successful, there is nothing to terminate in the <filesinusecheck> In fact, the specified path may not even exist at that point. I'm investigating as to what the behavior of the <filesinusecheck> would be with (a) the failureaction parameter missing, or (b) an undefined pathname, but it's possible that this rule is resulting in a failure code and aborting the package boot.

                           

                          Try setting the <filesinusecheck> to enabled=FALSE and republish the package. The filecheck is not really relevant anyway, since you've already uninstalled the package. If it addressed the unexpected behavior, then just delete the rule completely.

                           

                          Also, the FailureAction for your <program> element probably should be FAIL, rather than "continue"... if the uninstallation fails, there's no point in attempting the installation, correct?

                            • Re: help with custom package
                              alan.dunne


                              Hi Lawrence

                               

                              I have disabled the file in use check and republished the package.

                              I have ran the package on the target computer but the same result happens.

                              It didn't install on the machine but it did do the uninstall.

                                • Re: help with custom package
                                  alan.dunne

                                  Hi Lawrence

                                   

                                  Would you have any other suggestions, I could try?

                                  Is it actually possible to uninstall a program and install a new version in the same package?

                                   

                                  Would the applicability or installed rules make a difference here as I am using files exists with registry key.

                                    • Re: help with custom package
                                      Lawrence Garvin
                                      Would you have any other suggestions, I could try?

                                      Yes. Email me the MSI logs generated from the uninstaller (and installer, if one was) and the PackageBoot.log.

                                      SolarWinds Knowledge Base :: How to enable logging for PackageBoot issues

                                      (Email address is in my Thwack profile.)

                                       

                                      Is it actually possible to uninstall a program and install a new version in the same package?

                                       

                                      It is possible, but it's rarely necessary. The installer should be fully capable of dealing with an "upgrade" environment.

                                      Did you test that scenario prior to building the package?

                                       

                                      Would the applicability or installed rules make a difference here as I am using files exists with registry key.

                                       

                                      Anything could make a difference if it's configured incorrectly. But since we know that the packageboot is executing (by virtue of the uninstaller running), that tells us that the package was properly evaluated and the rules are not of immediate concern.

                                        • Re: help with custom package
                                          alan.dunne

                                          Hi Lawrence

                                           

                                          I have just sent you the log from the package boot.

                                          There was no logs generated from the uninstall of the msi.

                                           

                                          Please let me know what you find.

                                           

                                          Unfortunately for this software you have to manually uninstall the previous version before installing the new version.

                                            • Re: help with custom package
                                              Lawrence Garvin

                                              In your original PackageBoot package you have enablemsilogging set to FALSE on the installer. Did you set it to TRUE to capture a log file? It's also disabled for the installer; please enable it and rerun the entire package. One of the possible considerations here is that it's th *installer* doing the uninstall and then failing the installation. The log files will help confirm which is occurring.

                                               

                                              I'm looking at the PackageBoot.log now.

                                              • Re: help with custom package
                                                Lawrence Garvin

                                                Three things I note from the PackageBoot log

                                                 

                                                1. The uninstaller is generating a reboot required condition. That may or may not be impacting the remainder of the operation. As previously noted, Ideally the installer will handle any required uninstallations.

                                                 

                                                2014/03/18 15:02:37:502 PID: 7040 TID:  6240 [INFO] programobject::execute(msi) install called for program name: C:\Windows\SoftwareDistribution\Download\Install\lcp_tdc7m4.msi

                                                2014/03/18 15:02:37:506 PID: 7040 TID:  6240 [INFO] installer::installmsipackage() called with fqpathtomsi to MSI file: C:\Windows\SoftwareDistribution\Download\Install\lcp_tdc7m4.msi. Command Line: /norestart /qn

                                                2014/03/18 15:02:37:930 PID: 7040 TID:  6240 [INFO] Info 1639.Invalid command line argument. Consult the Windows Installer SDK for detailed command line help.

                                                /NORESTART

                                                 

                                                2. It seems that there's still an invalid /NORESTART parameter in the installer's command line. This parameter is coming from the QUA defaults, so the question becomes: Why does this installer not like this standard parameter?

                                                2014/03/18 15:02:37:951 PID: 7040 TID:  6240 [INFO] installer::installmsipackage() called MsiInstallProduct for MSI file: C:\Windows\SoftwareDistribution\Download\Install\lcp_tdc7m4.msi and return code was: 1639

                                                2014/03/18 15:02:37:955 PID: 7040 TID:  6240 [INFO] programobject::execute(msi) install completed for program name: C:\Windows\SoftwareDistribution\Download\Install\lcp_tdc7m4.msi and process exit code was: 0x667

                                                2014/03/18 15:02:37:960 PID: 7040 TID:  6240 [VERB] ewException caught: [Failed to execute process], File: ExecutionEngine.cpp, Line: 1184

                                                 

                                                As a result, the installer is failing. Exit code 1639 is undefined, so that should be returning a "Failure" response from the WUA.

                                                1 of 1 people found this helpful
                                                  • Re: help with custom package
                                                    alan.dunne

                                                    Hi Lawrence

                                                     

                                                    Thanks, I took the /norestart switch out of the package boot and now it works. Thanks for your help.

                                                     

                                                    I just have one more question:

                                                     

                                                    Can I schedule the package to download but only install before the pc shuts down?

                                                      • Re: help with custom package
                                                        Lawrence Garvin

                                                        Thanks, I took the /norestart switch out of the package boot and now it works.


                                                        I think I got mentally confused between this thread and a similar one I was discussing with another customer where we also removed these unnecessary parameters.


                                                            <execution>

                                                              <programs>

                                                                <program failureaction="stop" enabled="true" name="lcp_tdc7m4.msi" type="msi" typeaction="install" enablemsilogging="false" successcode="0, 1234, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 1633, 1634, 1641, 3010">/norestart /qn</program>

                                                              </programs>

                                                            </execution>

                                                         

                                                        I completely missed the /norestart /qn in the user-defined parameters the first time through.

                                                        As noted in the Package Wizard UI, these parameters should never be defined with an MSI package:

                                                         

                                                        3-19-2014 11-59-55 AM.png