Windows installer Windows Installer可以';找不到注册表项

Windows installer Windows Installer可以';找不到注册表项,windows-installer,installshield,Windows Installer,Installshield,我正在使用InstallShield 2014 Premier构建一个多实例安装程序,并向注册表添加一个键(从注册表表): 安装后注册表中的注册表项: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyCompany\MyProduct\0\InstanceData HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyCompany\MyProduct\1\InstanceData 两者都包含我期望的值。但是,当我搜索它们时,似

我正在使用InstallShield 2014 Premier构建一个多实例安装程序,并向注册表添加一个键(从注册表表):

安装后注册表中的注册表项:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyCompany\MyProduct\0\InstanceData
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyCompany\MyProduct\1\InstanceData
两者都包含我期望的值。但是,当我搜索它们时,似乎没有找到它们(RegLocator表):

Appsearch表具有ENV | NewSignature1

我在各种场合尝试过使用和不使用64位搜索标志集(类型中为2对18)

从卸载后的安装日志中,您将看到未使用注册表中的值设置ENV属性(“PROD”是ENV属性的默认值):


我做错了什么?

日志文件中的下一行包含您应该查看的信息:

MSI(5C:C8)[16:58:38:081]:注:1:1402 2:HKEY\U LOCAL\U MACHINE\SOFTWARE\MyCompany\MyProduct\1\InstanceData 3:2

上述行解释如下: Windows installer错误代码1402,MSI SDK对其定义如下: 无法打开键:[2]。系统错误[3]。

系统错误代码为2表示:未找到错误文件

日志文件清楚地表明找不到注册表项。我假设日志片段是在RegLocator表中设置64位搜索标志时出现的。 但是,您的注册表项是在32位配置单元(Wow6432Node)中创建的

要解决此问题,您应该执行以下操作:

-将RegLocator表中“类型”列下的值设置为2。 这将确保在32位配置单元中执行注册表搜索

-将属性ENV添加到SecureCustomProperties列表中

这里可能发生的情况是,属性ENV的值没有传递到执行序列中。对于要传递给执行序列的属性值,您需要保护该属性,即将ENV属性添加到属性表中的SecureCustomProperties

一旦您这样做,您的代码片段应该开始工作

通常,在正常情况下,公共属性的值从UI序列传递到执行序列。但是,可能存在锁定条件,需要将属性显式添加到属性表中的SecureCustomProperties列表中,以便将值传播到执行序列中

希望这有帮助

问候,


Kiran Hegde

谢谢。我发誓,在某个时刻,我在关闭64位搜索标志的情况下进行了测试,但没有找到密钥,但我尝试了很多东西,可能忘记了具体时间。我确实在SecureCustomProperties属性中有ENV,但在某个时候InstallShield将其从属性表中删除(即,它是安全的,但没有属性条目),并且我可能正在尝试该标志。
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyCompany\MyProduct\0\InstanceData
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyCompany\MyProduct\1\InstanceData
Signature     | Root | Key                                                    | Name | Type
NewSignature1 | 2    | SOFTWARE\MyCompany\MyProduct\[InstanceId]\InstanceData | ENV  | 18
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.