我運行一個自定義操作,並得到以下錯誤消息:維克斯安裝程序:錯誤特林運行從一個按鈕,點擊自定義操作時 - 此安裝所需的DLL來完成無法運行
錯誤1723 。此Windows Installer軟件包存在問題。無法運行此安裝所需的DLL。聯繫您的支持人員或軟件包供應商。操作CheckLicenseFileExistsCA,輸入:CheckLicenseFileExists,庫:C:\ Users \ dafna \ AppData \ Local \ Temp \ MSI3395.tmp MSI(c)(E8:04)[19:42:28:921]:產品:ReSecServer - 錯誤1723.此Windows安裝程序包存在問題。無法運行此安裝所需的DLL。聯繫您的支持人員或軟件包供應商。行動CheckLicenseFileExistsCA,條目:CheckLicenseFileExists,庫:C:\用戶\ Dafna先生\ AppData的\ \ MSI3395.tmp
我試圖搜索谷歌的解決方案,但沒有奏效了本地的\ Temp,我可能失去了一些東西.. 。
public class CutomActions
{
[CustomAction]
public static ActionResult CheckLicenseFileExists(Session session)
{
try
{
var filename = Path.Combine(session["LICENSEFILE_DIR_PATH"], "license.dat");
var exists = File.Exists(filename);
if (exists)
{
session["LICENSE_FILE_PATH_VALID"] = "1";
}
}
catch (Exception ex)
{
return ActionResult.Failure;
}
return ActionResult.Success;
}
Here are the relevant lines:
<CustomAction Id='CheckLicenseFileExistsCA' BinaryKey='ServerInstallerCustomActions.CA' DllEntry='CheckLicenseFileExists' Execute="immediate" Return="check" /> <Binary Id='ServerInstallerCustomActions.CA' SourceFile='$(var.ServerInstallerCustomActions.TargetDir)\ServerInstallerCustomActions.dll' />
<Control Type="PushButton" Id="BrowseLicense" Width="75" Height="17" X="251" Y="101" Text="{\VSI_MS_Sans_Serif13.0_0_0}Browse" TabSkip="no">
<Publish Property="_BrowseProperty" Value="LICENSEFILE_DIR_PATH" Order="1">1</Publish>
<Publish Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
<Publish Event="DoAction" Value="CheckLicenseFileExistsCA">1</Publish>
<Publish Property="TEMP_VERIFIED" Value="[LICENSE_FILE_PATH_VALID]">1</Publish>
<Publish Property="LICENSE_FILE_PATH_VALID" Value="[TEMP_VERIFIED]" />
</Control>
還有一個配置文件(在自定義操作項目):
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="false">
<supportedRuntime version="v4.0" />
</startup>
</configuration>
即使移動的動作後,在InstallExecuteSequence運行,我得到了同樣的錯誤 – Dafna