0

I am trying to install some software trough SCCM due to a msiexec command. I'm currently having problems installing because of multiple transforms. Here is my command:

msiexec /i "./CANoe_CANalyzer64.msi" TRANSFORMS=:InstanceId1.mst;:CANoeTransform.mst MSINEWINSTANCE=1 VSETUPKEY_CUSTOMER="Company NV" VSETUPKEY_SERIALNUMBER=00000000000 VSETUPKEY_LICENSEKEY=0000-0000-0000-0000-0000-0000-0000-0000 ADDLOCAL=Program,Demos

I'm getting next error:

:CANoeTransform.mst : The term ':CANoeTransform.mst' is not recognized as the name of a cmdlet, function, script file, or operable program.

It seems like he doesn't recognize the second transform. Anyone who can guide me with this? I am trying to run this line in Powershell before going to SCCM.

Kind regards

Jente

Bussie
  • 1
  • 1
  • The `;` after the first `.mst` file ends the command and powershell thinks that everything following the `;` is a new command. You have to use `"` to elimate that. Maybe its easier if you splat the command arguments before the actuall call. Take a look at https://stackoverflow.com/questions/45223031/powershell-call-msi-with-arguments . – Paxz Feb 19 '19 at 13:02
  • I tried adding `"` to the Transforms. It looks like this now: `TRANSFORMS=":InstanceId1.mst;:CANoeTransform.mst"` but it just gives me a syntax error now. I am not sure I can split this up because I need to have in it 1 command for SCCM. – Bussie Feb 19 '19 at 13:14
  • You can splat arguments in one line, try it like this: `msiexec @('/i','"./CANoe_CANalyzer64.msi"','TRANSFORMS=:InstanceId1.mst;:CANoeTransform.mst','MSINEWINSTANCE=1','VSETUPKEY_CUSTOMER="Company NV"','VSETUPKEY_SERIALNUMBER=00000000000','VSETUPKEY_LICENSEKEY=0000-0000-0000-0000-0000-0000-0000-0000','ADDLOCAL=Program,Demos')` – Paxz Feb 19 '19 at 13:21
  • Hi, thanks for your comment. I tried running this in Powershell but it gives me "Invalid command line argument. Consult the Windows Installer SDK for detailed command line help." So I think there is a still a syntax error. – Bussie Feb 19 '19 at 13:41
  • I believe this should work for you: `Start-Process -FilePath msiexec -ArgumentList @('/i', './CANoe_CANalyzer64.msi', 'TRANSFORMS=:InstanceId1.mst;:CANoeTransform.mst', 'VSETUPKEY_CUSTOMER="Company NV"', 'VSETUPKEY_SERIALNUMBER=00000000000', 'VSETUPKEY_LICENSEKEY=0000-0000-0000-0000-0000-0000-0000-0000', 'ADDLOCAL=Program,Demos') -Wait` – Persistent13 Feb 19 '19 at 16:53
  • @Persistent13 I tried your solution but it seems like the transforms are not working when I do it this way. But I get no syntax errors now. So I will now figure out if it's the fault of the installer or the command :-) Thanks a lot! – Bussie Feb 21 '19 at 10:39

0 Answers0