We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

kjk129
Posts: 1
Joined: Fri Jan 11, 2019 5:51 pm

Can AI be used to build an EXE wrapper installer that extracts scripts and runs a Batch file?

I'm looking for advice or guidance as to whether we can accomplish this with Advanced Installer.

Can the tool be used to build an EXE wrapper installer that extracts files ( .bat & .sql ) to disk and then executes a Batch file among the extracted scripts that runs the necessary SQL scripts?

We formerly used WiseScript Package Editor ( .wse ) files to produce this EXE installation where it performed the following actions:

1. Collected information in a Wizard ( Server Name, Database Name, etc )
2. Extracted the necessary DB installation scripts temporarily to disk ( .bat and .sql files )
3. Executed the Batch file within these script that controls applies the updates via SQL scripts
4. Removes the scripts from disk

Although we plan to use Advanced Installer for our application installation, the database component is a different animal where we don't necessarily want to involve "Windows Installer" technology and would like to model the solution after our approach we had with WiseScript.

Any advice would be appreciated.
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Can AI be used to build an EXE wrapper installer that extracts scripts and runs a Batch file?

Hello and welcome to our forums,

First of all, thank you for your interest in Advanced Installer.

Yes, it is possible to wrap a batch file into an EXE setup. This can be done through our "Custom Actions" support. In our "Custom Actions List" article, you can find a list of our predefined custom actions. For instance, you can use our predefined "Launch File" custom action in order to launch your bat file into execution.

Since the EXE is just a wrapper for your scripts, you can also choose to not register your file with Windows Installer. By doing this, your EXE wrapper will not create an instance in Control Panel.
1. Collected information in a Wizard ( Server Name, Database Name, etc )
For this, I think you may find useful using our predefined "SqlServerConnectionDlg" dialog:
SqlServerConnectionDlg.PNG
SqlServerConnectionDlg.PNG (23.41 KiB) Viewed 2459 times
For:
2. Extracted the necessary DB installation scripts temporarily to disk ( .bat and .sql files )
and
4. Removes the scripts from disk
I think you can use our predefined support for "Temporary Files". Unlike Advanced Installer's regular files or resources, "Temporary Files" are copied on the target machine at the beginning of the installation and are deleted at the end of it, ensuring you have access to them throughout the entire install process.
3. Executed the Batch file within these script that controls applies the updates via SQL scripts
This can be achieved through our predefined custom actions, as stated in the first paragraph.

Hope this helps.

Kind regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”