8 Replies Latest reply on Mar 5, 2014 8:19 PM by Lawrence Garvin

    Custom Package Installation

    blashmet

      We need to install a package with the following command:

       

      msiexec /qn /norestart /i backup2.msi ADDLOCAL=Feature_BackupEngine,Feature_BackupServer,Feature_ManagementTools /L*v %TEMP%\AltaroInstall.log

      I verified the command works at the command line, but it errors when installing through Windows Updates (Patch Manager).


      In the custom package dialog box (in the command line arguments  section), I only added:


      ADDLOCAL=Feature_BackupEngine,Feature_BackupServer,Feature_ManagementTools /L*v %TEMP%\AltaroInstall.log


      Because it says the /qn and /norestart switches are added automatically. I assume /i is as well since thats the install command.


      I got a C12 error upon installing through Patch Manager.

       

      Any ideas why it errored?

       

      Thanks for the help.

        • Re: Custom Package Installation
          Lawrence Garvin
          ADDLOCAL=Feature_BackupEngine,Feature_BackupServer,Feature_ManagementTools /L*v %TEMP%\AltaroInstall.log

           

          The issue here is attempting to use environment variables in the command line parameters. The command line parameters are normally evaluated by the Command Shell (as they were for your interactive install) prior to the execution of the msiexec.exe ... but when called via the WUA, [a] there is no command shell to evaluate the environment variables, and [b] the WUA sends the literal string direct to msiexec .. .msiexec doesn't know what to do with %TEMP%.

           

          There's also a third point to be made here, but really academic only.... since the installation occurs in the context of the SYSTEM user, there is no %TEMP% folder available to write this logfile into.

           

          The Windows Installer supports a default log destination when enabling logging, so I think rather than trying to force the logfile into a specific place, just specify the logfile name and let MSIEXEC put it where it wants to (or where it can, as the case may be).

           

          An earlier conversation about the use of environment variables in the command line parameters is available at

          Re: 3rd party packages - Path variables in command line

          1 of 1 people found this helpful
            • Re: Custom Package Installation
              blashmet

              Thanks for the help.

               

              I created a new test package and removed the log flag completely:

               

              ADDLOCAL=Feature_BackupEngine,Feature_BackupServer,Feature_ManagementTools /L*v

               

               

              However, installing now gives a different error: Code 80070667

               

              I have a feeling it has to do with the msiexec syntax.  The /qn /norestart  and /i flags should come after msiexec and before the package name, with ADDLOCAL=Feature_BackupEngine,Feature_BackupServer,Feature_ManagementTools /L*v coming after.

               

              Any ideas why it's still failing?

               

               

              If it helps, here are the latest lines from the WindowsUpdate.log on the system that's failing.  It doesn't seem to give any indication of why:

               

              2014-02-2611:47:50:450236c5cDnldMgr** START **  DnldMgr: Downloading updates [CallerId = AutomaticUpdates]
              2014-02-2611:47:50:450236c5cDnldMgr*********
              2014-02-2611:47:50:450236c5cDnldMgr  * Call ID = {211252C0-6FC4-48FF-9A38-19611DE400F1}
              2014-02-2611:47:50:450236c5cDnldMgr  * Priority = 2, Interactive = 0, Owner is system = 1, Explicit proxy = 0, Proxy session id = -1, ServiceId = {3DA21691-E39D-4DA6-8A4B-B43877BCB1B7}
              2014-02-2611:47:50:450236c5cDnldMgr  * Updates to download = 1
              2014-02-2611:47:50:450236c5cAgent  *   Title = Altaro Test 6
              2014-02-2611:47:50:450236c5cAgent  *   UpdateId = {F61576B8-86F5-436B-854C-42767D89EDF4}.1
              2014-02-2611:47:50:450236c5cDnldMgr***********  DnldMgr: New download job [UpdateId = {F61576B8-86F5-436B-854C-42767D89EDF4}.1]  ***********
              2014-02-2611:47:50:450236c5cDnldMgr  * Queueing update for download handler request generation.
              2014-02-2611:47:50:450236c5cDnldMgrGenerating download request for update {F61576B8-86F5-436B-854C-42767D89EDF4}.1
              2014-02-2611:47:50:481236c5cHandlerMSP download: file beeb15ac-30b9-4cfc-a985-07f68222969e_1.cab already exists in sandbox directory (C:\Windows\SoftwareDistribution\Download\a3605104a35b77b94f417af5f3879bf0)
              2014-02-2611:47:50:528236c5cDnldMgr***********  DnldMgr: New download job [UpdateId = {F61576B8-86F5-436B-854C-42767D89EDF4}.1]  ***********
              2014-02-2611:47:50:528236c5cDnldMgr  * All files for update were already downloaded and are valid.
              2014-02-2611:47:50:528236c5cAgent*********
              2014-02-2611:47:50:528236c5cAgent**  END  **  Agent: Downloading updates [CallerId = AutomaticUpdates]
              2014-02-2611:47:50:528236c5cAgent*************
              2014-02-2611:47:50:5282361300AU>>##  RESUMED  ## AU: Download update [UpdateId = {F61576B8-86F5-436B-854C-42767D89EDF4}, succeeded]
              2014-02-2611:47:50:5282361300AU#########
              2014-02-2611:47:50:5282361300AU##  END  ##  AU: Download updates
              2014-02-2611:47:50:5282361300AU#############
              2014-02-2611:47:50:5282361300AUSetting AU scheduled install time to 2014-02-27 11:00:00
              2014-02-2611:47:50:5282361300AUSuccessfully wrote event for AU health state:0
              2014-02-2611:47:50:5282361300AUAU setting pending client directive to 'Install Approval'
              2014-02-2611:47:50:5282361300AUSuccessfully wrote event for AU health state:0
              2014-02-2611:47:50:528236120cAUGetting featured update notifications.  fIncludeDismissed = true
              2014-02-2611:47:50:528236120cAUNo featured updates available.
              2014-02-2611:47:55:442236c5cReportREPORT EVENT: {C12A8209-56B1-40DD-AC57-AD067A9132FC}2014-02-26 11:47:50:528-08001188102{00000000-0000-0000-0000-000000000000}00AutomaticUpdatesSuccessContent InstallInstallation Ready: The following updates are downloaded and ready for installation. This computer is currently scheduled to install these updates on Thursday, February 27, 2014 at 3:00 AM:  - Altaro Test 6
              2014-02-2611:47:55:442236c5cReportCWERReporter finishing event handling. (00000000)
              2014-02-2611:48:05:44223613ccAULaunched new AU client for directive 'Install Approval', session id = 0x2
              2014-02-2611:48:05:4582440155cMisc===========  Logging initialized (build: 7.6.7600.256, tz: -0800)  ===========
              2014-02-2611:48:05:4582440155cMisc  = Process: C:\Windows\system32\wuauclt.exe
              2014-02-2611:48:05:4582440155cAUClntLaunched Client UI process
              2014-02-2611:48:05:4732440155cMisc===========  Logging initialized (build: 7.6.7600.256, tz: -0800)  ===========
              2014-02-2611:48:05:4732440155cMisc  = Process: C:\Windows\system32\wuauclt.exe
              2014-02-2611:48:05:4732440155cMisc  = Module: C:\Windows\system32\wucltux.dll
              2014-02-2611:48:05:4732440155cCltUIAU client got new directive = 'Install Approval', serviceId = {3DA21691-E39D-4DA6-8A4B-B43877BCB1B7}, return = 0
              2014-02-2611:50:50:637236c5cReportUploading 6 events using cached cookie, reporting URL = http://WSUSserver/ReportingWebService/ReportingWebService.asmx
              2014-02-2611:50:50:637236c5cReportReporter successfully uploaded 6 events.
                • Re: Custom Package Installation
                  Lawrence Garvin

                  However, installing now gives a different error: Code 80070667

                  I have a feeling it has to do with the msiexec syntax.  The /qn /norestart  and /i flags should come after msiexec and before the package name,

                  Actually, the /qn and /norestart flags should not be included at all. They are implicit when calling MSIEXEC from the Windows Update Agent.  This fact is noted on the NOTE under the Command Line text field in the Package Wizard.


                  2-26-2014 6-27-28 PM.png

                    • Re: Re: Custom Package Installation
                      blashmet

                      I know it shouldn't be included in the command line field, but the command that I tested from the command line is:

                       

                      msiexec /qn /norestart /i backup2.msi ADDLOCAL=Feature_BackupEngine,Feature_BackupServer,Feature_ManagementTools /L*v %TEMP%\AltaroInstall.log


                      So how do I get Patch Manager to yield the same results as running this from the command prompt?

                        • Re: Re: Custom Package Installation
                          Lawrence Garvin

                          I know it shouldn't be included in the command line field, but the command that I tested from the command line is:

                          It IS needed when you run the command from the command line; it is NOT needed when you configure the command line parameters in a package. It's that simple.

                           

                          So how do I get Patch Manager to yield the same results as running this from the command prompt?

                          Configure the package correctly.

                          Remove the /qn and /noreboot, then re-publish, run again, and show us what you get.


                            • Re: Custom Package Installation
                              blashmet

                              I already removed /qn and /norestart and posted the test results above. I understand where the flags should be included; when I said "command line field", I was referring to the command line field on the package configuration screen.

                               

                              I know this command works from the command line:

                               

                              msiexec /qn /norestart /i backup2.msi ADDLOCAL=Feature_BackupEngine,Feature_BackupServer,Feature_ManagementTools /L*v %TEMP%\AltaroInstall.log


                              And we know /qn and /norestart don't need to be included in the package manager command line field.


                              However, it's not clear what does need to be put in there.  What about the /i switch?


                              The last thing I tried was ADDLOCAL=Feature_BackupEngine,Feature_BackupServer,Feature_ManagementTools /L*v , but it failed (see above).

                                • Re: Custom Package Installation
                                  Lawrence Garvin

                                  The "command line" field should have the exact contents of the command line that worked interactively, EXCEPT:

                                  • The /qn parameter.
                                  • The /norestart parameter.
                                  • The /i filename parameter (because, presumably, the MSI file identified in the /i parameter is defined in the Package Wizard as the MSI file to be installed).
                                  The last thing I tried was ADDLOCAL=Feature_BackupEngine,Feature_BackupServer,Feature_ManagementTools /L*v , but it failed (see above).

                                  Standard diagnostic practices apply....

                                   

                                  I'd suggest starting with one option at a time to find out which one is failing. Alternatively, remove one option at a time until it works. Last one removed is the culprit.

                                   

                                  Since you still have the /L flag, but no valid logfile name (which is a required field with the flag), that would be my first target for testing.

                                • Re: Custom Package Installation
                                  blashmet

                                  Any other ideas?