25 Replies Latest reply on Apr 18, 2014 4:27 PM by Lawrence Garvin

    Custom Package Not Applicable

    blashmet

      I created a custom package to install Altaro Hyper-V backup version 4.1.20.0 with the following properties:

       

      Pre-reqs: None. I was hoping leaving this blank would just ignore pre-reqs and go straight to the applicability condition, which it seems like it does.

       

      Applicability: C:\Program Files\Altaro\Altaro Hyper-V Backup\Altaro Hyper-V Backup.exe version less than 4.1.20.0

       

      Installed: C:\Program Files\Altaro\Altaro Hyper-V Backup\Altaro Hyper-V Backup.exe version  equal to 4.1.20.0

       

      Certain systems without Altaro Hyper-V Backup.exe report the patch as applicable. Is this because the file version is technically below 4.1.20.0, even though the file doesn't exist?

       

      That would make sense, but the thing that doesn't is that there are systems on which the file exists and clearly has a lower version, but are not reporting the patch as applicable (see below).

       

      Any ideas why this is happening?

       

       

      AltaroNotApplicable.jpg

        • Re: Custom Package Not Applicable
          Lawrence Garvin

          Certain systems without Altaro Hyper-V Backup.exe report the patch as applicable. Is this because the file version is technically below 4.1.20.0, even though the file doesn't exist?


          Yes, because you're using a File Version rule which also returns TRUE if the file is non-existant.

          To specify an UPGRADE-ONLY scenario, you'll need a second rule that confirms the product is installed.

          The SolarWinds Catalog is full of examples of how to do this.


          Also... your Installed Rule is designed incorrectly. Installed Rules should be EQUAL TO ONLY tests.

          1 of 1 people found this helpful
          • Re: Custom Package Not Applicable
            jbaits

            You are correct in assuming that if a file does not exist that it reports as less than the specified version. To create an upgrade package you would need to do the version check as well as a "file exists" check.

             

            Your installed rule should only be "C:\Program Files\Altaro\Altaro Hyper-V Backup\Altaro Hyper-V Backup.exe version equal to 4.1.20.0". I would also recommend reading the install path from a registry key if it is available. If the path is not present in the registry at least use environment variables. This may mean more rules to accommodate x86 and x64 machines but results in more accurate detection.

             

            Beyond that, you can post the full xml of the package and I will see if I find anything else that may be causing an issue.

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

                Sorry, I posted the install rule incorrectly.  I corrected it to how I actually have it configured.

                 

                Lawrence, I do want to do an upgrade, but rather than making more rules, I have an "Altaro" WSUS group with only the systems I want to install on, so that should accomplish the same thing.

                 

                Where can I local the .xml of the package? I don't see an export option.

                 

                Thanks for the help!

                  • Re: Custom Package Not Applicable
                    jbaits

                    You can select the package and click 'Export Catalog'. You will get a cab that contains the xml.

                      • Re: Re: Custom Package Not Applicable
                        blashmet

                        Attached is the .xml file.

                          • Re: Custom Package Not Applicable
                            Lawrence Garvin

                            Attached is the .xml file.

                            Seconding what Justin posted, you should be using a Registry Value to obtain the installation pathname... most likely this value will be contained at HKLM\Software\Altaro. If not a registry value (best), then at a minimum you should be using the CommonPath = PROGRAM_FILES declaration, rather than hardcoding the full pathname.

                              • Re: Re: Custom Package Not Applicable
                                blashmet

                                It's not obvious to me how one would configure this.  The only key I see with the product version is:

                                 

                                HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\20DCF4E78888CE7489D268FE0343B409\E3C0A25A102ABCF4EA9BFC24991EEC16


                                which has a String called "ProductVersion" with a value of 4.1.12.


                                How would I configure the rule? It seems like it wants a filename, so maybe I should use "AltarHyperVBackupErrorReportManager.exe" instead because that's listed in the registry?


                                Rule.jpg

                                 

                                Rule2.jpg

                                  • Re: Re: Custom Package Not Applicable
                                    Lawrence Garvin

                                    First, you definitely don't want to be testing keys inside a userprofile tree.

                                    But let's simplify this.

                                    Is there a registry key HKLM\Software\Altaro

                                    or HKLM\Software\Altaro\Hyper-V Backup

                                    or something like that in the HKLM\Software node?

                                    • Re: Custom Package Not Applicable
                                      jbaits

                                      You should be looking for a registry value that contains the install path without the exe (ex. C:\Program Files\Altaro\Altaro Hyper-V Backup\). You can usually find this in HKLM\SOFTWARE\AppName or HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AppName. Once you find that you fill in the path and value entries with the respective info. The sub-path contains the remainder of the path to the exe you are checking the version of. It could be just the name (ex. Altaro Hyper-V Backup.exe) or a longer path (ex. bin\Altaro Hyper-V Backup.exe) depending on the app. From there it behaves like a normal file version check.

                                  • Re: Custom Package Not Applicable
                                    jbaits

                                    Aside from the best practice changes Lawrence and I have already recommended, the package looks sound as long as your paths and version numbers are correct. I have seen some clients detection work improperly until the Windows Update cache was cleared.

                                • Re: Custom Package Not Applicable
                                  Lawrence Garvin
                                  I have an "Altaro" WSUS group with only the systems I want to install on, so that should accomplish the same thing.

                                  And yet, your primary issue here is that systems that do not have the product installed are getting updated.


                                  The proper way to prevent that behavior is to configure the package so that it can never be installed where it shouldn't, rather than trusting deployment practices to properly identify all, and only, the systems that should get the update.

                                    • Re: Custom Package Not Applicable
                                      blashmet

                                      No system without the product is receiving it since I don't put those in the Altaro WSUS group.  They are only reporting it as applicable (which is fine, since we understand why it's happening. i.e., because the version is technically below the condition value).

                                       

                                      The primary issue is that systems which satisfy the applicability conditions are not reporting the patch as applicable. This is troubling since we don't know why it's occurring.  I will test using a registry value instead, but if that fixes the problem I would still wonder why hard coding the path doesn't work: it's included as a valid option to use.

                                        • Re: Custom Package Not Applicable
                                          Lawrence Garvin

                                          if that fixes the problem I would still wonder why hard coding the path doesn't work: it's included as a valid option to use.

                                           

                                          Because, aside from the 'best practice' of using the common paths to begin with, as it happens, hard-coding the path causes the Package Wizard to create an invalid value for the CSIDL, which causes the rule to be evaluated incorrectly. We only discovered this in the past few days.

                                           

                                          <bar:FileVersion xmlns:bar="http://schemas.microsoft.com/wsus/2005/04/CorporatePublishing/BaseApplicabilityRules.xsd" Version="4.1.20.0" Comparison="EqualTo" Csidl="0" Path="c:\Program Files\Altaro\Altaro Hyper-V Backup\Altaro Hyper-V Backup.exe"/>

                                            • Re: Custom Package Not Applicable
                                              blashmet

                                              Ah, I see.  I'm having the same problem with Trillian.  It correctly identifies the machines that need updates.  However, once the update is installed, it keeps requesting to install it.

                                               

                                              I am attempting the registry method, but it is pretty unintuitive.  For example, is it checking the value of a registry key or is it using the registry to find the version of the file? From the registry info in the key, it doesn't look like it would be able to locate the file.

                                               

                                              Here's what I have so far:

                                              Registry.jpg

                                               

                                              RegistryApplicabilityRule.jpg

                                               

                                               

                                              What should I enter for Registry Value, Sub-Path, and Version?

                                                • Re: Custom Package Not Applicable
                                                  Lawrence Garvin
                                                  For example, is it checking the value of a registry key or is it using the registry to find the version of the file?


                                                  The File Version With Registry rule uses a Registry Key/Value to identify a base installation folder for the product. The pathname is stored in the Registry Value. It then appends the value from Sub-path to the pathname obtained from the Registry Value to identify a specific file (i.e. the Sub-path value must be a relative pathname to a single file ... typically the EXE of the program of interest), and then compares the File Version of that file to the one specified in the rule.


                                                  If the FILE does not exist, or if the Registry KEY or VALUE do not exist, the existing "file version" is interpreted as 0.0.0.0 and the comparison is still performed. (i.e. a missing file, presumed to be 0.0.0.0, will always be "less than" the file version being tested, and that's how you configure a package to do upgrades or fresh installs. An Upgrade-Only package would also test for some fixed object that must be present in order to allow the upgrade. This can be done with a File Exists rule on the EXE file, or with a Registry Key Exists rule for the application of interest.


                                                  In the example provided above, my educated guess would be that the registry value "InstallLocation" is the value of interest. "InstallLocation" will likely point to a base folder, typically something like C:\Program Files\VendorName\ProductName. Then the sub-path value would be the remainder of that relative path to the EXE file.


                                                  One suggestion: Before leaning toward using registry locations in the CurrentVersion node, or the Uninstall node, look for something in HKLM\Software\VendorName\ProductName, e.g. HKLM\Software\Cerulean Studios\Trillian Pro

                                                  • Re: Custom Package Not Applicable
                                                    blashmet

                                                    I also found these, which seem like they might be more appropriate:

                                                     

                                                    Registry2.jpg

                                                    RegistryApplicabilityRule2.jpg

                                                     

                                                    Did I enter that information correctly?

                                                      • Re: Custom Package Not Applicable
                                                        Lawrence Garvin

                                                        That's an acceptable target, as it functionally gets you to the file you need to test (e.g. trillian.exe)

                                                         

                                                        However, since the Registry Value "DisplayIcon" contains the fully qualified pathname, you should leave Sub-Path empty.

                                                        Sub-Path is only defined when you need to complete the relative path to the actual file when the pathname in the registry value is a base folder.

                                                         

                                                        e.g. if the registry value contained "C:\Program Files (x86)\Trillian" then Sub-Path would simply be Trillian.EXE.

                                                          • Re: Custom Package Not Applicable
                                                            blashmet

                                                            Leaving Sub-Path blank generates this error:

                                                             

                                                            RegistryApplicabilityRule3.jpg

                                                             

                                                            Any ideas?

                                                              • Re: Custom Package Not Applicable
                                                                Lawrence Garvin

                                                                Bummer. I just checked the docs; it is a required field in the schema. Apologies for that.

                                                                 

                                                                Lacking any other registry value that provides a pathname without the terminal filename, the other option to consider is to use just the File Version rule.

                                                                 

                                                                Set "Common Path" = PROGRAM_FILES

                                                                Set "Path" = ..\Program Files (x86)\Trillian\Trillian.exe

                                                                 

                                                                and Comparison and Version as you otherwise would.

                                                                  • Re: Custom Package Not Applicable
                                                                    blashmet

                                                                    Oh, perhaps I've been specifying the path incorrectly this whole time?  Does choosing PROGAM_FILES from the Common Paths dropdown search both Program Files and Program Files (x86)?  I haven't been appending Program Files (x86) to the contents in the Path: field.

                                                                      • Re: Custom Package Not Applicable
                                                                        Lawrence Garvin

                                                                        No. PROGRAM_FILES only specifies %SystemDrive%\Program Files specifically. It's a holdover from 32-bit systems, but on 64-bit systems it does not include the 32-bit installation folder tree.

                                                                         

                                                                        There is a PROGRAM_FILESX86 value defined in the documentation, but it is not implemented for use by the Windows Update Agent.

                                                                        As such it is necessary to backpath the PROGRAM_FILES common path in order to get into the ~\Program Files (x86) folder tree.

                                                                          • Re: Custom Package Not Applicable
                                                                            blashmet

                                                                            Ok, well this is quite frustrating. I updated the package with the following rules, but it's still not working.  It checks for the existence of Trillian.exe (to make sure only machines with it installed get the update), then checks that the file version is less than 5.4.0.16. 

                                                                             

                                                                            RegistryApplicabilityRule4.jpg

                                                                             

                                                                            The XML shows:

                                                                             

                                                                            -<sdp:ApplicabilityRule SchemaVersion="1.0">

                                                                             

                                                                             

                                                                             

                                                                             

                                                                            -<lar:And>

                                                                             

                                                                             

                                                                            <bar:FileVersion Path="Program Files (x86)\Trillian\trillian.exe"Csidl="38"Comparison="LessThan"Version="5.4.0.16"/>

                                                                             

                                                                             

                                                                            <bar:FileExists Path="Program Files (x86)\Trillian\trillian.exe"Csidl="38"/>

                                                                             

                                                                            </lar:And>

                                                                            </sdp:ApplicabilityRule>



                                                                            Are we sure the path is getting input correctly?  I don't see a C:\ in front of the filepath.


                                                                            EDIT: Just realized I left the ..\ out of the pathname.  Trying that now...ugh, this is a nightmare