2011-11-19 83 views
0

我做了一個自定義操作來更新已安裝的xml文件。我將文件的路徑傳遞給CustomActionData的自定義操作。這工作正常,但是當我嘗試打開自定義操作中的xml文件時,操作正在查找錯誤的目錄。自定義操作找不到安裝的文件

<CustomAction Id="UpdateConfigCustomAction" BinaryKey="CustomActionsDLL" 
        DllEntry="UpdateConfigFileAction" Execute="deferred" Return="check" Impersonate="no" /> 

<InstallExecuteSequence> 
     <Custom Action="SetPropertiesCustomAction" Before="UpdateConfigCustomAction" /> 
     <Custom Action="UpdateConfigCustomAction" Before="InstallFinalize">NOT Installed</Custom> 
</InstallExecuteSequence> 

例如XML文件的路徑爲:C:\Program Files(x86)\MyProgram\file.xml,但動作看着C:\Windows\Installer\****.TMP\C:\Program Files(x86)\MyProgram\file.xml

我在做什麼錯?

回答

0

你如何解決路徑?我猜你的DLL正在基於當前路徑工作。您是否嘗試將DirectoryProperty/Value屬性設置爲安裝目錄?