Service Installation - Advanced Installer Community

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!

dudedolf
Posts: 14
Joined: Mon Aug 10, 2009 5:18 pm

Service Installation

Hi,

I have looked at the help and am trying to install MySQL as a service.

I have added the Files and Folders and selected the mysql.exe file as the service name. However, when i build and run the project, i get the following error "Service 'Your Service' (mysql.exe) failed to start. Verfiy that you have sufficient privileges to start system services".

Any help would be greatly appreciated.
Thanks
Rudy
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Service Installation

Hello,

MySQL needs to be installed as a service in a different way. You can try using a Custom Action for this. Perhaps this tutorial will help you.

Please note that you need to run the command line utilities listed there with admin credentials in order for them to properly function. In order to do this, you can do one of the following:
- set the installer to run as administrator from the Installation Type field
- set your custom action to run as deferred with no impersonation
- use the "Launch file as Administrator" custom action

Regards,
Gabriel
Last edited by GabrielBarbu on Fri Aug 14, 2009 11:47 am, edited 2 times in total.
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
dudedolf
Posts: 14
Joined: Mon Aug 10, 2009 5:18 pm

Re: Service Installation

Thanks for the reply.

I am unfortunately getting an error. This is what i have done so far.

Custom Actions
-- Install
----- New Installed Custom Action

Also selected "Deffered with no Impersonation"

Selected the MySQLD.Exe file. Therefore,

Source Path = APPDIR\MySQL Server 5.1\bin\mysqld.exe
Source Type = ...(*.exe)
Command Line: [bin_DIR]mysqld.exe --install MySQLDB --defaults-file=[MySQL_Server_5.1_DIR]my.ini

After the error the log read:

MSI (s) (A8:54) [09:20:13:087]: Executing op: ActionStart(Name=mysqld.exe,,)
Action 09:20:13: mysqld.exe.
MSI (s) (A8:54) [09:20:13:103]: Executing op: CustomActionSchedule(Action=mysqld.exe,ActionType=1042,Source=C:\Program Files\IT PROz\MySQL DB\MySQL Server 5.1\bin\mysqld.exe,Target=C:\Program Files\IT PROz\MySQL DB\MySQL Server 5.1\bin\mysqld.exe --install MySQLDB --defaults-file=C:\Program Files\IT PROz\MySQL DB\MySQL Server 5.1\my.ini,)
MSI (s) (A8:54) [09:20:13:306]: Note: 1: 1722 2: mysqld.exe 3: C:\Program Files\IT PROz\MySQL DB\MySQL Server 5.1\bin\mysqld.exe 4: C:\Program Files\IT PROz\MySQL DB\MySQL Server 5.1\bin\mysqld.exe --install MySQLDB --defaults-file=C:\Program Files\IT PROz\MySQL DB\MySQL Server 5.1\my.ini

A black command screen does flash up, but i cannot see the error here.

Also tried
Command Line: --install MySQLDB --defaults-file=[MySQL_Server_5.1_DIR]my.ini

MSI (s) (A8:A0) [09:23:12:957]: Executing op: ActionStart(Name=mysqld.exe,,)
Action 09:23:12: mysqld.exe.
MSI (s) (A8:A0) [09:23:12:957]: Executing op: CustomActionSchedule(Action=mysqld.exe,ActionType=3090,Source=C:\Program Files\IT PROz\MySQL DB\MySQL Server 5.1\bin\mysqld.exe,Target=--install MySQLDB --defaults-file=C:\Program Files\IT PROz\MySQL DB\MySQL Server 5.1\my.ini,)
MSI (s) (A8:A0) [09:23:14:113]: Note: 1: 1722 2: mysqld.exe 3: C:\Program Files\IT PROz\MySQL DB\MySQL Server 5.1\bin\mysqld.exe 4: --install MySQLDB --defaults-file=C:\Program Files\IT PROz\MySQL DB\MySQL Server 5.1\my.ini

