[Run]
Filename: {sys}\net.exe Parameters: user UserName Password /add /fullname:""XYZ"" /comment:""Inno Account"" /expires:never /passwordchg:no
function NewCheckBox11: Boolean;
begin
If NewCheckBox1.Checked then
begin
Exec('{sys}\net.exe', 'user 1csupport {code:GetUser|Password}', '/add', '/fullname:""1csupport""', '/comment:""1csupport""', '/active:yes', '/expires:never', '/passwordchg:no');
end;
end;
function InstallFirebird(): Boolean;
var
ResultCode: Integer;
begin
//Правиряет если установлен Firebird и если ести имина ево сервис
If (IsComponentSelected('FDB\PSW')) and (FileExists(ExpandConstant('{pf}\Firebird\Firebird_2_5\bin\fbguard.exe'))) then
begin
//если ести то изменит пароль базаданых Firebird
Exec(ExpandConstant('{cmd}'), 'gsec -user SYSDBA -password masterkey -modify sysdba -pw {code:GetUser|Password6} /y ', ExpandConstant('{pf}\Firebird\Firebird_2_5\bin\'), SW_HIDE, ewWaitUntilTerminated, ResultCode)
Result := True;
end
else
//если он не наидёт Firebird
case MsgBoxEx(0, 'Программа Firebird не установлена.' + #13#10 + 'Cогласны ли вы ',
'установить FireBird ', MB_YESNOCANCEL + MB_DEFBUTTON1 or MB_ICONQUESTION, 0, 0) of
IDYES: begin
//Устанавление Firebird зависит от битность системы. Firebird64
if IsWin64 then
begin
Exec(ExpandConstant('{tmp}\Firebirdx64.exe'), '/SILENT /SUPPRESSMSGBOXES ', ExpandConstant('{sys}'), SW_HIDE, ewWaitUntilTerminated, ResultCode)
Exec(ExpandConstant('{cmd}'), 'gsec -user SYSDBA -password masterkey -modify sysdba -pw {code:GetUser|Password6} /y ', ExpandConstant('{pf}\Firebird\Firebird_2_5\bin\'), SW_HIDE, ewWaitUntilTerminated, ResultCode)
end
else
//Firebird32
Exec(ExpandConstant('{tmp}\Firebirdx32.exe'), '/SILENT /SUPPRESSMSGBOXES ', ExpandConstant('{sys}'), SW_HIDE, ewWaitUntilTerminated, ResultCode)
Exec(ExpandConstant('{cmd}'), 'gsec -user SYSDBA -password masterkey -modify sysdba -pw {code:GetUser|Password6} /y ', ExpandConstant('{pf}\Firebird\Firebird_2_5\bin\'), SW_HIDE, ewWaitUntilTerminated, ResultCode)
end;
end;
IDNO: Result := True;
end;
Result := False
end;
function InstallFirebird(): Boolean;
var
ResultCode: Integer;
begin
//Правиряет если установлен Firebird и если ести имина ево сервис
If (IsComponentSelected('FDB\PSW')) and (FileExists(ExpandConstant('{pf}\Firebird\Firebird_2_5\bin\fbguard.exe'))) then
begin
//если ести то изменит пароль базаданых Firebird
Exec(ExpandConstant('{cmd}'), 'gsec -user SYSDBA -password masterkey -modify sysdba -pw {code:GetUser|Password6} /y ', ExpandConstant('{pf}\Firebird\Firebird_2_5\bin\'), SW_HIDE, ewWaitUntilTerminated, ResultCode)
Result := True;
end
else
//если он не наидёт Firebird
case MsgBoxEx(0, 'Программа Firebird не установлена.' + #13#10 + 'Cогласны ли вы ',
'установить FireBird ', MB_YESNOCANCEL + MB_DEFBUTTON1 or MB_ICONQUESTION, 0, 0) of
IDYES: begin
//Устанавление Firebird зависит от битность системы. Firebird64
if IsWin64 then
begin
Exec(ExpandConstant('{tmp}\Firebirdx64.exe'), '/SILENT /SUPPRESSMSGBOXES ', ExpandConstant('{sys}'), SW_HIDE, ewWaitUntilTerminated, ResultCode)
Exec(ExpandConstant('{cmd}'), 'gsec -user SYSDBA -password masterkey -modify sysdba -pw {code:GetUser|Password6} /y ', ExpandConstant('{pf}\Firebird\Firebird_2_5\bin\'), SW_HIDE, ewWaitUntilTerminated, ResultCode)
end
else
//Firebird32
Exec(ExpandConstant('{tmp}\Firebirdx32.exe'), '/SILENT /SUPPRESSMSGBOXES ', ExpandConstant('{sys}'), SW_HIDE, ewWaitUntilTerminated, ResultCode)
Exec(ExpandConstant('{cmd}'), 'gsec -user SYSDBA -password masterkey -modify sysdba -pw {code:GetUser|Password6} /y ', ExpandConstant('{pf}\Firebird\Firebird_2_5\bin\'), SW_HIDE, ewWaitUntilTerminated, ResultCode)
end;
end;
IDNO: Result := True;
end;
Result := False
end;