venkideshmukh
Posts: 6
Joined: Thu Jun 15, 2006 9:55 am

silent installer for MySql

Hi all,
I want to create installer for my application.. my requirement is that, MySql 5.0 shud also get installed silently and its service shud also get started..

i can create silent installer for mysql using /qn option on command line.. but once mysql is installed silently on user machine, how to create and start the service automatically??

mysql is installed in "program files" folder by default.. so can anybody please tell me how my installer will also create mysql service and start it ??

Thanx a lot in advance,
Venki
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

The MySql can be installed as service from command line like this:

Code: Select all

mysqld-nt --install
To start/stop the MySql service use following command line:

Code: Select all

NET START mysql
NET STOP mysql
Now here is how to do this with Advanced Installer:
1. Switch to "Custom Actions" page and create a new "Exe With Working Dir" under the "InstallServices" standard action. Edit the "Full Path" filed to:

Code: Select all

C:\Program Files\mysql\bin\mysqld-nt --install
Use "Not Installed" as "Execution Condition".
2. Add a new "Exe With Working Dir" custom action under the "StartServices" and edit the "Full Path" like this:

Code: Select all

NET START mysql
Use "Not Installed" as "Execution Condition".

Regards,
Gigi
________________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
venkideshmukh
Posts: 6
Joined: Thu Jun 15, 2006 9:55 am

Thanx a lot gigi :)

This really helped
@clyde
Posts: 5
Joined: Wed Oct 05, 2016 8:44 am

Re: silent installer for MySql

hi @venkideshmukh how did you create mysql installer and used the net start mysql?
@clyde
Posts: 5
Joined: Wed Oct 05, 2016 8:44 am

Re: silent installer for MySql

Switch to "Custom Actions" page and create a new "Exe With Working Dir" under the "InstallServices" standard action.
Hi @gigi where's the under the installservice?
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: silent installer for MySql

Hi and welcome to Advanced Installer forums.

We added dedicated support for services in the newer version of Advanced Installer, so the recommended way to do this is to add a new "Control Operation" entry in the "Services" page and configure it for your service. Here you can start, stop and delete services and also pass “Service Parameters” to them.

On the other hand, if you want to see the "InstallServices" standard action, you can go in the "Custom Actions" page, right-click on the "Add Resources" action group and select the "Show standard action -> Add Resources -> InstallServices" option.

Let me know if this helped, otherwise give me more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
@clyde
Posts: 5
Joined: Wed Oct 05, 2016 8:44 am

Re: silent installer for MySql

Hi. How can i launch mysqld.exe with a command of --install?
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: silent installer for MySql

Hi,

In order to install a service, you need to add its related executable in the "Files and Folders" page of your project, then configure it in the "Services to install" section from the "Services" page.

Another method is to add that command in a BAT file, then execute it through a "Launch file" custom action after the "Add Resources" action group.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
@clyde
Posts: 5
Joined: Wed Oct 05, 2016 8:44 am

Re: silent installer for MySql

I can't even execute launch file correctly. I just need help in executing launch file
Attachments
Mysql repackage.aip
(125.49 KiB) Downloaded 542 times
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: silent installer for MySql

Hi,

I looked over the sample you provide and I have the following observations:
1. If the file you want to run is from the installation package, the "Launch file" custom action must be executed as "deferred" (check the "When the system is being modified (deferred)" option) because only then the files from the installation package will be available on the machine.

2. The two "Launch EXE with working directory" custom actions need the "File path" to be a complete path to the file, not only the name of the file. In order to do this, you can right-click in the "File path" field, select "File..." and then select the file you want to execute. Also check the "When the system is being modified (deferred)" option for these custom actions.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”