开发者

Windows Installer (C#) error code 2869

开发者 https://www.devze.com 2022-12-26 18:50 出处:网络
I have a project, in VS 2005, which has a console application and a setup project associated to install the application.I also have an installer class in the console application that the setup project

I have a project, in VS 2005, which has a console application and a setup project associated to install the application. I also have an installer class in the console application that the setup project will use to do some validation before installation. Those tasks are checking the database connection string and checking some directory locations to make sure they exist prior to installation.

I am getting an error code of 2869 when I try to install the application. All the code is written in C#. I have goog开发者_开发百科led for this error code on Windows XP, but only found articles that deal with Vista and Windows 7. Any ideas what might be happening? Is there a workaround?


This won't help with fixing the installer code, but just in case this happens to anyone when doing in install on a Windows 2008 Server you probably need to run the installer from an elevated command prompt:

  1. Open a command prompt with Run As Administrator and then run the installer
  2. msiexec /i installer.msi


Installer errors are difficult to debug, you can try to :

  1. Look in Event Viewer / Application for logged exceptions
  2. Surround your code with a big try/catch and a MessageBox.Show(ex.ToString()) in the catch clause
  3. Generate a log when installing: msiexec /i "installer.msi" /lvx "log.txt" and look in it for clues


Error 2869 is documented as a dialog issue with the Windows Installer dialogs. The only reason you see it is that the setup is showing the error dialogs and there is a minor issue with it. The true error will be earlier in the log. In other words it's a meaningless downstream error from an install that has already failed. Look earlier in the log for the actual error, which nine times out of ten will be a failed custom action.


To get an idea of what happened, you can use Sysinternals' Process Monitor. It automatically instruments your operating system and is portable so you just need to do the following:

  • Download Process Monitor from https://technet.microsoft.com/sysinternals/processmonitor.aspx
  • Start Process Monitor
  • Set Filter "Process Name is msiexec.com" to monitor your installer
  • Start your installer (e.g. setup.exe) (no need to modify or run it with special command line switch)
  • Check the monitoring log for errors (file access, registry, etc.)

In my case Process Monitor showed me the cause "DISK FULL" at file extraction leading to error code 2869.


I had this error as well and pursued the wrong course going after what was thought to be a "Run as Administrator" issue as explained above and in other forums.

I tried many solutions all dealing with Run as Administrator....Nothing worked.

I built a Windows 10 VM and tested the install in the purest environment I could and got the same error during the installation execution.

At the end of it all.... it turned out I got the error code 2869 because the Serial Number I entered was not valid. (The serial number I was given by my predecessor had more entries than needed).

Once I entered the correct serial number it turned out "right as rain".

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号