function CreateLICStopServiceBatch(): boolean;
begin
Result := true;
fileName := ExpandConstant('{code:GetBasicDirectoryValue}\{code:GetInstance}\_Service\Stop_LIC_Service.bat');
SetArrayLength(lines, 3);
lines[0] := ExpandConstant('set wrapdir={code:GetBasicDirectoryValue}\{code:GetInstance}\_Service');
lines[1] := 'cd /d %wrapdir%';
lines[2] := ExpandConstant('commons-daemon\prunsrv.exe //SS//{code:GetLSDVBServiceNameTEdit}');
Result := SaveStringsToFile(filename,lines,false);
exit;
end;
CreateLICStopServiceBatch();
Right now I'm just writing the file in to the directory, doesn't matter if the file exist or not. But I want to check if the file exist (FileExists
) and also have the opportunity to choose (in a dialog) overwrite or take the old file which already exist.