0

I have a weird scenario where I have a C# Windows Forms app and a setup Project that builds an MSI in VS 2015.

In the Windows Forms Project I've created and setup the InstallerClass.cs properly, in the setup project I've configured an Install Custom Action and set the CustomActionData to: /CODE="[CODE]" /GROUP="[GROUP]", and InstallerClass property is set to true.

And when running the installer in a command prompt with: "msiexec /i /qb myapp.msi /COMPANYCODE=12345 /GROUP=Test" it works perfectly, I can in the Install function of the InstallerClass get the COMPANYCODE and GROUP properties and they are populated with 12345 and Test. And then in the Installer function I can use these values and perform custom actions as needed (in this case write it down for later use).

BUT, when I deploy the msi through Microsoft Intune the arguments are TOTALLY ignored and are null in the Install function of the InstallClass... do you have any tips on this?

I can see the CustomAction table in the MSI when opening with Orca: Orca table view picture Thanks a lot in advance!

Best Regards, Richard

4

2 回答 2

1

检查详细日志以确定,并注意我在黑暗中刺伤,因为我不熟悉 Intune 如何启动事物,但我猜你没有将属性标记CODE为(或者可能GROUP是;你的问题与这些有冲突)。当属性不安全时,某些场景将不允许将其传递给执行序列。有关 Microsoft 的相关信息,请参阅SecureCustomProperties 属性Secure="yes"COMPANYCODE

于 2016-08-30T12:06:56.953 回答
0

问题可能是属性值没有被传输到安装的执行部分,因为它们没有被标记为安全。

https://msdn.microsoft.com/en-us/library/windows/desktop/aa371571(v=vs.85).aspx

Visual Studio 设置中不支持此功能,因此您需要使用 Orca 之类的东西编辑 MSI 文件。转到 Property 表并查看 SecureCustomProperties,它可能是:

SecureCustomProperties 以前的版本已安装;发现新产品

并且您将需要添加 CODE 和 GROUP,以分号分隔。

于 2016-08-30T17:46:22.070 回答