How to deploy a msi with two command line switch values to different groups

msisccm

I have an Application created in sccm with an MSI deployment type. As part of the deployment type properties under Programs => Installation Program and Uninstall Program I can specify the msi command line statement to execute including switches. I need to have deployment A which goes to group A and has no additional command line switches. I need to have deployment B which goes to group B and has an additional command line switch of ADMINUSER=1. The command line switch is used by the msi (an in-house program I developed) to determine which documentation file gets installed (normal user or admin user).

I know that I could make two completely separate applications but this would be inefficient because I make frequent updates to my app. If I have to make two different applications every time that I make an update that would be very inefficient. What I would like to do is to make two different deployments that use two different deployment types but from what I understand that is not how sccm works. I've browsed online first but the results and documentation for sccm sucks.

How can I solve my problem?

Best Answer

You can't do this with a single program unfortunately. BUT, you can do this with a single package (group of files, the msi in your case) using multiple programs. Using this approach you wouldn't have to update your programs whenever you update the package. The package is just the group of files (in most cases), the programs are the commands that are actually executed. In your situation, I would go with this approach:

1)You can create two separate install programs, and advertise them to the two different collections. Remember, these are not separate packages, but programs within a single package. The only time you would need to change the programs (which in practice is quite trivial) is when the command to install the package has changed. So if package A is script.msi I would create two programs for that package,

Program 1 whose command is msiexec /i script.msi /qb ALLUSERS=1

Program 2 whose command is msiexec /i script.msi

I would then deploy the two programs to their respective collections. If package A ever has to be updated to a new version of script.msi, I would just make sure to keep the name the same, and then update the distribution point with the latest version. You could of course send out a new required deployment to make sure clients have the latest version, but there is no need for two separate packages.