2012-12-13 47 views
0

我有NSI脚本,并与下面的代码编译安装它:添加/删除程序项丢失

WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "DisplayName" "${NAME}" 
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "InstallLocation" "$\"$INSTDIR$\"" 
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "UninstallString " "$\"$INSTDIR\uninstall.exe$\"" 
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "Publisher" "${COMPANY}" 
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "URLInfoAbout" "${WEBSITE}" 
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "DisplayVersion" "3.0.0" 
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "NoModify" "1" 
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "NoRepair" "1" 
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "EstimatedSize" "400" 

这编译和创建上安装所有键。我可以在RegEdit中看到它们。但是他们没有显示在添加/删除程序列表中。不管我删除或添加什么参数。

我尝试使用完全相同的值创建新键,并将其显示在列表中。两个密钥的权限完全相同。

编辑:

这不会在Windows Vista和Windows 7,无论是x64和x86工作。 文件没有数字签名。 Path包含空格,但它被封装在双括号中。 密钥名称又名$ {NAME}包含两个空格。

+0

也许你可以给使用一些更多的信息。Windows版本? X 86或x64? – Anders

+0

@Anders增加了一些额外的信息。 – Xeos

+0

进行更改后是否重新启动? –

回答

1

它是由“UninstallString”,其命名为后一个偶然的空间,所以Windows并没有认识到它作为一个适当的条目引起的。

1

如果您在64B OS安装32B的应用,也许它可以帮助切换到注册表(也就是Wow6432Node下创建键之前的分支的32B部分?

SetRegView 32 
WriteRegStr HKLM [...] 

你钥匙将是可见的HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\your_name

+0

这不仅仅是x64,x32也不会做它应该做的事 - 它不会在列表中显示它。 – Xeos

相关问题