This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Custom Action/Sql Scripts Issue
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 08, 2008
12:11 PM
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?
(8) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 08, 2008
01:55 PM
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...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 08, 2008
04:51 PM
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 08, 2008
04:54 PM
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...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 08, 2008
05:10 PM
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.
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 08, 2008
05:39 PM
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?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 09, 2008
09:34 AM
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?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 09, 2008
09:39 AM
See for example this newsletter tip (PDF warning): http://www.macrovision.com/webdocuments/PDF/msi_writing_to_the_log_file.pdf?link_id=productsTipsTricks...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 09, 2008
10:39 AM
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?