Thursday, 10 January 2008

Configuring MSI installers for Vista

When creating an MSI installable project (could be for your new Windows Mobile / Windows CE CAB project), you may encounter a problem with security on Vista, the error :

"The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2869."

To get around this I use the following in a PostBuildEvent on my PC installer project in visual studio 2005:

cscript.exe "$(ProjectDir)..\..\scripts\CustomAction_NoImpersonate.js" "$(BuiltOuputPath)"cscript.exe "$(ProjectDir)..\..\scripts\WiRunSQL.vbs" "$(BuiltOuputPath)" "INSERT INTO `Error` (`Error`, `Message`) VALUES (1001, 'Error [1]: [2]')"

You will need

- cscript.exe (provided in Windows XP)
- CustomAction_NoImpersonate.js (see Aaron Stebner's site for more information )
- WiRunSQL.vbs (Windows Installer Software Development Kit SDK)

1 comment:

Pariksheet said...

Hello Sir,

I want help from you about writting file system filter for windows mobile.
If you got this message then please reply on
pariksheet_gholap@yahoo.co.in OR
pari.sweetfrd4u@gmail.com

Awaiting for your reply.

Thanks & Regards,
Pariksheet