Hi,

I need to deploy using SCCM a software which is an upgrade. However there are users who use two old versions.I need to use a script that will embed the command line of the upgrade and also check if either of the two versions is present. If x is present then it should upgrade by skipping Y (which would not be installed) and vice versa. I normally the use the below line after running the msiexec/x in case the software is not present for any uninstallation

If (Err.Number = 0) OR (Err.Number = 2) OR (Err.Number = 1605) Then
  WScript.Quit(0)
End If
Set WshShell = Nothing

0 Comments   [ + ] Show Comments

Comments

  • This content is currently hidden from public view.
    Reason: Removed by member request
    For more information, visit our FAQ's.
Please log in to comment

Community Chosen Answer

1

Hi Dunnpy,

Thanks. I could have created two advertisments pointing to two AD groups for the old versions. However the client is isnsiting on a single advertisement.Would it be possible to create a vbscript that would check the versions of the software and skip accordingly and then install the upgrade ? I will put the source files for the three softwares in a single package and then run the script.

Answered 09/16/2013 by: ninjaguy
Senior Yellow Belt

  • You could do it that way - but then you won't be utilising SCCM in the way it's intended to be used.

    Unless you're charging the client per advertisement and that is why they want it done this way then it shouldn't matter how you achieve the goal - that's up to you to decide as the expert in this field.
    You'll be losing the proper error reporting from SCCM as the script will provide an overall exit code, but not the specifics you'd get for a failure from a particular advertisement in SCCM.

    If you had to do a script then you could still query the ARP registry to determine whether the software is present, or check on the presence of a file in a specific directory and run your installers accordingly.
    There are many script examples on the Internet for these types of queries that will be able to get you started.

    Dunnpy
Please log in to comment

Answers

0

You will be able to achieve this through the reporting in SCCM.

Build two collections using queries based on whether the X or Y versions are present in Add/Remove Programs that will populate the collection with the machine name  where the software is installed.

Then deploy your upgrade to the collections accordingly through a relevant advertisements.

You can also have a collection that queries for machines that don't have X or Y and are in an AD group (for example) for deployment of the software for new installations - depending on how you build your collections for installations.

Many companies have AD groups for each software title that the Helpdesk can drop machines into. This will then populate a collection for the install of that software and the advertisement is run against them to install.

Remember that the ARP entries are gathered as part of the HARDWARE inventory, so if you're depending on this method then the inventory should be run fairly regularly to allow the dynamic collections to function in a timely manner. Also the regularity of the AD membership query should be considered here too, for pulling in machines from AD groups into SCCM.

The package should be as clean as possible, without any logic in a script, (aside from the obvious upgrade mechanisms in MSI's - if the vendor or you add them in) and SCCM should be used as it's intended to manage the deployments.

Hope that helps,

Dunnpy

You will be able to achieve this through the reporting in SCCM.

Build two collections using queries based on whether the X or Y versions are present in Add/Remove Programs that will populate the collection with the machine name  where the software is installed.

Then deploy your upgrade to the collections accordingly through a relevant advertisements.

You can also have a collection that queries for machines that don't have X or Y and are in an AD group (for example) for deployment of the software for new installations - depending on how you build your collections for installations.

Many companies have AD groups for each software title that the Helpdesk can drop machines into. This will then populate a collection for the install of that software and the advertisement is run against them to install.

Remember that the ARP entries are gathered as part of the HARDWARE inventory, so if you're depending on this method then the inventory should be run fairly regularly to allow the dynamic collections to function in a timely manner. Also the regularity of the AD membership query should be considered here too, for pulling in machines from AD groups into SCCM.

The package should be as clean as possible, without any logic in a script, (aside from the obvious upgrade mechanisms in MSI's - if the vendor or you add them in) and SCCM should be used as it's intended to manage the deployments.

Hope that helps,

Dunnpy - See more at: http://www.itninja.com/question/sccm-installation-based-on-two-versions-of-software-installed#sthash.3VD5Jbi1.dpuf
Answered 09/16/2013 by: dunnpy
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity