我正在使用InstallShield 2014 Premier构建一个多实例安装程序,并为注册表添加一个键(来自registry ):
Registry | Root | Key | Name | Value | Component | ISAttributes
Registry34 | 2 | SOFTWARE\MyCompany\MyProduct\[InstanceId]\InstanceData | ENV | [ENV] | ISRegistryComponent | 0安装后,注册表中的键:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyCompany\MyProduct\0\InstanceData
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyCompany\MyProduct\1\InstanceData这两种方法都包含了我期望的值。然而,当我搜索它们时,我似乎没有找到它们(RegLocator表):
Signature | Root | Key | Name | Type
NewSignature1 | 2 | SOFTWARE\MyCompany\MyProduct\[InstanceId]\InstanceData | ENV | 18Appsearch表有ENV \ NewSignature1
我在不同的场合尝试过64位搜索标志设置(类型中的2vs18)。
从卸载后的安装日志中,您将看到ENV属性没有使用注册表中的值进行设置('PROD‘是ENV属性的默认值):
Action start 16:58:38: INSTALL.
MSI (s) (5C:C8) [16:58:38:080]: Running ExecuteSequence
MSI (s) (5C:C8) [16:58:38:080]: Doing action: AppSearch
Action start 16:58:38: AppSearch.
MSI (s) (5C:C8) [16:58:38:080]: Note: 1: 2262 2: Signature 3: -2147287038
MSI (s) (5C:C8) [16:58:38:081]: PROPERTY CHANGE: Adding IISROOTFOLDER property. Its value is 'C:\inetpub\wwwroot\'.
MSI (s) (5C:C8) [16:58:38:081]: Note: 1: 2262 2: Signature 3: -2147287038
MSI (s) (5C:C8) [16:58:38:081]: PROPERTY CHANGE: Adding DOTNETVERSION40FULL property. Its value is '#1'.
MSI (s) (5C:C8) [16:58:38:081]: Note: 1: 2262 2: Signature 3: -2147287038
MSI (s) (5C:C8) [16:58:38:081]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\SOFTWARE\MyCompany\MyProduct\1\InstanceData 3: 2
MSI (s) (5C:C8) [16:58:38:081]: Note: 1: 2262 2: Signature 3: -2147287038
MSI (s) (5C:C8) [16:58:38:081]: PROPERTY CHANGE: Adding IIS_VERSION property. Its value is '#8'.
MSI (s) (5C:C8) [16:58:38:082]: Doing action: UpdateProductName_setProp
Action ended 16:58:38: AppSearch. Return value 1.
MSI (s) (5C:C8) [16:58:38:082]: PROPERTY CHANGE: Modifying ProductName property. Its current value is 'MyCompany MyProduct Server Components'. Its new value: 'MyCompany MyProduct Server Components - PROD'.
Action start 16:58:38: UpdateProductName_setProp.我做错了什么?
发布于 2015-07-10 07:09:49
日志文件中的下面一行包含您应该查看的信息:
(5C:C8) 16:58:38:081:注: 1: 1402 2: HKEY_LOCAL_MACHINE\SOFTWARE\MyCompany\MyProduct\1\InstanceData 3: 2
上面的行解释为: Windows安装程序错误代码1402,MSI SDK将其定义为:无法打开键: 2.系统错误3.。
2 indicates:ERROR_FILE_NOT_FOUND系统错误码
日志文件明确表示未找到注册表项。我假设日志的片段是在RegLocator表中设置64位搜索标志的时候。但是,您的注册表项是在32位单元(Wow6432Node)中创建的。
要解决这个问题,您应该这样做:
-Set表中RegLocator列下的值为2。这将确保注册表搜索是在32位单元中执行的。
-Add属性ENV到SecureCustomProperties列表。
可能,这里发生的情况是,属性ENV的值没有传递到执行序列中。对于要传递给execute序列的属性值,需要保护属性(即。将ENV属性添加到属性表中的SecureCustomProperties中。
一旦您这样做,您的代码片段应该开始工作。
通常,在正常情况下,公共属性值从UI序列传递到执行序列。但是,可能存在锁定条件,需要将属性显式地添加到属性表中的SecureCustomProperties列表中,以使该值与执行序列相对应。
希望这能有所帮助。
致以敬意,
基兰·黑格德
https://stackoverflow.com/questions/31328396
复制相似问题