cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
bgl3317
Level 3

Custom Action to Call exe to run SQL Script

I understand that the SQL Scripts view is unavailable with the InstallShield limited editions. However, is it possible to create a custom action that will launch an executable file to run a SQL Server script via the osql utility (I have to use osql and not SQLCMD because certain clients are still running SQL Server 2000)?

All I need is the ability for a user to input their database server, authentication mode, and credentials, at which point I will use this info to build my osql command to fire my script. It seems to me that the SQL Script view probably uses SQL commands behind the scenes anyway, so rather than upgrade my product, I would love to just perform this step myself via command line/custom action.

Could you provide me with a recommendation, or even better, an example of how I may do this in the I.S. 2010 (or 2011) Limited Edition?

Thank you so much.

Brandon
0 Kudos
(5) Replies
bharath_k_s
Level 7

Hello Brandon,

Could you kindly refer the below post which discusses about creating Custom Action to execute SQL script files

http://community.installshield.com/showthread.php?t=134027

Hope this helps you.

Thanks,
Bharath
0 Kudos
bgl3317
Level 3

Thanks Bharath.
0 Kudos
Christopher_Pai
Level 16

Read:

http://blog.deploymentengineering.com/2011/01/augmenting-installshield-using-windows.html

Windows Installer XML has SQL support. Once you learn how to write a merge module in WiX that executes the scripts you want you can just merge it into an InstallShield project and use InstallShield as your IoC container.
0 Kudos
bgl3317
Level 3

That looks very interesting Christopher. It would be cool to pull in some of the great functionality of WiX into my ISLE project. Just today, I've been struggling with trying to find the best information and optimal way to use Windows Installer to take an MSM file and merge it into my ISLE installation package.

Could you point me to a reliable source on information for learning the right way to do this? In addition to what you just suggested, I am trying to script in a way to a take a Crystal Reports (I know, CR sucks) merge module file and install it with my app. I know I do this through a custom action in the Limited Edition. Should it be a VBScript action? If so, do I use something from MergeMod.dll or maybe Orca.exe to actually merge my merge module file? Is one of those better than another, or should I not use either?

Sorry for all the questions - I'm just getting frustrated and would sincerely and humbly appreciate any guidance. I just haven't found a good basic starting point for doing what I'm trying to do.

-Brandon
0 Kudos
Christopher_Pai
Level 16

Well, I have very creative ways of pulling different pieces of free software together to make complete solutions. But honestly, it takes alot of knowledge and experience to pick this up. It might be alot easier if you just buy a full copy of InstallShield and use that to do your learning without limitations.
0 Kudos