2011-08-05 21 views
2

我是新來的WiX(Windows安裝XML),所以我folloed一些教程就像this one 但我需要的是應用程序將被安裝在用戶的個人文件夾,所以我的代碼替換ProgramFilesFolder通過PersonalFolder。但我得到了這個錯誤:威克斯PersonalFolder問題

Error 1 ICE38: Component MainExecutable installs to user profile. It must use a registry key under HKCU as its KeyPath, not a file. C:\Proxym-IT\Projets Visual Studio\SetupProject2\SetupProject2\Product.wxs 18 1 SetupProject2 

any help?

回答

4

剛剛有同樣的問題。找到了解決辦法(正確的,沒有禁用警告):

<Component Id="CCCCCC" Guid="120A49C6-3DB7-467F-A515-0DE9772F3B67" Win64="yes" Directory="LOCALAPPDATA"> 
      <RegistryValue KeyPath="yes" Root="HKCU" Key="SOFTWARE\ACME\Icecream" Name="Installed" Type="integer" Value="1" Action="write" /> 
      <File Id="F_TeaShellconfig" Name="Icecream.config" /> 
      <RemoveFolder Id="RemoveAppData" On="uninstall" /> 
     </Component> 
其實

,必須加上一個假章鍵來完成這項工作。正如有人所說,Windows安裝程序開發人員大概來自另一個星球。下面的RemoveFolder標籤刪除了我有的下一個錯誤,它與這裏的解決方案沒有關係,但它通常與它在一起。