change to nirsoft zipinstall for this tool

This commit is contained in:
Mario Fetka
2013-08-21 10:10:13 +02:00
parent 837ae2a56e
commit 30c893e63c
8 changed files with 128 additions and 31 deletions

View File

@@ -19,13 +19,13 @@ if FileExists($IniFile$)
Set $UninstallProgramOld$ = $InstallDir$ + "\" + $UninstallProg$
if FileExists($UninstallProgramOld$)
comment "Uninstall program found, starting uninstall"
Files_uninstall
Winbatch_uninstall_old
sub_check_exitcode
endif
endif
if FileExists($UninstallProgram$)
comment "Uninstall program found, starting uninstall"
Files_uninstall
Winbatch_uninstall
sub_check_exitcode
endif
@@ -38,6 +38,30 @@ Registry_uninstall /32Bit
comment "Delete program shortcuts"
LinkFolder_uninstall
[Winbatch_uninstall_old]
; Choose one of the following examples as basis for program uninstall
;
; === Nullsoft Scriptable Install System ================================================================
; maby better Call as
; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10
; "$UninstallProgramOld$" /S
;
; === Inno Setup ========================================================================================
; "$UninstallProgramOld$" /silent /norestart /SUPPRESSMSGBOXES /nocancel
[Winbatch_uninstall]
; Choose one of the following examples as basis for program uninstall
;
; === Nullsoft Scriptable Install System ================================================================
; maby better Call as
; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10
; "$UninstallProgram$" /S
;
; === Inno Setup ========================================================================================
; "$UninstallProgram$" /silent /norestart /SUPPRESSMSGBOXES /nocancel
[Files_uninstall]
; Example for recursively deleting the installation directory:
;
@@ -49,11 +73,16 @@ del -sf "$InstallDir$\"
; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$]
[LinkFolder_uninstall]
set_basefolder common_programs
delete_subfolder $ProductId$
set_basefolder common_programs
delete_subfolder Melk
; Example of deleting a folder from AllUsers startmenu:
;
; set_basefolder common_programs
; delete_subfolder $ProductId$
;
; Example of deleting a shortcut from AllUsers desktop:
;
; set_basefolder common_desktopdirectory
; set_subfolder ""
; delete_element $ProductId$
[Sub_check_exitcode]
comment "Test for installation success via exit code"

View File

@@ -3,3 +3,20 @@
[COMMON]
PN=name
VERSION=version
[install]
AddUninstall=1
AddUninstallShortcut=1
DesktopShortcut=1
InstallTo=2
StartMenuShortcut=1
NoUserInteraction=1
InstallFolder=%zi.ProgramFiles%\%zi.ProductName%
StartMenuFolder=%zi.CompanyName%\%zi.ProductName%
ProductName=CapsLock Goodbye
ProductVersion=2.0
CompanyName=Melk
Description=Umbelegung der CapsLock-Tastenfunktion
NoExtraUninstallInfo=0
NoSuccessMessage=1
UninstallInDestFolder=1

View File

@@ -37,9 +37,9 @@ Set $LogDir$ = "%SystemDrive%\tmp"
;$ProductId$ should be the name of the product in opsi
; therefore please: only lower letters, no umlauts,
; no white space use '-' as a seperator
Set $MinimumSpace$ = "1 MB"
Set $MinimumSpace$ = "4 MB"
; the path were we find the product after the installation
Set $InstallDir$ = "%ProgramFiles32Dir%\CapsLockGoodbye"
Set $InstallDir$ = "%ProgramFiles32Dir%\Melk\CapsLock Goodbye"
; ----------------------------------------------------------------
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"
@@ -61,6 +61,8 @@ else
comment "Start setup program"
ChangeDirectory "%SCRIPTPATH%"
Winbatch_install
Sub_check_exitcode
comment "Copy files"
Files_install /32Bit
@@ -73,11 +75,16 @@ else
endif
[Winbatch_install]
zipinst /i $Install32Zip$
[Files_install]
; copy the ini file to the InstallDir
copy "$IniCfgFile$" "$InstallDir$"
copy -s "$InstallExe$" "$InstallDir$"
; Example of recursively copying some files into the installation directory:
;
; copy -s "%ScriptPath%\files\*.*" "$InstallDir$"
[Registry_install]
; Example of setting some values of an registry key:
@@ -88,20 +95,38 @@ copy -s "$InstallExe$" "$InstallDir$"
; set "name3" = REG_BINARY:00 af 99 cd
[LinkFolder_install]
set_basefolder common_programs
delete_subfolder $ProductId$
set_basefolder common_programs
set_subfolder Melk
set_link
name: $NAME$
target: $InstallDir$\capslockgoodbye.exe
parameters:
working_dir: $InstallDir$
icon_file: $InstallDir$\capslockgoodbye.exe
icon_index: 0
end_link
; Example of deleting a folder from AllUsers startmenu:
;
; set_basefolder common_programs
; delete_subfolder $ProductId$
;
; Example of creating an shortcut to the installed exe in AllUsers startmenu:
;
; set_basefolder common_programs
; set_subfolder $ProductId$
;
; set_link
; name: $ProductId$
; target: <path to the program>
; parameters:
; working_dir: $InstallDir$
; icon_file:
; icon_index:
; end_link
;
; Example of creating an shortcut to the installed exe on AllUsers desktop:
;
; set_basefolder common_desktopdirectory
; set_subfolder ""
;
; set_link
; name: $ProductId$
; target: <path to the program>
; parameters: <some_param>
; working_dir: $InstallDir$
; icon_file: <path to icon file>
; icon_index: 2
; end_link
[Sub_check_exitcode]
comment "Test for installation success via exit code"

View File

@@ -33,7 +33,7 @@ Set $LogDir$ = "%SystemDrive%\tmp"
; ----------------------------------------------------------------
; - Please edit the following values -
; ----------------------------------------------------------------
Set $InstallDir$ = "%ProgramFiles32Dir%\CapsLockGoodbye"
Set $InstallDir$ = "%ProgramFiles32Dir%\Melk\CapsLock Goodbye"
; ----------------------------------------------------------------
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"