correct install on win8 and add uninstall

This commit is contained in:
Mario Fetka
2013-05-22 20:16:23 +02:00
parent 3262be2cfd
commit 4ef4306201
4 changed files with 45 additions and 48 deletions

View File

@@ -23,13 +23,13 @@ if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specif
Set $UninstallProgramOld32$ = $InstallDir32$ + "\" + $UninstallProg32$
if FileExists($UninstallProgramOld32$)
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall_old_32
Winbatch_uninstall_old_32 /WaitforProcessending "Au_.exe" /Timeoutseconds 100
sub_check_exitcode
endif
endif
if FileExists($UninstallProgram32$)
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall_32
Winbatch_uninstall_32 /WaitforProcessending "Au_.exe" /Timeoutseconds 100
sub_check_exitcode
endif
@@ -37,6 +37,9 @@ if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specif
Files_uninstall_32 /32Bit
comment "Cleanup registry"
Registry_uninstall /32Bit
comment "uninstall done now force Reboot"
ExitWindows /ImmediateReboot
endif
if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
@@ -52,13 +55,13 @@ if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system spe
Set $UninstallProgramOld64$ = $InstallDir64$ + "\" + $UninstallProg64$
if FileExists($UninstallProgramOld64$)
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall_old_64
Winbatch_uninstall_old_64 /WaitforProcessending "Au_.exe" /Timeoutseconds 10
sub_check_exitcode
endif
endif
if FileExists($UninstallProgram64$)
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall_64
Winbatch_uninstall_64 /WaitforProcessending "Au_.exe" /Timeoutseconds 100
sub_check_exitcode
endif
@@ -66,32 +69,19 @@ if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system spe
Files_uninstall_64 /64Bit
comment "Cleanup registry"
Registry_uninstall /64Bit
comment "uninstall done now force Reboot"
ExitWindows /ImmediateReboot
endif
comment "Delete program shortcuts"
LinkFolder_uninstall
[Winbatch_uninstall_old_32]
; 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
; "$UninstallProgramOld32$" /S
;
; === Inno Setup ========================================================================================
; "$UninstallProgramOld32$" /silent /norestart /SUPPRESSMSGBOXES /nocancel
"$UninstallProgramOld32$" /S
[Winbatch_uninstall_32]
; 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
; "$UninstallProgram32$" /S
;
; === Inno Setup ========================================================================================
; "$UninstallProgram32$" /silent /norestart /SUPPRESSMSGBOXES /nocancel
"$UninstallProgram32$" /S
[Files_uninstall_32]
; Example for recursively deleting the installation directory (don't forget the trailing backslash):
@@ -99,26 +89,10 @@ LinkFolder_uninstall
delete -sf "$InstallDir32$\"
[Winbatch_uninstall_old_64]
; 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
; "$UninstallProgramOld64$" /S
;
; === Inno Setup ========================================================================================
; "$UninstallProgramOld64$" /silent /norestart /SUPPRESSMSGBOXES /nocancel
"$UninstallProgramOld64$" /S
[Winbatch_uninstall_64]
; 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
; "$UninstallProgram64$" /S
;
; === Inno Setup ========================================================================================
; "$UninstallProgram64$" /silent /norestart /SUPPRESSMSGBOXES /nocancel
"$UninstallProgram64$" /S
[Files_uninstall_64]
; Example for recursively deleting the installation directory:

View File

@@ -25,6 +25,10 @@ DefVar $OLD_VERSION$
DefVar $OLD_CREATOR_TAG$
DefVar $OLD_RELEASE$
DefVar $MSVersion$
Set $MSVersion$ = GetMsVersionInfo
Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
@@ -48,8 +52,8 @@ Set $LogDir$ = "%SystemDrive%\tmp"
; no white space use '-' as a seperator
Set $MinimumSpace$ = "1 MB"
; the path were we find the product after the installation
Set $InstallDir32$ = "%ProgramFiles32Dir%\<path to the product>"
Set $InstallDir64$ = "%ProgramFiles64Dir%\<path to the product>"
Set $InstallDir32$ = "%ProgramFiles32Dir%\Dokan\DokanLibrary"
Set $InstallDir64$ = "%ProgramFiles32Dir%\Dokan\DokanLibrary"
; ----------------------------------------------------------------
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"
@@ -73,7 +77,11 @@ else
Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 32 Bit..."
comment "Start setup program"
ChangeDirectory "%SCRIPTPATH%"
Winbatch_install_32
if ( $MSVersion$ = "6.2" )
Winbatch_install_compat_32
else
Winbatch_install_32
endif
Sub_check_exitcode
comment "Copy files"
Files_install_32 /32Bit
@@ -87,7 +95,11 @@ else
Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 64 Bit..."
comment "Start setup program"
ChangeDirectory "%SCRIPTPATH%"
Winbatch_install_64
if ( $MSVersion$ = "6.2" )
Winbatch_install_compat_64
else
Winbatch_install_64
endif
Sub_check_exitcode
comment "Copy files"
Files_install_64 /64Bit
@@ -102,6 +114,12 @@ endif
[Winbatch_install_32]
"$InstallExe$" /S
[Winbatch_install_compat_32]
reg.exe Add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "$InstallExe$" /d "WIN7RTM"
"$InstallExe$" /S
reg.exe Delete "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "$InstallExe$" /f
[Files_install_32]
; copy the ini file to the InstallDir
copy "$IniCfgFile$" "$InstallDir32$"
@@ -113,6 +131,11 @@ copy "$IniCfgFile$" "$InstallDir32$"
[Winbatch_install_64]
"$InstallExe$" /S
[Winbatch_install_compat_64]
reg.exe Add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "$InstallExe$" /d "WIN7RTM"
"$InstallExe$" /S
reg.exe Delete "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "$InstallExe$" /f
[Files_install_64]
; copy the ini file to the InstallDir
copy "$IniCfgFile$" "$InstallDir64$"

View File

@@ -44,8 +44,8 @@ Set $LogDir$ = "%SystemDrive%\tmp"
; ----------------------------------------------------------------
; - Please edit the following values -
; ----------------------------------------------------------------
Set $InstallDir32$ = "%ProgramFiles32Dir%\<path to the product>"
Set $InstallDir64$ = "%ProgramFiles64Dir%\<path to the product>"
Set $InstallDir32$ = "%ProgramFiles32Dir%\Dokan\DokanLibrary"
Set $InstallDir64$ = "%ProgramFiles32Dir%\Dokan\DokanLibrary"
; ----------------------------------------------------------------
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"