correct install on win8 and add uninstall
This commit is contained in:
@@ -23,13 +23,13 @@ if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specif
|
|||||||
Set $UninstallProgramOld32$ = $InstallDir32$ + "\" + $UninstallProg32$
|
Set $UninstallProgramOld32$ = $InstallDir32$ + "\" + $UninstallProg32$
|
||||||
if FileExists($UninstallProgramOld32$)
|
if FileExists($UninstallProgramOld32$)
|
||||||
comment "Uninstall program found, starting uninstall"
|
comment "Uninstall program found, starting uninstall"
|
||||||
Winbatch_uninstall_old_32
|
Winbatch_uninstall_old_32 /WaitforProcessending "Au_.exe" /Timeoutseconds 100
|
||||||
sub_check_exitcode
|
sub_check_exitcode
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
if FileExists($UninstallProgram32$)
|
if FileExists($UninstallProgram32$)
|
||||||
comment "Uninstall program found, starting uninstall"
|
comment "Uninstall program found, starting uninstall"
|
||||||
Winbatch_uninstall_32
|
Winbatch_uninstall_32 /WaitforProcessending "Au_.exe" /Timeoutseconds 100
|
||||||
sub_check_exitcode
|
sub_check_exitcode
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -37,6 +37,9 @@ if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specif
|
|||||||
Files_uninstall_32 /32Bit
|
Files_uninstall_32 /32Bit
|
||||||
comment "Cleanup registry"
|
comment "Cleanup registry"
|
||||||
Registry_uninstall /32Bit
|
Registry_uninstall /32Bit
|
||||||
|
|
||||||
|
comment "uninstall done now force Reboot"
|
||||||
|
ExitWindows /ImmediateReboot
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
|
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$
|
Set $UninstallProgramOld64$ = $InstallDir64$ + "\" + $UninstallProg64$
|
||||||
if FileExists($UninstallProgramOld64$)
|
if FileExists($UninstallProgramOld64$)
|
||||||
comment "Uninstall program found, starting uninstall"
|
comment "Uninstall program found, starting uninstall"
|
||||||
Winbatch_uninstall_old_64
|
Winbatch_uninstall_old_64 /WaitforProcessending "Au_.exe" /Timeoutseconds 10
|
||||||
sub_check_exitcode
|
sub_check_exitcode
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
if FileExists($UninstallProgram64$)
|
if FileExists($UninstallProgram64$)
|
||||||
comment "Uninstall program found, starting uninstall"
|
comment "Uninstall program found, starting uninstall"
|
||||||
Winbatch_uninstall_64
|
Winbatch_uninstall_64 /WaitforProcessending "Au_.exe" /Timeoutseconds 100
|
||||||
sub_check_exitcode
|
sub_check_exitcode
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -66,32 +69,19 @@ if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system spe
|
|||||||
Files_uninstall_64 /64Bit
|
Files_uninstall_64 /64Bit
|
||||||
comment "Cleanup registry"
|
comment "Cleanup registry"
|
||||||
Registry_uninstall /64Bit
|
Registry_uninstall /64Bit
|
||||||
|
|
||||||
|
comment "uninstall done now force Reboot"
|
||||||
|
ExitWindows /ImmediateReboot
|
||||||
endif
|
endif
|
||||||
|
|
||||||
comment "Delete program shortcuts"
|
comment "Delete program shortcuts"
|
||||||
LinkFolder_uninstall
|
LinkFolder_uninstall
|
||||||
|
|
||||||
[Winbatch_uninstall_old_32]
|
[Winbatch_uninstall_old_32]
|
||||||
; Choose one of the following examples as basis for program uninstall
|
"$UninstallProgramOld32$" /S
|
||||||
;
|
|
||||||
; === Nullsoft Scriptable Install System ================================================================
|
|
||||||
; maby better Call as
|
|
||||||
; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10
|
|
||||||
; "$UninstallProgramOld32$" /S
|
|
||||||
;
|
|
||||||
; === Inno Setup ========================================================================================
|
|
||||||
; "$UninstallProgramOld32$" /silent /norestart /SUPPRESSMSGBOXES /nocancel
|
|
||||||
|
|
||||||
[Winbatch_uninstall_32]
|
[Winbatch_uninstall_32]
|
||||||
; Choose one of the following examples as basis for program uninstall
|
"$UninstallProgram32$" /S
|
||||||
;
|
|
||||||
; === Nullsoft Scriptable Install System ================================================================
|
|
||||||
; maby better Call as
|
|
||||||
; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10
|
|
||||||
; "$UninstallProgram32$" /S
|
|
||||||
;
|
|
||||||
; === Inno Setup ========================================================================================
|
|
||||||
; "$UninstallProgram32$" /silent /norestart /SUPPRESSMSGBOXES /nocancel
|
|
||||||
|
|
||||||
[Files_uninstall_32]
|
[Files_uninstall_32]
|
||||||
; Example for recursively deleting the installation directory (don't forget the trailing backslash):
|
; Example for recursively deleting the installation directory (don't forget the trailing backslash):
|
||||||
@@ -99,26 +89,10 @@ LinkFolder_uninstall
|
|||||||
delete -sf "$InstallDir32$\"
|
delete -sf "$InstallDir32$\"
|
||||||
|
|
||||||
[Winbatch_uninstall_old_64]
|
[Winbatch_uninstall_old_64]
|
||||||
; Choose one of the following examples as basis for program uninstall
|
"$UninstallProgramOld64$" /S
|
||||||
;
|
|
||||||
; === Nullsoft Scriptable Install System ================================================================
|
|
||||||
; maby better Call as
|
|
||||||
; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10
|
|
||||||
; "$UninstallProgramOld64$" /S
|
|
||||||
;
|
|
||||||
; === Inno Setup ========================================================================================
|
|
||||||
; "$UninstallProgramOld64$" /silent /norestart /SUPPRESSMSGBOXES /nocancel
|
|
||||||
|
|
||||||
[Winbatch_uninstall_64]
|
[Winbatch_uninstall_64]
|
||||||
; Choose one of the following examples as basis for program uninstall
|
"$UninstallProgram64$" /S
|
||||||
;
|
|
||||||
; === Nullsoft Scriptable Install System ================================================================
|
|
||||||
; maby better Call as
|
|
||||||
; Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10
|
|
||||||
; "$UninstallProgram64$" /S
|
|
||||||
;
|
|
||||||
; === Inno Setup ========================================================================================
|
|
||||||
; "$UninstallProgram64$" /silent /norestart /SUPPRESSMSGBOXES /nocancel
|
|
||||||
|
|
||||||
[Files_uninstall_64]
|
[Files_uninstall_64]
|
||||||
; Example for recursively deleting the installation directory:
|
; Example for recursively deleting the installation directory:
|
||||||
|
|||||||
@@ -25,6 +25,10 @@ DefVar $OLD_VERSION$
|
|||||||
DefVar $OLD_CREATOR_TAG$
|
DefVar $OLD_CREATOR_TAG$
|
||||||
DefVar $OLD_RELEASE$
|
DefVar $OLD_RELEASE$
|
||||||
|
|
||||||
|
DefVar $MSVersion$
|
||||||
|
Set $MSVersion$ = GetMsVersionInfo
|
||||||
|
|
||||||
|
|
||||||
Set $INST_SystemType$ = GetSystemType
|
Set $INST_SystemType$ = GetSystemType
|
||||||
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
|
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
|
||||||
|
|
||||||
@@ -48,8 +52,8 @@ Set $LogDir$ = "%SystemDrive%\tmp"
|
|||||||
; no white space use '-' as a seperator
|
; no white space use '-' as a seperator
|
||||||
Set $MinimumSpace$ = "1 MB"
|
Set $MinimumSpace$ = "1 MB"
|
||||||
; the path were we find the product after the installation
|
; the path were we find the product after the installation
|
||||||
Set $InstallDir32$ = "%ProgramFiles32Dir%\<path to the product>"
|
Set $InstallDir32$ = "%ProgramFiles32Dir%\Dokan\DokanLibrary"
|
||||||
Set $InstallDir64$ = "%ProgramFiles64Dir%\<path to the product>"
|
Set $InstallDir64$ = "%ProgramFiles32Dir%\Dokan\DokanLibrary"
|
||||||
; ----------------------------------------------------------------
|
; ----------------------------------------------------------------
|
||||||
|
|
||||||
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"
|
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"
|
||||||
@@ -73,7 +77,11 @@ else
|
|||||||
Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 32 Bit..."
|
Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 32 Bit..."
|
||||||
comment "Start setup program"
|
comment "Start setup program"
|
||||||
ChangeDirectory "%SCRIPTPATH%"
|
ChangeDirectory "%SCRIPTPATH%"
|
||||||
Winbatch_install_32
|
if ( $MSVersion$ = "6.2" )
|
||||||
|
Winbatch_install_compat_32
|
||||||
|
else
|
||||||
|
Winbatch_install_32
|
||||||
|
endif
|
||||||
Sub_check_exitcode
|
Sub_check_exitcode
|
||||||
comment "Copy files"
|
comment "Copy files"
|
||||||
Files_install_32 /32Bit
|
Files_install_32 /32Bit
|
||||||
@@ -87,7 +95,11 @@ else
|
|||||||
Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 64 Bit..."
|
Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 64 Bit..."
|
||||||
comment "Start setup program"
|
comment "Start setup program"
|
||||||
ChangeDirectory "%SCRIPTPATH%"
|
ChangeDirectory "%SCRIPTPATH%"
|
||||||
Winbatch_install_64
|
if ( $MSVersion$ = "6.2" )
|
||||||
|
Winbatch_install_compat_64
|
||||||
|
else
|
||||||
|
Winbatch_install_64
|
||||||
|
endif
|
||||||
Sub_check_exitcode
|
Sub_check_exitcode
|
||||||
comment "Copy files"
|
comment "Copy files"
|
||||||
Files_install_64 /64Bit
|
Files_install_64 /64Bit
|
||||||
@@ -102,6 +114,12 @@ endif
|
|||||||
[Winbatch_install_32]
|
[Winbatch_install_32]
|
||||||
"$InstallExe$" /S
|
"$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]
|
[Files_install_32]
|
||||||
; copy the ini file to the InstallDir
|
; copy the ini file to the InstallDir
|
||||||
copy "$IniCfgFile$" "$InstallDir32$"
|
copy "$IniCfgFile$" "$InstallDir32$"
|
||||||
@@ -113,6 +131,11 @@ copy "$IniCfgFile$" "$InstallDir32$"
|
|||||||
[Winbatch_install_64]
|
[Winbatch_install_64]
|
||||||
"$InstallExe$" /S
|
"$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]
|
[Files_install_64]
|
||||||
; copy the ini file to the InstallDir
|
; copy the ini file to the InstallDir
|
||||||
copy "$IniCfgFile$" "$InstallDir64$"
|
copy "$IniCfgFile$" "$InstallDir64$"
|
||||||
|
|||||||
@@ -44,8 +44,8 @@ Set $LogDir$ = "%SystemDrive%\tmp"
|
|||||||
; ----------------------------------------------------------------
|
; ----------------------------------------------------------------
|
||||||
; - Please edit the following values -
|
; - Please edit the following values -
|
||||||
; ----------------------------------------------------------------
|
; ----------------------------------------------------------------
|
||||||
Set $InstallDir32$ = "%ProgramFiles32Dir%\<path to the product>"
|
Set $InstallDir32$ = "%ProgramFiles32Dir%\Dokan\DokanLibrary"
|
||||||
Set $InstallDir64$ = "%ProgramFiles64Dir%\<path to the product>"
|
Set $InstallDir64$ = "%ProgramFiles32Dir%\Dokan\DokanLibrary"
|
||||||
; ----------------------------------------------------------------
|
; ----------------------------------------------------------------
|
||||||
|
|
||||||
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"
|
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ ICON_DL_INDEX=0
|
|||||||
|
|
||||||
OPSI_INI_SECTION[0]="X86"
|
OPSI_INI_SECTION[0]="X86"
|
||||||
OPSI_INI_OPTION[0]="UninstallProg32"
|
OPSI_INI_OPTION[0]="UninstallProg32"
|
||||||
OPSI_INI_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}"
|
OPSI_INI_VALUE[0]="DokanUninstall.exe"
|
||||||
|
|
||||||
OPSI_INI_SECTION[1]="X86_64"
|
OPSI_INI_SECTION[1]="X86_64"
|
||||||
OPSI_INI_OPTION[1]="UninstallProg64"
|
OPSI_INI_OPTION[1]="UninstallProg64"
|
||||||
OPSI_INI_VALUE[1]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}"
|
OPSI_INI_VALUE[1]="DokanUninstall.exe"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user