Software Distributor
Free Copy Protection
Software Downloads
Help>How To Install Software Sample 2
Software Distributor
Copy Protection
Menu
Info
Company
Resources
How To Install Software Using Inno Setup

This another example of a setup script which is an application called JpegGuard. The application JpegGuard uses ShareGuard for copy protection. Note the Working Directory comments about the 'Start In' parameter. This is VERY important. When your program calls ShareGuard you must ensure that the current directory has been set to the application path where all of the EXEs and DLLs reside.

; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

[Setup]
AppName=JpegGuard
AppVerName=JpegGuard V1.0
AppCopyright=Copyright (C) 1995-2003 Zapper Software, 510862 B.C. Ltd.
AppPublisher=Zapper Software
AppPublisherURL=http://www.zappersoftware.com/
AppSupportURL=http://www.zappersoftware.com/
AppUpdatesURL=http://www.zappersoftware.com/
DefaultDirName={pf}\JpegGuard
DefaultGroupName=JpegGuard
AllowNoIcons=yes
AlwaysCreateUninstallIcon=yes
LicenseFile=C:\ZSJPGD10\LICENSE.TXT
InfoBeforeFile=C:\ZSJPGD10\README.TXT
InfoAfterFile=C:\ZSJPGD10\START.TXT
UninstallDisplayIcon={app}\ZSJPGD.exe
; uncomment the following line if you want your installation to run on NT 3.51 too.
MinVersion=4,3.51

[Tasks]
Name: "desktopicon"; Description: "Create a &desktop icon"; GroupDescription:
"Additional icons:"; MinVersion: 4,4
Name: "quicklaunchicon"; Description: "Create a &Quick Launch icon"; GroupDescription:
"Additional icons:"; MinVersion: 4,4; Flags: unchecked

[Files]
; JpegGuard Application
Source: "ZSJPGD.exe"; DestDir: "{app}"; CopyMode: alwaysoverwrite

; ShareGuard Lock
Source: "ZSSGL.exe"; DestDir: "{app}"; CopyMode: alwaysoverwrite

; ShareGuard Key - remove the semi-colon if you wish to ship the KeyGen
; NOTE: This is not recommended as users just have to enter a valid certificate
;Source: "ZSSGK.exe"; DestDir: "{app}"; CopyMode: alwaysoverwrite

; ShareGuard Cyclic Reduncancy Check Dynamic Link Library
Source: "ZSSGCRC.dll"; DestDir: "{app}"; CopyMode: alwaysoverwrite

; Data Files - empty
Source: "data\jpg.dat"; DestDir: "{app}\help\"; CopyMode: alwaysoverwrite
Source: "data\xxx.dat"; DestDir: "{app}\help\"; CopyMode: alwaysoverwrite

; HTML Help Files
Source: "help\index.html"; DestDir: "{app}\help\"; CopyMode: alwaysoverwrite
Source: "help\contents.html"; DestDir: "{app}\help\"; CopyMode: alwaysoverwrite
Source: "help\help.html"; DestDir: "{app}\help\"; CopyMode: alwaysoverwrite
Source: "help\screenshots.html"; DestDir: "{app}\help\"; CopyMode: alwaysoverwrite
Source: "help\style.css"; DestDir: "{app}\help\"; CopyMode: alwaysoverwrite

