2012-12-13 45 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

相關問題