在Visual Studio 2008中使用自定义安装程序时出现错误1001 [英] Error 1001 using custom installer with Visual Studio 2008

查看:247
本文介绍了在Visual Studio 2008中使用自定义安装程序时出现错误1001的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I've created a simple winforms app and a custom installer. It all seems simple enough but I get the following popup and error details in the event log.

>


事件ID 11001的描述来自源找不到
MsiInstaller。引发此事件的组件未安装在本地计算机上的
中,或者安装已损坏。您可以在本地计算机上安装
或修复该组件。

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.

该事件包括以下信息:

产品:自定义操作测试器-错误1001。错误1001。初始化安装时发生异常

System.IO.FileNotFoundException:无法加载文件或程序集
'file:/// C:\Windows\ system32动作或其依赖项之一。
系统找不到指定的文件。(NULL)(NULL)(NULL)(NULL)
(NULL)

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

I have checked C:\Windows\system32 and there is no file or folder called Action but there are 3 files called ActionCenter.dll, ActionCenterCPL.dll and ActionQueue.dll

有什么办法可以解决此错误吗?

Any ideas how I resolve this error?

编辑:

按照 cosmin-pirvu 的建议,我运行了带有日志记录的安装程序。下面显示了出现错误的区域,但我仍然不怎么解决该问题。

Following the suggestion of cosmin-pirvu I ran the installer with logging. The area where it appears to error is shown below but I'm still none the wiser as how to resolve the issue.

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(

This was supposed to be a quick win to make life simpler for our users; they didn't want to have to edit config files... but it's turned into a bit of a nightmare. :o(

编辑2:

该错误仅在如图所示在自定义操作中指定了参数时才会出现,问题是自定义安装程序无用,无法读取在先前安装屏幕中输入的值。

After a lot of playing around, the error only presents itself when parameters are specified in the custom action as shown in the picture. The problem is, the custom installer is useless without being able to read the values entered in the preceding install screens.

推荐答案

经过几个小时的盘旋,我终于找到了问题所在,更重要的是,找到了解决办法。

After many hours going around in circles I have finally found the problem and more importantly, the solution.

应该是可以将上定义的参数作为 CustomActionData传递这个博客,但是至少可以说参数有点古怪...

It should be possible to pass the parameters as "CustomActionData" as defined on this blog but the parameters are a little querky to say the least...

我发现,文本参数的参数名称周围不能带有引号并应格式化为

I found that the text parameters can't have quotes around the parameter name and should be formatted like this:


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

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

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

In addition, to use the target directory parameter you need to include the quotes but instead of ending the field with a back slash, you must use a space instead, like this:


/ target = [TARGETDIR]

/target="[TARGETDIR] "

这篇关于在Visual Studio 2008中使用自定义安装程序时出现错误1001的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