waldedg
Posts: 15
Joined: Fri Mar 27, 2015 6:42 pm

SQL Database Install Order

Mon Apr 17, 2017 4:09 pm

I am creating an installer that will install MS SQL Express 2014 as a Prerequisite. Then install a website as the main feature (Which will run on the client machine as a service).
I need to run some SQL scripts before the main feature "service" gets created/started on the machine (using a Custom Action).
I need to know when in the installation process the SQL Database Scripts run (Specifically what execution stage (After Install Execution>Preparing? ), so I know when to run my custom actions to create/start the service.
Also I am trying to use the Server>SQL Databases>SQL Script>Script Replacement feature. I want to search and replace the path for the (mdf and ldf) sql files and place them in the APPDIR (property) that is chosen in the FolderDlg.
When I have tried to use APPDIR, it does not show up as a property that is available. I have tried moving the FolderDlg up in the process (Pre-install-UI under WelcomePrereqDlg), but still does not show up.

Any help would be greatly appreciated.

Thanks,

Doug
Thanks, Doug

waldedg
Posts: 15
Joined: Fri Mar 27, 2015 6:42 pm

Re: SQL Database Install Order

Tue Apr 18, 2017 9:22 pm

ok. I have passed the first obstacle.

But I am still having issues with the Property [APPDIR] not being available for use in the SQL Database> SQL Script> Script Replacement. I want to use it in the Replace With box.

Thanks in advance for your help.

Doug
Thanks, Doug

Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: SQL Database Install Order

Wed Apr 19, 2017 8:22 am

Hi Doug,

I'm glad you got this working by yourself.
I am trying to use the Server>SQL Databases>SQL Script>Script Replacement feature. I want to search and replace the path for the (mdf and ldf) sql files and place them in the APPDIR (property) that is chosen in the FolderDlg.
To restore a database during installation, please follow the steps from the How to restore a database during installation article.
I am still having issues with the Property [APPDIR] not being available for use in the SQL Database> SQL Script> Script Replacement. I want to use it in the Replace With box.
There is no limitation using the APPDIR property. Can you please tell us why you are not able to use the APPDIR property in the SQL Script Replacement Dialog? What is the encountered behaviour?

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

waldedg
Posts: 15
Joined: Fri Mar 27, 2015 6:42 pm

Re: SQL Database Install Order

Wed Apr 19, 2017 1:26 pm

What is happening is that I am trying to put APPDIR in the Replace with text box in the SQL Script Replace popup Controller by using the Right Click and going to the context menu "Properties" which brings up the Select a Property control (see attached image(1).

What I found is that if I did NOT use the Select a Property control and simply just typed "[APPDIR]" you can see intellisense start to fill in and it works (See Attached image(2)).

So I was able to get it to work. Just thought I should be able to use the Select a property control to do it.

Thanks,

Doug
Attachments
CropperCapture[1].jpg
Select a Property - can not get to APPDIR
CropperCapture[1].jpg (22.82KiB)Viewed 3642 times
CropperCapture[2].jpg
SQL Script Replace with APPDIR
CropperCapture[2].jpg (12.6KiB)Viewed 3642 times
Thanks, Doug

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: SQL Database Install Order

Thu Apr 20, 2017 12:56 pm

Hello Doug,

Thank you for your follow up. We appreciate it.

Indeed, I can confirm you this is an Advanced Installer limitation. Thank you for bringing this to our attention. We will try to add a fix for this in a future version of Advanced Installer.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: SQL Database Install Order

Fri Jul 28, 2017 1:16 pm

Hello,

This was fixed in version 14.2 of Advanced Installer released on July 26th, 2017.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”