redesign the pack integrate the mirror driver better into the package with its own winbatch section
This commit is contained in:
parent
3e5ac52a49
commit
4367b63687
|
@ -136,3 +136,12 @@ DefVar $server_viewonlypassword_set$
|
|||
Set $server_viewonlypassword_set$ = GetProductProperty("server_viewonlypassword_set", "0")
|
||||
DefVar $server_viewonlypassword_value_of$
|
||||
Set $server_viewonlypassword_value_of$ = GetProductProperty("server_viewonlypassword_value_of", "")
|
||||
|
||||
[DosInAnIcon_stop_server]
|
||||
net stop tvnserver
|
||||
ping 127.0.0.1 -n 5 >nul
|
||||
taskkill /F /IM tvnserver.exe
|
||||
ping 127.0.0.1 -n 5 >nul
|
||||
|
||||
[DosInAnIcon_start_server]
|
||||
net start tvnserver
|
||||
|
|
|
@ -4,16 +4,12 @@
|
|||
; credits: http://www.opsi.org/en/credits/
|
||||
|
||||
|
||||
Set $UninstallProgram32$ = $InstallDirMirage32$ + "\" + $UninstallProg32$
|
||||
Set $IniFile32$ = $InstallDir32$ + "\opsi-" + $ProductId$ + ".ini"
|
||||
|
||||
Set $UninstallProgram64$ = $InstallDirMirage64$ + "\" + $UninstallProg64$
|
||||
Set $IniFile64$ = $InstallDir64$ + "\opsi-" + $ProductId$ + ".ini"
|
||||
|
||||
; comment stop TightVNC server
|
||||
DosInAnIcon_stop_server
|
||||
|
||||
if (FileExists("%ProgramFiles32Dir%\DemoForge\Mirage Driver for TightVNC\unins000.exe")) OR (FileExists("%ProgramFiles64Dir%\DemoForge\Mirage Driver for TightVNC\unins000.exe"))
|
||||
set $Reboot$="1"
|
||||
endif
|
||||
|
||||
if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
|
||||
if FileExists($IniFile32$)
|
||||
|
@ -23,6 +19,21 @@ if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specif
|
|||
endif
|
||||
Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 32 Bit..."
|
||||
|
||||
if FileExists($IniFile32$)
|
||||
Set $UninstallProg32$ = GetValueFromInifile($IniFile$,"X86","UninstallProg32","XXXXXXXX.exe")
|
||||
Set $UninstallProgramOld32$ = $InstallDirMirage32$ + "\" + $UninstallProg32$
|
||||
if FileExists($UninstallProgramOld32$)
|
||||
comment "Uninstall program found, starting uninstall"
|
||||
Winbatch_uninstall_old_32
|
||||
sub_check_exitcode
|
||||
endif
|
||||
endif
|
||||
if FileExists($UninstallProgram32$)
|
||||
comment "Uninstall program found, starting uninstall"
|
||||
Winbatch_uninstall_32
|
||||
sub_check_exitcode
|
||||
endif
|
||||
|
||||
if FileExists($IniFile32$)
|
||||
Set $MsiIdOld32$ = GetValueFromInifile($IniFile32$,"X86","MsiId32","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}")
|
||||
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld32$ + "] DisplayName") = "")
|
||||
|
@ -31,6 +42,7 @@ if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specif
|
|||
sub_check_exitcode
|
||||
endif
|
||||
endif
|
||||
|
||||
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId32$ + "] DisplayName") = "")
|
||||
comment "MSI id " + $MsiId32$ + " found in registry, starting msiexec to uninstall"
|
||||
Winbatch_uninstall_msi_32
|
||||
|
@ -51,6 +63,21 @@ if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system spe
|
|||
endif
|
||||
Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 64 Bit..."
|
||||
|
||||
if FileExists($IniFile64$)
|
||||
Set $UninstallProg64$ = GetValueFromInifile($IniFile$,"X86_64","UninstallProg64","XXXXXXXX.exe")
|
||||
Set $UninstallProgramOld64$ = $InstallDirMirage64$ + "\" + $UninstallProg64$
|
||||
if FileExists($UninstallProgramOld64$)
|
||||
comment "Uninstall program found, starting uninstall"
|
||||
Winbatch_uninstall_old_64
|
||||
sub_check_exitcode
|
||||
endif
|
||||
endif
|
||||
if FileExists($UninstallProgram64$)
|
||||
comment "Uninstall program found, starting uninstall"
|
||||
Winbatch_uninstall_64
|
||||
sub_check_exitcode
|
||||
endif
|
||||
|
||||
if FileExists($IniFile64$)
|
||||
Set $MsiIdOld64$ = GetValueFromInifile($IniFile64$,"X86_64","MsiId64","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}")
|
||||
if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld64$ + "] DisplayName") = "")
|
||||
|
@ -59,6 +86,7 @@ if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system spe
|
|||
sub_check_exitcode
|
||||
endif
|
||||
endif
|
||||
|
||||
if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId64$ + "] DisplayName") = "")
|
||||
comment "MSI id " + $MsiId64$ + " found in registry, starting msiexec to uninstall"
|
||||
Winbatch_uninstall_msi_64
|
||||
|
@ -74,46 +102,55 @@ endif
|
|||
comment "Delete program shortcuts"
|
||||
LinkFolder_uninstall
|
||||
|
||||
if $Reboot$="1"
|
||||
ExitWindows /ImmediateReboot
|
||||
endif
|
||||
[Winbatch_uninstall_old_32]
|
||||
; === Inno Setup ========================================================================================
|
||||
; "$UninstallProgramOld32$" /silent /norestart /SUPPRESSMSGBOXES /nocancel
|
||||
"$UninstallProgramOld32$"
|
||||
|
||||
[Winbatch_uninstall_32]
|
||||
; === Inno Setup ========================================================================================
|
||||
; "$UninstallProgram32$" /silent /norestart /SUPPRESSMSGBOXES /nocancel
|
||||
"$UninstallProgram32$"
|
||||
|
||||
[DosInAnIcon_stop_server]
|
||||
net stop tvnserver
|
||||
ping 127.0.0.1 -n 5 >nul
|
||||
taskkill /F /IM tvnserver.exe
|
||||
ping 127.0.0.1 -n 5 >nul
|
||||
|
||||
[Winbatch_uninstall_msi_old_32]
|
||||
"%ProgramFiles32Dir%\DemoForge\Mirage Driver for TightVNC\unins000.exe" /silent /norestart /SUPPRESSMSGBOXES /nocancel
|
||||
msiexec /x $MsiIdOld32$ /qb! REBOOT=ReallySuppress
|
||||
|
||||
[Winbatch_uninstall_msi_32]
|
||||
"%ProgramFiles32Dir%\DemoForge\Mirage Driver for TightVNC\unins000.exe" /silent /norestart /SUPPRESSMSGBOXES /nocancel
|
||||
msiexec /x $MsiId32$ /qb! REBOOT=ReallySuppress
|
||||
|
||||
[Files_uninstall_32]
|
||||
; Example for recursively deleting the installation directory (don't forget the trailing backslash):
|
||||
;
|
||||
delete -sf "$InstallDir32$\"
|
||||
delete -sf "$InstallDirMirage32$\"
|
||||
|
||||
[Winbatch_uninstall_old_64]
|
||||
; === Inno Setup ========================================================================================
|
||||
; "$UninstallProgramOld64$" /silent /norestart /SUPPRESSMSGBOXES /nocancel
|
||||
"$UninstallProgramOld64$"
|
||||
|
||||
[Winbatch_uninstall_64]
|
||||
; === Inno Setup ========================================================================================
|
||||
; "$UninstallProgram64$" /silent /norestart /SUPPRESSMSGBOXES /nocancel
|
||||
"$UninstallProgram64$"
|
||||
|
||||
[Winbatch_uninstall_msi_old_64]
|
||||
"%ProgramFiles64Dir%\DemoForge\Mirage Driver for TightVNC\unins000.exe" /silent
|
||||
msiexec /x $MsiIdOld64$ /qb! REBOOT=ReallySuppress
|
||||
|
||||
[Winbatch_uninstall_msi_64]
|
||||
"%ProgramFiles64Dir%\DemoForge\Mirage Driver for TightVNC\unins000.exe" /silent
|
||||
msiexec /x $MsiId64$ /qb! REBOOT=ReallySuppress
|
||||
|
||||
[Files_uninstall_64]
|
||||
; Example for recursively deleting the installation directory:
|
||||
;
|
||||
del -sf "$InstallDir64$\"
|
||||
del -sf "$InstallDirMirage64$\"
|
||||
|
||||
[Registry_uninstall]
|
||||
; Example of deleting a registry key:
|
||||
;
|
||||
deletekey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
|
||||
; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$]
|
||||
|
||||
[LinkFolder_uninstall]
|
||||
; Example of deleting a folder from AllUsers startmenu:
|
||||
|
|
Binary file not shown.
|
@ -7,8 +7,12 @@
|
|||
requiredWinstVersion >= "4.11.2.6"
|
||||
|
||||
DefVar $MsiIdOld32$
|
||||
DefVar $UninstallProgram32$
|
||||
DefVar $UninstallProgramOld32$
|
||||
DefVar $IniFile32$
|
||||
DefVar $MsiIdOld64$
|
||||
DefVar $UninstallProgram64$
|
||||
DefVar $UninstallProgramOld64$
|
||||
DefVar $IniFile64$
|
||||
DefVar $IniCfgFile$
|
||||
DefVar $LogDir$
|
||||
|
@ -23,8 +27,6 @@ DefVar $OLD_VERSION$
|
|||
DefVar $OLD_CREATOR_TAG$
|
||||
DefVar $OLD_RELEASE$
|
||||
|
||||
DefVar $Reboot$
|
||||
|
||||
Set $INST_SystemType$ = GetSystemType
|
||||
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
|
||||
|
||||
|
@ -52,6 +54,8 @@ Set $MinimumSpace$ = "1 MB"
|
|||
; the path were we find the product after the installation
|
||||
Set $InstallDir32$ = "%ProgramFiles32Dir%\TightVNC"
|
||||
Set $InstallDir64$ = "%ProgramFiles64Dir%\TightVNC"
|
||||
Set $InstallDirMirage32$ = "%ProgramFiles32Dir%\DemoForge\Mirage Driver for TightVNC"
|
||||
Set $InstallDirMirage64$ = "%ProgramFiles64Dir%\DemoForge\Mirage Driver for TightVNC"
|
||||
; ----------------------------------------------------------------
|
||||
|
||||
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"
|
||||
|
@ -63,27 +67,30 @@ if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
|
|||
else
|
||||
comment "Show product picture"
|
||||
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$
|
||||
|
||||
|
||||
comment "Stop TightVNC Server"
|
||||
DosInAnIcon_stop_server
|
||||
|
||||
if FileExists("%ScriptPath%\delsub3264.ins")
|
||||
comment "Start uninstall sub section"
|
||||
Sub "%ScriptPath%\delsub3264.ins"
|
||||
endif
|
||||
|
||||
|
||||
if FileExists("%ScriptPath%\passwd3264.ins")
|
||||
comment "Start set passwords section"
|
||||
Sub "%ScriptPath%\passwd3264.ins"
|
||||
endif
|
||||
|
||||
|
||||
comment "installing"
|
||||
|
||||
if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
|
||||
Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 32 Bit..."
|
||||
comment "Start setup program"
|
||||
ChangeDirectory "%SCRIPTPATH%"
|
||||
Winbatch_install_Mirage_32
|
||||
Sub_check_exitcode
|
||||
Winbatch_install_32
|
||||
Sub_check_exitcode
|
||||
DosInAnIcon_stop_server
|
||||
Winbatch_install_DemoForge
|
||||
comment "Copy files"
|
||||
Files_install_32 /32Bit
|
||||
comment "Patch Registry"
|
||||
|
@ -93,13 +100,13 @@ else
|
|||
endif
|
||||
|
||||
if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
|
||||
Message "Installing " + $ProductId$ + " " + $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 64 Bit..."
|
||||
Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 64 Bit..."
|
||||
comment "Start setup program"
|
||||
ChangeDirectory "%SCRIPTPATH%"
|
||||
Winbatch_install_Mirage_64
|
||||
Sub_check_exitcode
|
||||
Winbatch_install_64
|
||||
Sub_check_exitcode
|
||||
DosInAnIcon_stop_server
|
||||
Winbatch_install_DemoForge
|
||||
comment "Copy files"
|
||||
Files_install_64 /64Bit
|
||||
comment "Patch Registry"
|
||||
|
@ -107,33 +114,22 @@ else
|
|||
comment "Create shortcuts"
|
||||
LinkFolder_install
|
||||
endif
|
||||
|
||||
|
||||
if FileExists("%ScriptPath%\config3264.ins")
|
||||
comment "Start set config section"
|
||||
Sub "%ScriptPath%\config3264.ins"
|
||||
endif
|
||||
|
||||
comment "Reboot"
|
||||
; ExitWindows /Reboot
|
||||
DosInAnIcon_start_server
|
||||
comment "Start TightVNC Server"
|
||||
DosInAnIcon_start_server
|
||||
endif
|
||||
|
||||
[Winbatch_install_DemoForge]
|
||||
"$InstallExe$" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES
|
||||
set $ExitCode$ = "0"
|
||||
|
||||
[DosInAnIcon_start_server]
|
||||
net start tvnserver
|
||||
|
||||
[DosInAnIcon_stop_server]
|
||||
net stop tvnserver
|
||||
ping 127.0.0.1 -n 5 >nul
|
||||
taskkill /F /IM tvnserver.exe
|
||||
ping 127.0.0.1 -n 5 >nul
|
||||
|
||||
[Winbatch_install_32]
|
||||
msiexec /i "$Install32Msi$" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress ADDLOCAL=Server SERVER_REGISTER_AS_SERVICE=$server_register_as_service$ SERVER_ADD_FIREWALL_EXCEPTION=$server_add_firewall_exception$ SERVER_ALLOW_SAS=$server_allow_sas$ SET_CONTROLPASSWORD=$server_controlpassword_set$ VALUE_OF_CONTROLPASSWORD=$server_controlpassword_value_of$ SET_PASSWORD=$server_password_set$ VALUE_OF_PASSWORD=$server_password_value_of$ SET_VIEWONLYPASSWORD=$server_viewonlypassword_set$ VALUE_OF_VIEWONLYPASSWORD=$server_viewonlypassword_value_of$
|
||||
|
||||
[Winbatch_install_Mirage_32]
|
||||
"$InstallExe$" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES
|
||||
|
||||
[Files_install_32]
|
||||
; copy the ini file to the InstallDir
|
||||
copy "$IniCfgFile$" "$InstallDir32$"
|
||||
|
@ -141,10 +137,14 @@ copy "$IniCfgFile$" "$InstallDir32$"
|
|||
; Example of recursively copying some files into the installation directory:
|
||||
;
|
||||
; copy -s "%ScriptPath%\files\*.*" "$InstallDir32$"
|
||||
copy "%ScriptPath%\mirage_uninstall.exe" "$InstallDirMirage32$"
|
||||
|
||||
[Winbatch_install_64]
|
||||
msiexec /i "$Install64Msi$" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress ADDLOCAL=Server SERVER_REGISTER_AS_SERVICE=$server_register_as_service$ SERVER_ADD_FIREWALL_EXCEPTION=$server_add_firewall_exception$ SERVER_ALLOW_SAS=$server_allow_sas$ SET_CONTROLPASSWORD=$server_controlpassword_set$ VALUE_OF_CONTROLPASSWORD=$server_controlpassword_value_of$ SET_PASSWORD=$server_password_set$ VALUE_OF_PASSWORD=$server_password_value_of$ SET_VIEWONLYPASSWORD=$server_viewonlypassword_set$ VALUE_OF_VIEWONLYPASSWORD=$server_viewonlypassword_value_of$
|
||||
|
||||
[Winbatch_install_Mirage_64]
|
||||
"$InstallExe$" /sp- /silent /norestart /nocancel /SUPPRESSMSGBOXES
|
||||
|
||||
[Files_install_64]
|
||||
; copy the ini file to the InstallDir
|
||||
copy "$IniCfgFile$" "$InstallDir64$"
|
||||
|
@ -152,16 +152,17 @@ copy "$IniCfgFile$" "$InstallDir64$"
|
|||
; Example of recursively copying some files into the installation directory:
|
||||
;
|
||||
; copy -s "%ScriptPath%\files\*.*" "$InstallDir64$"
|
||||
copy "%ScriptPath%\mirage_uninstall.exe" "$InstallDirMirage64$"
|
||||
|
||||
|
||||
[Registry_install]
|
||||
; Example of setting some values of an registry key:
|
||||
;
|
||||
; openkey [HKEY_LOCAL_MACHINE\Software\TightVNC\Server]
|
||||
; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$]
|
||||
; set "name1" = "some string value"
|
||||
; set "name2" = REG_DWORD:0001
|
||||
; set "name3" = REG_BINARY:00 af 99 cd
|
||||
|
||||
|
||||
[LinkFolder_install]
|
||||
; Example of deleting a folder from AllUsers startmenu:
|
||||
;
|
||||
|
@ -225,5 +226,3 @@ else
|
|||
endif
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -7,8 +7,12 @@
|
|||
requiredWinstVersion >= "4.11.2.6"
|
||||
|
||||
DefVar $MsiIdOld32$
|
||||
DefVar $UninstallProgram32$
|
||||
DefVar $UninstallProgramOld32$
|
||||
DefVar $IniFile32$
|
||||
DefVar $MsiIdOld64$
|
||||
DefVar $UninstallProgram64$
|
||||
DefVar $UninstallProgramOld64$
|
||||
DefVar $IniFile64$
|
||||
DefVar $IniCfgFile$
|
||||
DefVar $LogDir$
|
||||
|
@ -22,8 +26,6 @@ DefVar $OLD_VERSION$
|
|||
DefVar $OLD_CREATOR_TAG$
|
||||
DefVar $OLD_RELEASE$
|
||||
|
||||
DefVar $Reboot$
|
||||
|
||||
Set $INST_SystemType$ = GetSystemType
|
||||
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
|
||||
|
||||
|
@ -46,6 +48,8 @@ include_insert "define3264.inc"
|
|||
; ----------------------------------------------------------------
|
||||
Set $InstallDir32$ = "%ProgramFiles32Dir%\TightVNC"
|
||||
Set $InstallDir64$ = "%ProgramFiles64Dir%\TightVNC"
|
||||
Set $InstallDirMirage32$ = "%ProgramFiles32Dir%\DemoForge\Mirage Driver for TightVNC"
|
||||
Set $InstallDirMirage64$ = "%ProgramFiles64Dir%\DemoForge\Mirage Driver for TightVNC"
|
||||
; ----------------------------------------------------------------
|
||||
|
||||
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"
|
||||
|
@ -59,4 +63,3 @@ if FileExists("%ScriptPath%\delsub3264.ins")
|
|||
comment "Start uninstall sub section"
|
||||
Sub "%ScriptPath%\delsub3264.ins"
|
||||
endif
|
||||
|
||||
|
|
|
@ -43,3 +43,11 @@ OPSI_INI_VALUE[0]="{D903B276-81AE-4AED-AEF9-45DACFBF16CE}"
|
|||
OPSI_INI_SECTION[1]="X86_64"
|
||||
OPSI_INI_OPTION[1]="MsiId64"
|
||||
OPSI_INI_VALUE[1]="{D2372F87-7DA2-47F7-A102-AF2181B8EAA2}"
|
||||
|
||||
OPSI_INI_SECTION[2]="X86"
|
||||
OPSI_INI_OPTION[2]="UninstallProg32"
|
||||
OPSI_INI_VALUE[2]="mirage_uninstall.exe"
|
||||
|
||||
OPSI_INI_SECTION[3]="X86_64"
|
||||
OPSI_INI_OPTION[3]="UninstallProg64"
|
||||
OPSI_INI_VALUE[3]="mirage_uninstall.exe"
|
||||
|
|
Binary file not shown.
BIN
tightvnc.reg
BIN
tightvnc.reg
Binary file not shown.
Loading…
Reference in New Issue