; Screen Shots of Forms for Help Files
Source: "help\ssform1.jpg"; DestDir: "{app}\help\"; CopyMode: alwaysoverwrite
Source: "help\tssform1.jpg"; DestDir: "{app}\help\"; CopyMode: alwaysoverwrite
Source: "help\ssfilescanform.jpg"; DestDir: "{app}\help\"; CopyMode: alwaysoverwrite
Source: "help\tssfilescanform.jpg"; DestDir: "{app}\help\"; CopyMode: alwaysoverwrite
Source: "help\ssformfileoptions.jpg"; DestDir: "{app}\help\"; CopyMode: alwaysoverwrite
Source: "help\tssformfileoptions.jpg"; DestDir: "{app}\help\"; CopyMode:
alwaysoverwrite
Source: "help\ssformfileproperty.jpg"; DestDir: "{app}\help\"; CopyMode:
alwaysoverwrite
Source: "help\tssformfileproperty.jpg"; DestDir: "{app}\help\"; CopyMode:
alwaysoverwrite
Source: "help\ssformlistjpg.jpg"; DestDir: "{app}\help\"; CopyMode: alwaysoverwrite
Source: "help\tssformlistjpg.jpg"; DestDir: "{app}\help\"; CopyMode: alwaysoverwrite
Source: "help\ssformlistxxx.jpg"; DestDir: "{app}\help\"; CopyMode: alwaysoverwrite
Source: "help\tssformlistxxx.jpg"; DestDir: "{app}\help\"; CopyMode: alwaysoverwrite
Source: "help\ssformpassword.jpg"; DestDir: "{app}\help\"; CopyMode: alwaysoverwrite
Source: "help\tssformpassword.jpg"; DestDir: "{app}\help\"; CopyMode: alwaysoverwrite
Source: "help\zapper.jpg"; DestDir: "{app}\help\"; CopyMode: alwaysoverwrite

; License, Readme, Startup Files
Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme
Source: "License.txt"; DestDir: "{app}"; Flags: isreadme
Source: "Start.txt"; DestDir: "{app}"; Flags: isreadme

; Program Application Description Files - generated from PadGen (ASP)
Source: "pad_file.xml"; DestDir: "{app}"; CopyMode: alwaysoverwrite
Source: "pad_file.htm"; DestDir: "{app}"; CopyMode: alwaysoverwrite

[INI]
Filename: "{app}\JpegGuard.url"; Section: "InternetShortcut"; Key: "URL"; String:
"http://www.zappersoftware.com/"
Filename: "{app}\JpegGuardHelp.url"; Section: "InternetShortcut"; Key: "URL"; String:
"file:///{app}/help/index.html"

[Icons]
; NOTE: Ensure that you always include and set the WorkingDir.
; Filename is the "Target" parameter in your properties
; WorkingDir is the "Start In" parameter in your properties
; This is where the current directory will be set in your program at start up.
; When you call ShareGuard Lock from your program, the directory MUST be set
; to the application path where the EXEs and DLLs reside.
; WARNING: If your calling program changes directories prior to calling ShareGuard
; then you must reset the directory back to the application path BEFORE calling
; ShareGuard.
Name: "{group}\JpegGuard"; Filename: "{app}\ZSJPGD.exe"; WorkingDir: "{app}"
Name: "{group}\JpegGuard Help"; Filename: "{app}\JpegGuardHelp.url"
Name: "{group}\JpegGuard on the Web"; Filename: "{app}\JpegGuard.url"
Name: "{userdesktop}\JpegGuard"; Filename: "{app}\ZSJPGD.exe"; WorkingDir: "{app}";
MinVersion: 4,4; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\JpegGuard"; Filename:
"{app}\ZSJPGD.exe"; WorkingDir: "{app}"; MinVersion: 4,4; Tasks: quicklaunchicon

; If you are shipping the KeyGen (ShareGuard Lock) then remove the semi-colons
; Normally you will have a separate setup file for the ShareGuard Lock.
;Name: "{group}\JpegGuard Key"; Filename: "{app}\ZSSGK.exe"; WorkingDir: "{app}"
;Name: "{userdesktop}\JpegGuard Key"; Filename: "{app}\ZSSGK.exe"; WorkingDir: "{app}";
;MinVersion: 4,4; Tasks: desktopicon

