Template Examples

Parent Previous Next

Example Template


An example of what a template file should look like (*.tpl):


; The parameter to the left of the equal sign has to match Ex. DefaultGroupName


[Setup]

DefaultGroupName=InnoScript

AppPublisher=InnoScript

AppVersion=2.1

AppCopyright=Copyright 2002

PrivilegesRequired=admin

DefaultDirName={pf}\InnoScript

AppName=InnoScript

; The Name parameter has to match Ex. "quicklaunchicon"


[Tasks]

Name: "quicklaunchicon"; DestDir: "{sys}"

; The filename (of the Source parameter) has to match (without path) Ex. RICHED32.DLL


[Files]

Source: "C:\Windows\system32\RICHED32.DLL"; DestDir: "{sys}"; MinVersion: 4.1,4.0; Flags: onlyifdoesntexist

Source: "C:\Windows\system32\RICHTX32.OCX"; DestDir: "{sys}"; MinVersion: 4.1,4.0; Flags: onlyifdoesntexist

Source: "c:\windows\system32\Test.ocx"; DestDir: "{sys}"; MinVersion: 4.0,4.0; Flags: regserver sharedfile

Source: "\\ace\randem\develop\innoscript\Test.exe"; DestDir: "{app}"; MinVersion: 4.0,4.0; Flags: ignoreversion

; The filename parameter has to match (without path) Ex. InnoScript.url


[INI]

Filename: "{app}\InnoScript.url"; Section: "InternetShortcut"; Key: "URL"; String: "http://www.randem.com"

; The parameter to the left of the equal sign has to match Ex. DefaultGroupName


[LangOptions]

LanguageName=English

; The filename parameter has to match (without path) Ex. InnoScript.url


[Icons]

Name: "{group}\InnoScript on the Web"; Filename: "{app}\InnoScript.url" : Whatever

; The filename parameter has to match (without path) Ex. InnoScript.exe


[Run]

Filename: "{app}\InnoScript.exe"; Description: "Launch InnoScript"; Flags: postinstall skipifsilent

; The Name parameter has to match Ex. "{app}\InnoScript.url"


[UninstallDelete]

Type: files; Name: "{app}\InnoScript.url" : whatever

; The filename parameter has to match (without path) Ex. InnoScript.exe


[InstallRun]

Filename: "{app}\InnoScript.exe"; Description: "Launch InnoScript"; Flags: postinstall skipifsilent

Actual Sample Template

; Modified output to create a directory with just the VB5 and VB6 Runtime files, so that InnoScript can use this directory

; to get the files needed for the user installation during conversion.


[Setup]

AppPublisherURL=http://www.randem.com

AppSupportURL=http://www.randem.com/support.html

AppUpdatesURL=http://www.randem.com/InnoScript.html

DefaultDirName={pf}\Randem Systems\InnoScript\InnoScript 2.3

;WizardSmallImageFile=Wizsmallimage.bmp

;WizardImageFile=Wizimage.bmp

DefaultGroupName=InnoScript

AllowNoIcons=yes

InfoBeforeFile=I:\Develop\InnoScript\Scripts\Setup.txt

InfoAfterFile=I:\Develop\InnoScript\Scripts\ReadMe.txt

AppCopyright= Copyright (c) 2002 - 2003, Randem Systems, Inc.

OutputBaseFilename=InnoScript230


[Tasks]

Name: "desktopicon"; Description: "Create a &desktop icon"; GroupDescription: "Additional Icons:"

Name: "quicklaunchicon"; Description: "Create a &Quick Launch icon"; GroupDescription: "Additional Icons:"; Flags: unchecked

Name: "liveupdate"; Description: "Automatic &LiveUpdate (Startup Folder)"; GroupDescription: "Additional Icons:"; Flags: unchecked


[Files]

Source: "I:\Develop\InnoScript\Doc\InnoScript.rtf"; DestDir: "{app}"; MinVersion: 4.0,4.0; Flags: ignoreversion

Source: "I:\Develop\InnoScript\VB5Dep.ini"; DestDir: "{app}"; MinVersion: 4.0,4.0; Flags: ignoreversion

Source: "I:\Develop\InnoScript\VB6Dep.ini"; DestDir: "{app}"; MinVersion: 4.0,4.0; Flags: ignoreversion

Source: "I:\Develop\InnoScript\LiveUpdate\AutoUpdate.exe"; DestDir: "{app}"; MinVersion: 4.0,4.0; Flags: ignoreversion

Source: "I:\Develop\InnoScript\Doc\InnoScript.tpl"; DestDir: "{app}\Template"; MinVersion: 4.0,4.0; Flags: ignoreversion

Source: "I:\Develop\InnoScript\Doc\UnSafe.fil"; DestDir: "{app}"; MinVersion: 4.0,4.0; Flags: ignoreversion

Source: "I:\Develop\InnoScript\InnoScript.isr"; DestDir: "{app}"; MinVersion: 4.0,4.0; Flags: ignoreversion

; Put VB5 and VB6 Runtime files inside the app folder

*Source: "I:\Develop\VB 5 Redist Files\*.*"; DestDir: "{app}\VB5 Runtime"; MinVersion: 4.0,4.0; Flags: ignoreversion

*Source: "I:\Develop\VB 6 Redist Files\*.*"; DestDir: "{app}\VB6 Runtime"; MinVersion: 4.0,4.0; Flags: ignoreversion


[INI]

Filename: "{app}\InnoScript.url"; Section: "InternetShortcut"; Key: "URL"; String: "http://www.randem.com/innoscript.html"

Filename: "{app}\InnoScript.ini"; Section: "InnoScript"; Key: "VB6Dir1"; String: "{app}\VB6 Runtime\"

Filename: "{app}\InnoScript.ini"; Section: "InnoScript"; Key: "VB6Dir2"; String: "{app}\VB5 Runtime\"


[Icons]

*Name: "{group}\LiveUpdate"; Filename: "{app}\AutoUpdate.exe"; WorkingDir: "{app}"

*Name: "{userstartup}\LiveUpdate"; Filename: "{app}\AutoUpdate.exe"; Tasks: liveupdate

*Name: "{commondesktop}\InnoScript"; Filename: "{app}\InnoScript.exe"; Tasks: desktopicon; WorkingDir: "{app}"

*Name: "{commonstartup}\LiveUpdate"; Filename: "{app}\AutoUpdate.exe"; Tasks: liveupdate; WorkingDir: "{app}"; Parameters: "/Auto"

*Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\InnoScript"; Filename: "{app}\ AutoUpdate.exe"; WorkingDir: "{app}"; Tasks: quicklaunchicon

Created with the Personal Edition of HelpNDoc: Easily create CHM Help documents