Hier ist mal eine kleine iss-Datei:
[code=delphi]#define AppVersion GetFileVersion("..\MailAgent.exe")
#define AppDescription GetFileDescription("..\MailAgent.exe")
#define AppCopyright GetFileCopyright("..\MailAgent.exe")
[InstallRun]
Filename: {sys}\net.exe; Parameters: stop MailAgent;Flags: runhidden skipifdoesntexist;
Filename: {app}\MailAgent_svc.exe; Parameters: /uninstall /silent;Flags: skipifdoesntexist;
[Setup]
AppPublisher=FriFra Informatik eK
AppPublisherURL=http://www.frifra.de/
AppVersion=1
VersionInfoVersion={#AppVersion}
VersionInfoDescription=Setup - {#AppDescription}
VersionInfoCopyright={#AppCopyright}
AppName=MailAgent (BETA RC4)
AppVerName=MailAgent 1.0
DefaultDirName={pf}\MailAgent
DefaultGroupName=MailAgent
UninstallDisplayIcon={app}\MailAgent.exe
Compression=lzma/max
SolidCompression=yes
WizardImageFile=compiler:WizModernImage-IS.bmp
WizardSmallImageFile=compiler:WizModernSmallImage-IS.bmp
SetupIconFile=..\ico\MailAgent_Setup.ico
AppMutex=FriFraMailAgent
[Languages]
Name: en; MessagesFile: compiler
efault.isl; LicenseFile: lizenz_en.rtf
Name: sp; MessagesFile: compiler:Languages\Serbian.isl; LicenseFile: lizenz_en.rtf
Name: de; MessagesFile: compiler:Languages\German.isl; LicenseFile: lizenz_de.rtf
[Messages]
sp.BeveledLabel=Srpski
en.BeveledLabel=English
de.BeveledLabel=Deutsch
[CustomMessages]
URL_HOME=http://www.frifra.de
URL_LANG=http://www.frifra.de/download/additional/MailAgent/language/
de.RemoveApp=MailAgent entfernen
en.RemoveApp=remove MailAgent
sp.RemoveApp=ukloni MailAgent
de.CreateDesktopShortcut=Verknüpfung auf dem Desktop erstellen
en.CreateDesktopShortcut=Create a Desktop shortcut
sp.CreateDesktopShortcut=Napravi precicu na Desktop
de.LaunchNow=MailAgent jetzt starten
en.LaunchNow=launch MailAgent
sp.LaunchNow=pokreni MailAgent
de.HomePageLink=Homepage besuchen
en.HomePageLink=visit homepage
sp.HomePageLink=poseti homepage
[Files]
Source: ..\MailAgent.exe; DestDir: {app}
[INI]
Filename: {app}\MailAgent.ini; Section: Language; Key: DllName; String: lang_eng.dll; Languages: en
Filename: {app}\MailAgent.ini; Section: Language; Key: DllName; String: lang_srp.dll; Languages: sp
[UninstallDelete]
Type: files; Name: {app}\*.exe
Type: files; Name: {app}\*.ini
Type: files; Name: {app}\*.txt
Type: files; Name: {app}\*.dll
[Icons]
Name: {group}\MailAgent; Filename: {app}\MailAgent.exe
Name: {group}\{cm:RemoveApp}; Filename: {uninstallexe}
[Tasks]
; zusätzliche Aufgaben
Name: desktopicon; Description: {cm:CreateDesktopShortcut}
[_ISToolDownload]
Source: {cm:URL_LANG}lang_eng.dll; DestDir: {app}; DestName: lang_eng.dll; Languages: en
Source: {cm:URL_LANG}lang_srp.dll; DestDir: {app}; DestName: lang_srp.dll; Languages: sp
[Run]
; nach der Installation ausführen
Filename: {app}\MailAgent.exe; Description: {cm:LaunchNow}; WorkingDir: {app}; Flags: postinstall nowait skipifsilent
[UninstallRun]
Filename: {sys}\net.exe; Parameters: stop MailAgent; Flags: runhidden skipifdoesntexist
Filename: {app}\MailAgent_svc.exe; Parameters: /uninstall /silent; Flags: skipifdoesntexist
Code:
const
COLOR_HIGHLIGHT = 13;
function GetSysColor(nIndex: integer): cardinal;
external 'GetSysColor@user32.dll stdcall';
const
szUrl = 'http://www.frifra.de';
procedure UrlLabelClick(Sender: TObject);
var
ErrorCode: Integer;
begin
ShellExec('open', szUrl, '', '', SW_SHOW, ewNoWait, ErrorCode);
end;
procedure InitializeWizard;
var
CancelBtn: TButton;
UrlLabel: TNewStaticText;
begin
CancelBtn := WizardForm.CancelButton;
UrlLabel := TNewStaticText.Create(WizardForm);
UrlLabel.Top := CancelBtn.Top + (CancelBtn.Height div 2) - (UrlLabel.Height div 2);
UrlLabel.Left := WizardForm.ClientWidth - CancelBtn.Left - CancelBtn.Width;
UrlLabel.Caption := ExpandConstant('{cm:HomePageLink}');
UrlLabel.Font.Style := UrlLabel.Font.Style + [fsUnderline];
UrlLabel.Cursor := crHand;
UrlLabel.Font.Color := GetSysColor(COLOR_HIGHLIGHT);
UrlLabel.OnClick := @UrlLabelClick;
UrlLabel.Parent := WizardForm;
end;
Elektronische Bauelemente funktionieren mit Rauch. Kommt der Rauch raus, geht das Bauteil nicht mehr.