Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 13

How to Execute Stored Procedure

How can I execute a Stored Procedure in my InstallScript MSI project? I already have SQL connectivity and am running scripts, but I don't think the SQL Scripts view is relevant for SPs. I am considering using SQLCMD in a LAUNCHAPPANDWAIT command in my InstallScript code, but I can't even get the command line correct from a command prompt on the target machine.
I also have 2 variables to pass and not sure how to do that either. Can't post what I have tried here because site won't allow it.
Any help is appreciated. Maybe there is a better way to do it. I do know that SQLCMD will be installed, but can't rely on other things being installed.
Labels (1)
0 Kudos
(2) Replies
Level 7


We use ADO via InstallScript to execute special SQL scripts. The code is based on the example found here:

SQL Server Database Maintenance

0 Kudos
Level 13

Thanks for reminding me 🙂
I got this to work by executing LaunchAppAndWait on SQLCMD in a CA. I tried to post part of it here but this sites security rules will not accept it.
0 Kudos