2009-05-21

Inno Setup & MySQL

To start mysql as service from Inno Setup installer you can use this code:


[Run]
Filename: {app}\bin\mysqld; Parameters: --install; WorkingDir: {app}\bin;
Flags: postinstall runhidden; StatusMsg: MySQL service installing;
AfterInstall: InitializeService;

[Code]
procedure InitializeService();
var
ErrorCode: Integer;
begin
ShellExec('', ExpandConstant('{sys}\net.exe'),' start mysql', '',
SW_SHOW, ewNoWait, ErrorCode);
end;

2 comments:

Livio said...

Excellent code...

Livio said...

Excellent code...great job..