cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ashahidi
Level 4

Custom Action/Sql Scripts Issue

I'm trying to run a Custom Action before my SQL Scripts get run. From my understanding, the SQL Scripts are run after "ExecuteAction". I've tried putting my custom action before this step but I still can't get it to run. Any ideas?
Labels (1)
0 Kudos
(8) Replies
RobertDickau
Flexera Alumni

The help topic "InstallShield Custom Action Reference" describes the custom actions used to perform various SQL (and other) tasks; you might look for the desired action in the list, then look for it in your project's sequences, and then schedule your action accordingly...
0 Kudos
ashahidi
Level 4

Ok I found the property that installs the SQL scripts (ISSQLINSTALL). However, I am having another issue. Right now I have an exe file which runs right after the InstallFiles action. After this there is a script that runs to update a InstallShield property from the config file of the exe. However I keep getting an error on the second custom action and I'm guessing this is due to the fact that it can't read something from the installer regarding InstallShield properties.
0 Kudos
RobertDickau
Flexera Alumni

What is the error? Can you post the part of the script that fails? As you know, properties can't be set during deferred mode, but if your script is being called during immediate mode, perhaps someone here can help track it down...
0 Kudos
ashahidi
Level 4

I get a generic error saying that script X could not be run. I setup some sample text outputted to a file to check if the script is even hit, which it is since I get some output. However, in the next lines I'm trying to locate the config file of the exe so I'm using some InstallShield properties.

EX:
location = Session.Property("INSTALLDIR") + Session.Property("FLEX_DATABASES_LOCATION") + "\" + Session.Property("FLEX_SYSSETUP_LOCATION") + "\Flex.Install.CustomAction.exe.config"

I again have some sample text after this to see if the location variable outputs anything and nothing comes out.
0 Kudos
RobertDickau
Flexera Alumni

If you create an MSI log file (there might even be one in your Temp folder if the installer failed), the error details might point to a particular line where the script failed. Does that help narrow it down?
0 Kudos
ashahidi
Level 4

I tried looking in the temp folder and there was nothing there even though my install did roll back. How do I create an MSI log file?
0 Kudos
RobertDickau
Flexera Alumni

0 Kudos
ashahidi
Level 4

Before I try that, I've been trying a couple different things and I've noticed that my 1st custom action which is an executable runs fine when I have it as Immediate Execution and set it anywhere inside of the Install UI Sequence. However if I put it anywhere inside of the Install Exec sequence which I need since I want it to run before the ISSQLServerInstall. Any ideas why that's happening?
0 Kudos