English 中文(简体)
MSI: Merge 模块(MSM)从习俗行动中读取财产
原标题:MSI: Reading properties from Custom Action in Merge Module (MSM)

I ran into this problem when trying to build an MSM. Apparently module properties (and all the identifiers for that matter) get renamed during the module generation by adding the module GUID at the end of its name. For example, property "MY_PROPERTY" gets renamed to "MY_PROPERTY.803A3089_928F_46F1_BBAE_CBD39A7D6A72" (assuming 803A3089-928F-46F1-BBAE-CBD39A7D6A72 is the module GUID). I believe this is the mechanism used to prevent conflicts between multiple modules trying to use identifiers with the same name.

从MSM内部 我需要援引DL习俗行动,要求确定具有一定价值的具体财产(简称“THE_PROPERTY”)。 问题是,“PROPERTY”重新命名为“PROPERTY.803A3089_928F_46F1_BBAE_CBD39A7D6A72,因此,习俗行动从未发现过财产,也没有失败。

Is there any way to solve this problem? I was thinking of modifying the custom action so that it tries to figure out (somehow) the GUID of the module from which it is being invoked. One way of doing this could be by looking at the current action name, which should also include the GUID. But can I get the current action name from within the custom action? Can you think of another solution?

感谢!

问题回答

事实上,在财产名称之后,使用GUID模块,即可进入合并模块内的财产。

一个很好的解决办法是使海关行动能够利用“PROPERTY.803A3089_928F_46F1_BBAE_CBD39A7D6A72而不是“PROPERTY”。

Another solution is to use a type 51 custom action:

  • in the MSI create a property set with formatted custom action (type 51)
  • 召集会议:

    [THE_PROPERTY.803A3089_928F_46F1_BBAE_CBD39A7D6A72]

  • 此前的习惯行动:

从而将合并后处理财产保留到具有你传统做法所使用名号的工联财产中。

Type 51 custom actions are added differently for each setup authoring tool. If you need exact instructions, please mention the setup tool you are using. Visual Studio doesn t support this.





相关问题
Correct place to install demostration projects?

With the new Windows 7 restrictions (well, new to Windows Vista anyways), we can no longer install demo projects to %ProgramFilesFolder%OurApplicationdemo since restricted users will not be able to ...

msi install program as startup

is it possible to install a program as a start up program using MSI installer?

Web Setup Project - Repair to overwrite files

I have a web setup project that creates an MSI. After first installation, my web site has some config files that can be modify manually. When triggering that MSI again, I am offered to repair the ...

Visual Studio Setup Projects: Cleartype

I use a Visual Studio Setup project to create an installer for some assemblies. However, the fonts the installer uses are always aliased, and don t appear to be the Windows standard. (source: ...

Implementing Update functionality

I want to implement the Update functionality for one of my .NET application. I saw that the Advanced Installer contains this functionality. Anybody recommends Advanced Installer for updating my ...

VS 2005 Setup - HKCU

I am trying to fix an existing application that uses a Visual Studio 2005 setup project. We are requiring it to work on limited user accounts for XP, our app is written in C# for .Net 2.0. It writes ...

热门标签