I have created a custom inventory field that consists of the version number of the software.  Is there a way to reference this custom field to deploy software using managed installs?

FileInfoReturn(C:\Program Files\FourJs\gdc\bin\gdc.exe,FileVersion, TEXT)

I need to upgrade this software.  The software already exists on the computers with an older version.  The file version information uses commas instead of periods, so I cannot used the Kace custom inventory rule to check for file version.

FileVersionEquals(c:\program files\fourjs\gdc\bin\gdc.exe, 2.22.0.6) - does not work

Thanks for any assistance.

 

 

Answer Summary:
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

3

I had this same problem a while ago. First you want to create a new Software item with the Custom Inventory Rule of FileInfoReturn(C:\Program Files\FourJs\gdc\bin\gdc.exe,FileVersion, TEXT) 

Next you want to create another software item and attach your install files to this record. Note: you do not want to create a custom inventory rule for this software item.

Now create a Computer Inventory Label that you will need to manually apply to all of the computers that need to have this software. Let's call it M-Software.

Now create a smart label. Let's call it F-Software and put this info in

select *, UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(LAST_SYNC) as LAST_SYNC_TIME,
                       UNIX_TIMESTAMP(MACHINE.LAST_SYNC) as LAST_SYNC_SECONDS
                  from ORG1.MACHINE
                  LEFT JOIN KBSYS.KUID_ORGANIZATION ON KUID_ORGANIZATION.KUID=MACHINE.KUID LEFT JOIN KBSYS.SMMP_CONNECTION ON SMMP_CONNECTION.KUID = MACHINE.KUID AND KUID_ORGANIZATION.ORGANIZATION_ID = 1
                 where (((  (1 not in (select 1 from ORG1.MACHINE_CUSTOM_INVENTORY where MACHINE.ID = MACHINE_CUSTOM_INVENTORY.ID and MACHINE_CUSTOM_INVENTORY.SOFTWARE_ID = SoftwareIDofCustomInventory and MACHINE_CUSTOM_INVENTORY.STR_FIELD_VALUE = 'FileVersionWithCommas')) ) AND (1  in (select 1 from ORG1.LABEL, ORG1.MACHINE_LABEL_JT where MACHINE.ID = MACHINE_LABEL_JT.MACHINE_ID and MACHINE_LABEL_JT.LABEL_ID = LABEL.ID and LABEL.TYPE != 'hidden' and LABEL.NAME = 'M-Software')) ))

Replace SoftwareIDofCustomInventory with the Software ID number of the custom inventory item we created earlier and replace FileVersionWithCommas with the file version of the new software you want to deploy.

Finally create a Managed install using the software record with the attached install files and add the F-Software label to the Managed install.

So what this does, is looks at all computers and finds out what version of the software is installed if it is installed. Next the kbox looks if the M-Software label is applied to the computer. If a computer has the M-Software label and the version of the software does not equal the version you are trying to deploy or isn't installed at all, the kbox will apply the F-Software label to the computer and deploy the software to the computer.

After the software successfully installs the kbox should find that the software version is now up-to-date and remove the F-Software label from the computer and will not try to deploy the software to the machine again.

Answered 11/07/2012 by: darkhawktman
Green Belt

  • This is just what I needed. Thanks alot.
Please log in to comment
Answer this question or Comment on this question for clarity

Share