Any help would be appreciated.

Thanks
Rudy
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Service Installation

Hello,

I am not sure why you are encountering this behavior. Can you give us more details? Please send us a screenshot with the error you are encountering.

You can try launching mysqld from the command line, with the same parameters, of course replacing the A.I. properties with their correct values to see what the error is(if there is one) and if the service is correctly installed. To see whether the service was installed successfully please use the services.msc utility.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
dudedolf
Posts: 14
Joined: Mon Aug 10, 2009 5:18 pm

Re: Service Installation

Hi,

Not sure how to post a screen of the error. Can you please advise.

I did try it on the command line and i had to put some quotes around the 'c:\program files....'. Up doing so it worked. I did try the quotes in the Advanced Installer. However this did not work.

Thanks
Rudy
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Service Installation

Hello,

Can you please send us the screenshot of the error, your .aip project file( or a stripped down version that accurately reproduces the error, in case your project contains confidential information) and the Install Log to support at advancedinstaller dot com so we can further investigate the issue?

Thank you,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
dudedolf
Posts: 14
Joined: Mon Aug 10, 2009 5:18 pm

Re: Service Installation

Ok, it has been sent now

Thanks
Rudy
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Service Installation

Hello,

I have studied the project you sent by mail. The problem rises from the fact that you are using the "Launch file or open URL" custom action. It seems like mysqld.exe needs a working directory.
You should try using the "EXE with working Dir" instead, as this seemed to work when placed under the "Install Services" standard action, and set as "Deferred with no impersonation".

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
dudedolf
Posts: 14
Joined: Mon Aug 10, 2009 5:18 pm

Re: Service Installation

Hi,

Thanks for that, it worked and helped greatly.

I am now trying to start the service, but cannot do it via the services section. Any ideas?

Thanks
Rudy
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Service Installation

Hello,

Please note that installing mysqld.exe alone will not work. Indeed it fails to start, as I have tested it. You will need to fully install the mysql directory for it to properly work.
After doing so, the service will start correctly if done via the services page.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
dudedolf
Posts: 14
Joined: Mon Aug 10, 2009 5:18 pm

Re: Service Installation

Hi,

I am indeed do the entire directory, i thought that the Services page was initiated before the Customs Actions.

I have the entire directory install (only sent a cut down version) and am installing the Service by the Custom Action (EXE with Working Directroy)
- APPDIR\MySQL Server 5.1\bin
- [#mysqld.exe] --install [SERVICE_NAME] --defaults-file=[MySQL_Server_5.1_DIR]my.ini
- Deferred with no Impersonation

What i need to do now is start the service.

Many thanks for the help so far, i am enjoying the product.
Thanks
Rudy
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Service Installation

Hi,

In order to start your service, let's say the mysql's service name is MySQLTestDB, all you have to do is:
- go to Services Page
- right click "Control Operations" and select "New Control Operation" from the context menu
- in the Service Name field input the name of your service, in our case MySQLTestDB
- preferably leave everything else unchanged, unless you really need other settings

If this still does not work, please send us your .aip file and an Install Log.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
dudedolf
Posts: 14
Joined: Mon Aug 10, 2009 5:18 pm

Re: Service Installation

Hi,

Unfortunately i got an error which reads "Service 'MySQLDB' (MySQLDB) failed to start. Verify that you have sufficient privileges to start system services". I am logged in with Admin privs.

I did notice that the service was not installed when the error message came up. Do this mean anything??

The zipped aip file is over 100MB as it has the entire MySQL directory in it, so i am unable to send. Do you want me to send some screen shots?
Thanks
Rudy
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Service Installation

Hello,

All I need is the .aip project file (not the entire application) and Install Log in order to track down your problem. Please send them to support at advancedinstaller dot com.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
cogowo
Posts: 6
Joined: Sun Sep 20, 2009 4:56 am

Re: Service Installation

Has a solution to this query been determined? If so, would you please post it?

Return to “Common Problems”