View Full Version : EXE in custom actions
07-03-2001, 12:00 AM
Thanks and sorry about the email address being wrong for my profile. Someone
played around on my system again.
"Solovyov Dmitry" <firstname.lastname@example.org> wrote in message
> See "Your InstallShield Dir\Redistributable\Uncompressed Files\Your
> Language\Intel 32"
> Change the resources in Setup.exe.
11-15-2001, 03:14 AM
I've created an EXE file using VB6 and i want that it will be launched just before the uninstallation process of my application. Wat changes must i do in my EXE file to return a exit code? What i want is that if the user cancel my exe file action, the uninstallation process to abort. I only want that uninstallation process continues if my EXE was executed ok. I've readed about exit code in the Custom actions properties, but i don't know how to use it and there is no documentation in the help system. May anybody help me?
Many thanks in advance,
11-15-2001, 01:19 PM
To get some idea you can look at the DLL Custom Actions help. The DLL Custom Action has two types and there are code samples for both. Both samples show how to stop the install based on users response. If you just copy the sample to a C++ project build and run them during uninstall, it stops the uninstall.
11-15-2001, 01:55 PM
Ok, but i want to use an EXE not a DLL. And i use Visual Basic for development... I have no idea of C
11-16-2001, 08:20 AM
You can buid the exe in VB. The code sample should just give you an idea of the Msi Api to call, return values and some basic logic.
11-19-2001, 01:23 PM
Ok, but how can i return a value from my EXE file? Can u give me a small sample or where can i get samples about this issues?
11-20-2001, 08:11 AM
Check out the API function ExitProcess which you can declare in VB like this:
Declare Sub ExitProcess Lib "kernel32" (ByVal procExitCode As Long)
Then you can use it to return a value from your Visual Basic application. A return value of 0 is considered OK, all other values is interpreted as a failure (as far as I have understood).
Don't forget that if you run the code in Visual Studio, the entire VB IDE will shut down ;-) which might not always be what U want. So only try the code in the EXE (unless you like to restart VB :-)
11-20-2001, 10:20 AM
Ok, i'll try it with InstallShield. I'll tell you if it works fine...
11-21-2001, 02:26 AM
Great! It works perfectly but there is an small inconvenience that i don't know how to solve... When my program closes with any code different from 0 the installer do not exit inmediately, it shows a message saying that there is a trouble with a program and then it aborts. Can i supress that warning??
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.