Kevin McNeish Blog

All things iOS, Kindle and .NET

Recent Posts

Tags

News

  • First books in my new book series, "iOS App Development for Non-Programmers" are now available! iBookStore: http://itunes.apple.com/us/book/book-1-diving-in-ios-app-development/id558788074?mt=11 Amazon: http://www.amazon.com/dp/B0097N8XBE Amazon: http://www.amazon.com/dp/B0099RQGMQ

Community

Email Notifications

Archives

Fixing the Creation of Setup/Deployment Packages on Windows Vista (Fixing the dreaded "error code 2869")

There are a few Visual Studio 2005 bugs that surface when building installation packages on a Windows Vista machine.

  1. If your installation package performs a custom action you will get the dreaded "error code 2869" error during installation
  2. Exceptions thrown during the install process are obscured

I found answers to these problems in Aaron Stebner's Web Log and at Omar Shahine's Web Log -- thanks to these folks for posting their solutions!

Some of the instructions were not as clear as they could be, so I have repeated them here with a few modifications:

To fix both of these problems:

  1. Download this sample script and extract the contents to the root directory of your Visual Studio Setup/Deployment project
  2. If you haven't already done so, download and install the Windows Software Development Kit for Windows Vista and .NET Framework 3.0 Runtime Components
  3. In Windows Explorer, go to this folder:

    C:\Program Files\Microsoft SDKs\Windows\v6.0\Samples\SysMgmt\MSI

    Locate the file WiRunSQL.vbs and copy it to your Setup/Deployment project's root folder
  4. Open the Setup/Deployment project in Visual Studio 2005
  5. Press F4 to display the Properties window
  6. Click on the Setup/Deployment project in the Solution Explorer
  7. Click on the PostBuildEvent property in the Properties window to display the ellipses button
  8. Click on the ellipses button to display the Post-build Event Command Line dialog
  9. Add the following command lines to the Post-build event command line text box:

    cscript.exe "$(ProjectDir)CustomAction_NoImpersonate.js" "$(BuiltOuputPath)"
    cscript.exe "$(ProjectDir)WiRunSQL.vbs" "$(BuiltOuputPath)" "INSERT INTO `Error` (`Error`, `Message`) VALUES (1001, 'Error [1]: [2]')"
  10. Build your project in Visual Studio 2005

Best Regards,

Kevin McNeish
Microsoft .NET MVP
President, Oak Leaf Enterprises, Inc.
Chief Architect of the MM .NET Application Framework

Comments

Jaxidian Update » Visual Studio 2005 Deployment Projects on Vista - Error #2869 said:

Pingback from  Jaxidian Update » Visual Studio 2005 Deployment Projects on Vista - Error #2869

# July 13, 2007 12:21 PM

Peter said:

Thank you very much for this message. i got this error message, too. i read your blog and it works now!! thx

# July 24, 2007 2:15 AM

disneyboy20 said:

After applying those solution to get rid of error 2869

I have an error like this:

"Error 1001: Exception has been thrown by the target of an invocation. --> Could not load file or assembly 'ExecutionEngine, Version=3.0 ... etc The application has failed to start because its side-by-side configuration is incorrect. Please see the application.."

How can I fix this error?

# December 5, 2007 3:32 AM

Martin Dodd said:

This is the first article that explains, first how to use WiRunSQL.vbs and get rid of 2869 error.  Excellent.

# July 14, 2011 12:55 PM
Leave a Comment

(required) 

(required) 

(optional)
 

(required) 

If you can't read this number refresh your screen
Enter the numbers above: