Monday, June 26, 2006 2:45 PM
If I add a custom action to run a console application during setup, I get this error:
There is a problem with this Windows Installer package: A program run as part of the setup did not finish as expected.
How can I successfully get a console application to run during my product's setup?
Monday, June 26, 2006 5:27 PMModerator
"Managed" custom actions (that is, custom actions written using managed languages such as VB.Net or C#) are problematic. Windows Installer prefers native DLLs, a native EXE, JScript, or VBScript. For more details on this, use your favorite search engine on "managed customer actions" (there are some pointers online for how people have gotten this to work) and also check out Aaron Stebner's comments on this at http://blogs.msdn.com/astebner/archive/2005/03/10/392280.aspx.
Hope this helps,
Monday, June 26, 2006 8:16 PM
I don't think the program I'm trying to have the installer launch is a managed program. I really have no idea what language was involved in the creation of it, but I suspect C++.
It is an executable (.exe) that runs as a console application, that is, a black screen appears during execution and disappears when the program is done, which only lasts about one second.
Monday, June 26, 2006 9:10 PMModerator
Sorry, when you said "console app," I was thinking "VB Console App" -- bad assumption on my part, although upon reflection I was somewhat overstating the case, as there are plenty of examples of creating CAs using managed code such as at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vxwlkwalkthroughusingcustomactiontocreatedatabaseduringinstallation.asp and http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vxwlkwalkthroughcreatingcustomaction.asp.
Anyway -- honestly, without being able to see the code that the console app is running, I'd be at a loss to help explain why it's failing. Debugging CAs is a chore even when you have the code -- at least then you can put in logging statements to see what's going on. Basically, for an EXE, it just launches and runs, and there's not much to it. Which node in the custom action editor are you adding it to -- Install, or Commit?