Loading
User Choose Whether or Not to Run Utility
Hi,

 

I have this DB utility which i want to be part of my install. It's just an exe. I want the user during install to be prompt with a dialog of radio button to whether or not run this utility. I am using a Basic MSI project. I have a custom dialog made. I have searched all the forums, I am not sure where to start!

 

:confused:

  • Drag a RadioButtonGroup control onto the dialog and associate it to a public property ( a property is considered public if it's all Caps like RUNMYAPP ). Add that property name to the SecureCustomProperties property ( see help for more info ).

     

    Add a series of RadioButtons to the RadioButtonGroup. Associate each button to a value such as TRUE or FALSE. This is the value assigned to RUNMYAPP.

     

    Set a condition on your custom action like: RUNMYAPP="TRUE"

     

    Also remember that if your CA changes the system state it should be scheduled as deferred and also have an rollback CA.
    Expand Post
  • Ok, so i am able to have a conditional run on the DB app. But i just realized that the exe requires some sql files to be present. It looks for it. How do I include those files so my custom exe will find them? Because when I run the install i am getting a

     

    ""A program run as part of the setup did not finish as expected..."
    Expand Post
  • Are you sure you need an EXE custom action? InstallShield can process SQL scripts for MySQL, MSSQL and Oracle.

     

    Now if you are sure you need an EXE, keep in mind that MSI doesn't support making additional files available to a custom action. However, InstallShield has Support Files and InstallScript has a LaunchAppAndWait() function. Combining these two features would do what you (think you) want.
    Expand Post
  • Hmm, the utility basically checks to see if the database is already there, if so, checks the the version then updates it with extra tables.

     

    The .exe file requires the sql files to be in the same folder. I added those sql files in the Support Files section in MSI Project. However it cannot find those files during execution. So it seems like there might not be a way to have dependant files as part of the setup file?
    Expand Post
  • What database engine? With the right error handling in your SQL statements, a simple SQL script could probably be created to get rid of the exe.

     

    Otherwise, put the EXE in the Support Files also and call it from an InstallScript custom action. Use MsiGetProperty to get the SUPPORTDIR property to know where to call the exe from. The SQL files will be in the same directory.
    Expand Post
  • Hi,

     

    Ok so I added the exe and supporting files into the support files section. I started a script using SUPPORTDIR^"app.exe".

     

    I used LaunchApp to launch it. But it is not firing and returning a -1.

     

    When i did an output for the SUPPORTDIR it pointed to some temp directory inthe local settings folder. By looking at it, non of the files I added to the support dir exists there. Am I missing something? When does it copy those files into temp?

     

    Thanks for the quick responses!!
    Expand Post
  • The issue is probably a sequence issue. If you execute after InstallFinalize then I believe your Support Files are gone. In this case you are better off either installing the file to INSTALLDIR and retrieving the file from there, OR putting the file on Disk1 and retrieving it from there. Some of this depends on your method of delivery as well.

     

    Can you sequence this before InstallFinalize?
    Expand Post
  • Hmmm, then support files should be extracted. Do you have a log file? What does that say about extracting files? Does it list your file that you need?
10 of 11

Loading
User Choose Whether or Not to Run Utility