gpt4 book ai didi

visual-studio-2008 - 在 Visual Studio 2008 中使用自定义安装程序时出现错误 1001

转载 作者:行者123 更新时间:2023-12-04 08:53:55 25 4
gpt4 key购买 nike

我创建了一个简单的 winforms 应用程序和一个自定义安装程序。这一切看起来都很简单,但我在事件日志中得到了以下弹出窗口和错误详细信息。

Error message box displayed before running the custom action code

The description for Event ID 11001 from source MsiInstaller cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

Product: Custom Action Tester -- Error 1001. Error 1001. Exception occurred while initializing the installation: System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Windows\system32\Action' or one of its dependencies. The system cannot find the file specified.. (NULL) (NULL) (NULL) (NULL) (NULL)

the message resource is present but the message is not found in the string/message table



我检查了 C:\Windows\system32 并且没有名为 Action 的文件或文件夹,但有 3 个文件名为 ActionCenter.dll , ActionCenterCPL.dll ActionQueue.dll

任何想法我如何解决这个错误?

编辑:

遵循 的建议cosmin-pirvu 我使用日志记录运行安装程序。出现错误的区域如下所示,但我仍然不知道如何解决问题。
MSI (s) (40:7C) [09:34:26:523]: Executing op: CustomActionSchedule(Action=_FBC0CC84_D5B4_41F9_A3EC_98A13BC7E73E.install,ActionType=3073,Source=BinaryData,Target=ManagedInstall,CustomActionData=/installtype=notransaction /action=install /LogFile= /targetdir="C:\Test\Custom Action Tester\" /Param1="C:\Test\TestFile.txt" /Param2="C:\Test\" "C:\Test\Custom Action Tester\ConfigSetup.dll" "C:\Users\wildb\AppData\Local\Temp\CFG66BE.tmp")
MSI (s) (40:94) [09:34:26:525]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI85A8.tmp, Entrypoint: ManagedInstall
MSI (s) (40:F0) [09:34:26:525]: Generating random cookie.
MSI (s) (40:F0) [09:34:26:557]: Created Custom Action Server with PID 6492 (0x195C).
MSI (s) (40:D4) [09:34:26:586]: Running as a service.
MSI (s) (40:D4) [09:34:26:587]: Hello, I'm your 32bit Elevated custom action server.
DEBUG: Error 2835: The control ErrorIcon was not found on dialog ErrorDialog
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2835. The arguments are: ErrorIcon, ErrorDialog,
Error 1001. Error 1001. Exception occurred while initializing the installation:
System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Windows\system32\Action' or one of its dependencies. The system cannot find the file specified..
MSI (s) (40!4C) [09:34:29:580]:
MSI (s) (40:94) [09:34:29:584]: Leaked MSIHANDLE (14) of type 790531 for thread 7244
MSI (s) (40:94) [09:34:29:584]: Note: 1: 2769 2: _FBC0CC84_D5B4_41F9_A3EC_98A13BC7E73E.install 3: 1
DEBUG: Error 2769: Custom Action _FBC0CC84_D5B4_41F9_A3EC_98A13BC7E73E.install did not close 1 MSIHANDLEs.
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2769. The arguments are: _FBC0CC84_D5B4_41F9_A3EC_98A13BC7E73E.install, 1,
CustomAction _FBC0CC84_D5B4_41F9_A3EC_98A13BC7E73E.install returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 09:34:29: InstallExecute. Return value 3.

这应该是一个快速的胜利,让我们的用户生活更简单;他们不想编辑配置文件……但它变成了一场噩梦。 :o(

编辑 2:

经过大量尝试后,只有在自定义操作中指定参数时才会出现错误,如图所示。问题是,如果无法读取在前面的安装屏幕中输入的值,自定义安装程序就毫无用处。

Custom action property screen

最佳答案

经过几个小时的兜兜转转,我终于找到了问题,更重要的是,找到了解决方案。

应该可以将参数作为定义的“CustomActionData”传递 on this blog但至少可以说参数有点古怪......

我发现文本参数不能在参数名称周围加上引号,应该这样格式化:

/Param1=[CONFIG_TESTFILE] /Param2=[CONFIG_TESTFOLDER]



此外,要使用目标目录参数,您需要包含引号,但不是以反斜杠结束字段,而是必须使用空格,如下所示:

/target="[TARGETDIR] "

关于visual-studio-2008 - 在 Visual Studio 2008 中使用自定义安装程序时出现错误 1001,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8491095/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com