msiexec/i myproduct.msi LANG = 1。如何在简单的WIX msi中传递命令行参数?
我没有bootstraper项目,我有简单的Product.wxs文件的wix项目。如果lang = 1,我不想执行3级功能。根据郎参数我想设置一个变量来设置系统登录值既然你知道你需要在运行该注册表项被写入到HKLM或HKCU
<Feature Id="ProductFeature" Level="1">
<Condition Level="2">LANG=1</Condition>
<Condition Level="3">LANG=0</Condition>
<Feature Id="MyFeatureBHJ" Title="My Feature BGJ" Level="2">
<?define DllRegLocationGj = "HKCU" ?>
<ComponentGroupRef Id="ProductComponents" />
</Feature>
<Feature Id="MyFeatureBHJttgj" Title="My Feature BjjGJ" Level="3">
<?define DllRegLocationGj = "HKLM" ?>
<ComponentGroupRef Id="ProductComponents" />
</Feature>
</Feature>
WHE例如,msiexec/i install.msi ADDLOCAL = ProductFeature,MyFeatureBHJ –
您是否将嵌套功能(“MyFeatureBHJ”和“MyFeatureBHJttgj”)移出父功能“ProductFeature”? – Isaiah4110
检查更新,您的功能列表应该看起来像这样。然后,您应该使用ADDLOCAL属性来告诉您要使用1和2还是1和3的所有功能。 – Isaiah4110