[Registry]
; Start "Software\My Company\My Program" keys under HKEY_CURRENT_USER
; and HKEY_LOCAL_MACHINE. The flags tell it to always delete the
; "My Program" keys upon uninstall, and delete the "My Company" keys
; if there is nothing left in them.
Root: HKCU; Subkey: "Software\Zapper Software"; Flags: uninsdeletekeyifempty
Root: HKCU; Subkey: "Software\Zapper Software\JpegGuard"; Flags: uninsdeletekey
Root: HKCU; Subkey: "Software\Zapper Software\JpegGuard\Version"; ValueType: string;
ValueName: "VersionNo"; ValueData: "1.0"
Root: HKCU; Subkey: "Software\Zapper Software\JpegGuard\Options"; Flags: uninsdeletekey
Root: HKCU; Subkey: "Software\Zapper Software\JpegGuard\Options\Fonts"; Flags:
uninsdeletekey
Root: HKCU; Subkey: "Software\Zapper Software\JpegGuard\Options\Image"; Flags:
uninsdeletekey
Root: HKCU; Subkey: "Software\Zapper Software\JpegGuard\Windows"; Flags: uninsdeletekey
Root: HKCU; Subkey: "Software\Zapper Software\JpegGuard\Path"; Flags: uninsdeletekey
Root: HKCU; Subkey: "Software\Zapper Software\JpegGuard\Path"; ValueType: string;
ValueName: "CurrentDir"; ValueData: "{app}"
Root: HKCU; Subkey: "Software\Zapper Software\JpegGuard\Path"; ValueType: string;
ValueName: "InitialDir"; ValueData: "{app}"
Root: HKCU; Subkey: "Software\Zapper Software\JpegGuard\Path"; ValueType: string;
ValueName: "OpenDir"; ValueData: "{app}"
Root: HKCU; Subkey: "Software\Zapper Software\JpegGuard\Path"; ValueType: string;
ValueName: "SaveDir"; ValueData: "{app}"
Root: HKCU; Subkey: "Software\Zapper Software\JpegGuard\Path"; ValueType: string;
ValueName: "PathApp"; ValueData: "{app}"
Root: HKLM; Subkey: "Software\Zapper Software"; Flags: uninsdeletekeyifempty
Root: HKLM; Subkey: "Software\Zapper Software\JpegGuard"; Flags: uninsdeletekey
Root: HKLM; Subkey: "Software\Zapper Software\JpegGuard\Version"; ValueType: string;
ValueName: "VersionNo"; ValueData: "1.0"

; Associate a File Extension with JpegGuard Application
Root: HKCR; Subkey: ".xxx"; ValueType: string; ValueName: ""; ValueData:
"JpegGuard.EncryptedJPEG"; Flags: uninsdeletekey
Root: HKCR; Subkey: ".xxx"; ValueType: string; ValueName: "Content Type"; ValueData:
"JpegGuard Encrypted JPEG File"; Flags: uninsdeletekey
Root: HKCR; Subkey: ".xxx\ShellNew"; ValueType: string; ValueName: "NullFile";
ValueData: ""; Flags: uninsdeletekey
Root: HKCR; Subkey: "JpegGuard.EncryptedJPEG"; ValueType: string; ValueName: "";
ValueData: "JpegGuard"; Flags: uninsdeletekey
Root: HKCR; Subkey: "JpegGuard.EncryptedJPEG\DefaultIcon"; ValueType: string;
ValueName: ""; ValueData: "{app}\ZSJPGD.EXE,0"
Root: HKCR; Subkey: "JpegGuard.EncryptedJPEG\shell\open\command"; ValueType: string;
ValueName: ""; ValueData: """{app}\ZSJPGD.EXE"" ""%1"""

[Run]
Filename: "{app}\ZSJPGD.exe"; Description: "Launch JpegGuard"; WorkingDir: "{app}";
Flags: nowait postinstall skipifsilent

[UninstallDelete]
Type: files; Name: "{app}\JpegGuard.url"
Type: files; Name: "{app}\JpegGuardHelp.url"


If you create any special filetypes in your application then please be sure to read this article and register your new filetype with FileExt.com

Written by William H. Bradshaw
Get The FREE Software:
Installation Summary:

- Download Setup Software

- Create setup file

- Compile setup file

- Compress setup.exe into setup.zip

Products and Services for Windows and IBM

Software Distributor

Copyright © 1995-2002 Zapper Software 510862 B.C. Ltd. All rights reserved. Privacy Policy
1