Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > VS 2008 Install Project Unknown Error on one machine
 

VS 2008 Install Project Unknown Error on one machine

I have a visual studio 2008 install project with a custom action for install and commit. It works fine on 9 PCs but on the 10th it fails with an unknown error. I have posted the code for the install and commit event handlers and the part of the msi log where the error occurred.

I have been able to determine that the install event gets control and processes without going into the catch block and so no obvious errors seem to be happening in the code butas soon as the install event is done and passes control back to whoever called it the Unknown Error occurs.

Custom Action Code

-Note-
The CustomActionData Property for the Install and Commit event has the following definition
/ltyTargetDir="[TARGETDIR]\"


public override void Commit(System.Collections.IDictionary savedState)
{
try
{
base.Commit(savedState);

// Launch USBSetup exe which will put the inf driver into the store
String args = @"""" + @savedState["TargetDir"].ToString() + INFFILENAME + @"""";
Process.Start(@"""" + @savedState["TargetDir"].ToString() + EXEFILENAME + @"""", args);
}
catch (Exception ex)
{
...
}
}

-Note-
I have been able to step through the following code and produce no errors or anything else that might be helpful

public override void Install(System.Collections.IDictionary stateSaver)
{
try
{
base.Install(stateSaver);
//Save the inf file location in the 'global' dictionary to be used by commit
stateSaver.Add("TargetDir", Context.Parameters["ltyTargetDir"].ToString());
}
catch (Exception ex)
{
....
}
}


Section of an MSI log for the error case

MSI (s) (78:4C) [20:21:02:982]: Executing op: ActionStart(Name=_D8C363A4_4858_496B_94FE_84D5579AC227.install,,)
Action 20:21:02: _D8C363A4_4858_496B_94FE_84D5579AC227.install.
MSI (s) (78:4C) [20:21:02:982]: Executing op: CustomActionSchedule(Action=_D8C363A4_4858_496B_94FE_84D5579AC227.install,ActionType=3073,Source=BinaryData,Target=ManagedInstall,CustomActionData=/installtype=notransaction /action=install /LogFile= /ltyTargetDir="C:\Program Files\Thales Communications\Thales Liberty PcProgrammer\\" "C:\Program Files\Thales Communications\Thales Liberty PcProgrammer\ltyPostInstallClass.dll" "C:\DOCUME~1\wmotter\LOCALS~1\Temp\CFG29DC.tmp")
MSI (s) (78:14) [20:21:02:997]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI29E0.tmp, Entrypoint: ManagedInstall
MSI (s) (78:40) [20:21:02:997]: Generating random cookie.
MSI (s) (78:40) [20:21:03:029]: Created Custom Action Server with PID 212 (0xD4).
MSI (s) (78:1C) [20:21:04:185]: Running as a service.
MSI (s) (78:1C) [20:21:04:185]: 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. Unknown error "-1".
MSI (s) (78!00) [20:21:18:513]:
MSI (s) (78:14) [20:21:18:513]: Leaked MSIHANDLE (91) of type 790531 for thread 1280
MSI (s) (78:14) [20:21:18:513]: Note: 1: 2769 2: _D8C363A4_4858_496B_94FE_84D5579AC227.install 3: 1
DEBUG: Error 2769: Custom Action _D8C363A4_4858_496B_94FE_84D5579AC227.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: _D8C363A4_4858_496B_94FE_84D5579AC227.install, 1,
Action ended 20:21:18: InstallExecute. Return value 3.

harvshilling  Wednesday, May 27, 2009 11:54 AM

Hi Harvshilling,

It seems that you launchanother installer packageduringan installationvia a custom action, right?

Ifthe custom action is in the InstallExecuteSequence of the installer package,you can'tlaunchanotherinstaller packageusing the custom action. This is because a system_wide mutex protects the InstallExecuteSequence. The result of this is that only one installation per system can enter the execute sequence. So you can't launch other installer packages from the execute sequence unless you use one of the supported ways of nesting installations.

The following KB article introduces how to createa nested .msi package:
http://support.microsoft.com/default.aspx/kb/306439

Hope this helps.

Sincerely,
Linda Liu


Please remember to mark the replies as answers if they help and unmark them if they provide no help. end us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.
Linda Liu  Tuesday, June 02, 2009 9:27 AM

Hi Harvshilling,

It seems that you launchanother installer packageduringan installationvia a custom action, right?

Ifthe custom action is in the InstallExecuteSequence of the installer package,you can'tlaunchanotherinstaller packageusing the custom action. This is because a system_wide mutex protects the InstallExecuteSequence. The result of this is that only one installation per system can enter the execute sequence. So you can't launch other installer packages from the execute sequence unless you use one of the supported ways of nesting installations.

The following KB article introduces how to createa nested .msi package:
http://support.microsoft.com/default.aspx/kb/306439

Hope this helps.

Sincerely,
Linda Liu


Please remember to mark the replies as answers if they help and unmark them if they provide no help. end us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.
Linda Liu  Tuesday, June 02, 2009 9:27 AM
Why do you have those two calls, Install and Commit? I'm not saying this is the issue but it's more code than you need. Just use ityTargetDir in the Commit custom action, passed in with CustomActionData in the usual way.

Note that your code isn't finishing, it's crashing. That's the underlying cause. Stepping through code isn't going to help . This code is running on an msiexec.exe process, perhaps with the sysetm account, not in your install directory and more.
What do you do in the catch blocks? Are you sure your code in there is safe? You didn't show it. Can't you report the error in some way?
Phil Wilson
PhilWilson  Tuesday, June 02, 2009 9:31 PM

You can use google to search for other answers

Custom Search

More Threads

• RemovePreviousVersions: Installs before it uninstalls??
• Get the original upgradeCode that was used to install a pervious version
• Trouble accessing URL parameters from ClickOnce API
• Signing Manifest when Deploying to Customer's Server
• Setup & Deployment Package
• .deploy file not found
• Run pre install exe before the install
• ClickOnce NUBE - Security Warning
• Client App using IE Browser control
• Thirdy Party DLLS - Deploy using clickonce