7 Replies Latest reply on Nov 24, 2014 10:14 AM by russo1203

    Issue running batch file via packageboot post execution

    russo1203

      I am having an issue running a batch file via packageboot post execution. Everything appears to be in order. I have verified that the XML code is as I wanted and enabled logging. I have never utilized the log before, but I do not see any issues or information to point me in the right direction. If I run the batch file alone from the Install directory, everything is applied as expected. Any assistance would be appreciated. XML, log and batch attached.

        • Re: Issue running batch file via packageboot post execution
          jbaits

          In packageboot.xml you need to change enabled="false" to enabled="true".

            • Re: Issue running batch file via packageboot post execution
              russo1203

              Wow.. I did in fact totally miss that. I must have somehow unchecked.

               

              So I fixed that issue but am now receiving the following errors when attempting to run. However, the exe I have pushed installs, then it errors out when it gets to running the batch file in the packageboot XML. I have also approved for a test group and it "fails" also, except the setup.exe -s -setup.iss runs and installs, just stops running at the batch file.

               

              Error when using the Update management wizard:

              Install
              Object:
              Clarify 8.1.0.8
              Status: Failed


              Details: MSI Installer failed to start. Please ensure that clients are enabled to receive signed 3rd party updates with Windows Update Local Policy Management wizard.

              Exception Details:
              Install failed. Fatal error during installation HRESULT: 0x80070643

               

               

              Windowsupdate.log entry when approving the install:

               

              2014-11-04 11:33:33:677  380 da8 Agent   *   Title = Clarify 8.1.0.8

              2014-11-04 11:33:33:677  380 da8 Agent   *   UpdateId = {138B1579-A06C-483F-8F4D-6F17ED9CB6C8}.1

              2014-11-04 11:33:38:148  380 1608 Report CWERReporter finishing event handling. (00000000)

              2014-11-04 11:33:44:541  380 da8 DnldMgr Preparing update for install, updateId = {138B1579-A06C-483F-8F4D-6F17ED9CB6C8}.1.

              2014-11-04 11:33:47:061 4960 1730 Misc ===========  Logging initialized (build: 7.6.7600.256, tz: -0500)  ===========

              2014-11-04 11:33:47:061 4960 1730 Misc   = Process: C:\Windows\system32\wuauclt.exe

              2014-11-04 11:33:47:061 4960 1730 Misc   = Module: C:\Windows\system32\wuaueng.dll

              2014-11-04 11:33:47:060 4960 1730 Handler :::::::::::::

              2014-11-04 11:33:47:061 4960 1730 Handler :: START ::  Handler: Command Line Install

              2014-11-04 11:33:47:061 4960 1730 Handler :::::::::

              2014-11-04 11:33:47:061 4960 1730 Handler   : Updates to install = 1

              2014-11-04 11:34:01:663 4960 1730 Handler   : WARNING: Command line install completed. Return code = 0x00000002, Result = Failed, Reboot required = false

              2014-11-04 11:34:01:664 4960 1730 Handler   : WARNING: Exit code = 0x8024200B

                • Re: Issue running batch file via packageboot post execution
                  jbaits

                  After looking at the script I'd be willing to bet it is an issue with the working directory. The script does not find the referenced files and fails. Add "cd /d %dp0" (don't include the quotes) to the top of your script to set the working directory to the location the script is running from and it may work for you.

                  • Re: Issue running batch file via packageboot post execution
                    Lawrence Garvin
                    Details: [...] Please ensure that clients are enabled to receive signed 3rd party updates with Windows Update Local Policy Management wizard.


                    Have you done this?

                      • Re: Issue running batch file via packageboot post execution
                        russo1203

                        Lawrence,

                         

                        Yes, via GPO:

                         

                        Additionally, the first part of the installation completes successfully and that application is a third party app. It fails out when it gets to the batch file.

                         

                         

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

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

                          <instructions>

                            <execution>

                              <programs>

                                <program failureaction="stop" enabled="true" name="setup.exe" type="exe" typeaction="runandwait" successcode="0">-s -setup.iss</program>

                              </programs>

                            </execution>

                            <postexecution>

                              <programs>

                                <program failureaction="stop" enabled="false" name="cmd.exe" type="exe" typeaction="runandwait" successcode="0">/c %MODULEPATH%\Clarify.bat</program>

                              </programs>

                            </postexecution>

                          </instructions>

                        </packageboot>

                         

                        Thank you for your interest and assistance.

                          • Re: Issue running batch file via packageboot post execution
                            Lawrence Garvin
                            Additionally, the first part of the installation completes successfully and that application is a third party app. It fails out when it gets to the batch file.


                            The most common scenario that produces this behavior is that the SETUP.EXE returned a non-ZERO result code (i.e. maybe Reboot Required?), and because the result code returned is not declared as a valid "Successcode", the "Failureaction=STOP" kicked in and terminated the rest of the PackageBoot script.


                            The immediate way to test for this possibility is to change the "Failureaction" on the SETUP.EXE to "Continue". If the postinstallation steps are then executed, you've isolated the cause. If the postijnstallation steps do not execute, then some other cause is responsible.


                            Ideally you'd be working from a set of known result codes for the SETUP.EXE, such that any that should be considered as "successful" are identified as such.

                              • Re: Issue running batch file via packageboot post execution
                                russo1203

                                Sorry for the delayed response. I did want to post my resolution.

                                 

                                I edited the package boot to start cmd.exe in %WINDIR%\system32. I then edited the batch file with the path of the files to be copied, c:\Windows\SoftwareDistribution\Download\Install. This resolved my issue. I am assuming that packageboot was attempting to launch cmd.exe from the Install directory causing the error.

                                 

                                Thank you all for your assistance and if you celebrate, Happy Thanksgiving.