correct small bugs in scripts

This commit is contained in:
Mario Fetka 2013-03-17 18:10:01 +01:00
parent 9779b43a05
commit 51238dec0c
4 changed files with 37 additions and 16 deletions

View File

@ -5,13 +5,13 @@ Set $IniFile64$ = $InstallDir64$ + "\opsi-" + $ProductId$ + ".ini"
if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
if FileExists($IniFile32$)
Set $OnceUninstallDone$ = GetValueFromInifile($IniFile32$,"COMMON","OnceUninstallDone","false")
Set $OnceUninstallDone32$ = GetValueFromInifile($IniFile32$,"COMMON","OnceUninstallDone","false")
endif
endif
if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
if FileExists($IniFile64$)
Set $OnceUninstallDone$ = GetValueFromInifile($IniFile64$,"COMMON","OnceUninstallDone","false")
Set $OnceUninstallDone64$ = GetValueFromInifile($IniFile64$,"COMMON","OnceUninstallDone","false")
endif
endif
@ -92,7 +92,7 @@ Set $once_AdobeFlash$ = GetProductProperty("once_AdobeFlash", "uninstall")
if getValue("lastactionrequest", getProductMap) = "once"
if ($OnceUninstallDone$ = "false")
if ($OnceUninstallDone32$ = "false") or ($OnceUninstallDone64$ = "false")
if ($once_dotnet1.1$ = "uninstall")
Winbatch_dotnet1.1_uninstall
endif
@ -139,10 +139,10 @@ if getValue("lastactionrequest", getProductMap) = "once"
Winbatch_AdobeFlash_uninstall
endif
if FileExists($IniFile32$)
inifile $IniFile32$ [COMMON] OnceUninstallDone=true
Winbatch_once_inifile_32
endif
if FileExists($IniFile64$)
inifile $IniFile64$ [COMMON] OnceUninstallDone=true
Winbatch_once_inifile_64
endif
comment "uninstall done now force Reboot"
ExitWindows /ImmediateReboot
@ -314,3 +314,10 @@ cscript /nologo "%ScriptPath%\UnInstall\Package\JRE\JavaUninstallScript.vbs" /ke
[Winbatch_AdobeFlash_uninstall]
[Winbatch_once_inifile_32]
inifile "$IniFile32$" [COMMON] OnceUninstallDone=true
[Winbatch_once_inifile_64]
inifile "$IniFile64$" [COMMON] OnceUninstallDone=true

View File

@ -24,7 +24,8 @@ DefVar $INST_architecture$
DefVar $OLD_VERSION$
DefVar $OLD_CREATOR_TAG$
DefVar $OLD_RELEASE$
DefVar $OnceUninstallDone$
DefVar $OnceUninstallDone32$
DefVar $OnceUninstallDone64$
Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
@ -83,14 +84,14 @@ else
Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 32 Bit..."
comment "Start setup program"
ChangeDirectory "%SCRIPTPATH%"
comment "Copy files"
Files_install_32 /32Bit
if ($java_reinstall$ = "1")
Message "Uninstalling " + "Java" + " 32 + 64 Bit..."
Winbatch_jre_uninstall
endif
Dosbatch_install_32
Sub_check_exitcode
comment "Copy files"
Files_install_32 /32Bit
comment "Patch Registry"
Registry_install /32Bit
comment "Create shortcuts"
@ -101,14 +102,14 @@ else
Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 64 Bit..."
comment "Start setup program"
ChangeDirectory "%SCRIPTPATH%"
comment "Copy files"
Files_install_64 /64Bit
if ($java_reinstall$ = "1")
Message "Uninstalling " + "Java" + " 32 + 64 Bit..."
Winbatch_jre_uninstall
endif
Dosbatch_install_64
Sub_check_exitcode
comment "Copy files"
Files_install_64 /64Bit
comment "Patch Registry"
Registry_install /64Bit
comment "Create shortcuts"
@ -123,7 +124,7 @@ endif
@echo off
%ScriptDrive%
cd "%ScriptPath%\Install"
inifile $IniFile32$ [COMMON] OnceUninstallDone=false
inifile "$IniFile32$" [COMMON] OnceUninstallDone=false
WinPKG.exe
[Files_install_32]
@ -138,7 +139,7 @@ copy -s "%ScriptPath%\Install\WinPKG.exe" "$InstallDir32$"
@echo off
%ScriptDrive%
cd "%ScriptPath%\Install"
inifile $IniFile64$ [COMMON] OnceUninstallDone=false
inifile "$IniFile64$" [COMMON] OnceUninstallDone=false
WinPKG.exe
[Files_install_64]

View File

@ -25,7 +25,8 @@ DefVar $INST_architecture$
DefVar $OLD_VERSION$
DefVar $OLD_CREATOR_TAG$
DefVar $OLD_RELEASE$
DefVar $OnceUninstallDone$
DefVar $OnceUninstallDone32$
DefVar $OnceUninstallDone64$
Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")

View File

@ -37,6 +37,18 @@ DL_ARCH[2]="X86"
DL_EXTRACT_FORMAT[2]="7zip"
DL_EXTRACT_TO[2]="dimpel"
#DL_FILE[3]="9200.16384.WIN8_RTM.120725-1247_X86FRE_ENTERPRISE_EVAL_DE-DE-HRM_CENA_X86FREE_DE-DE_DV5.ISO"
#DL_SOURCE[3]="http://care.dlservice.microsoft.com/dl/download/A/5/5/A55BCF48-BF3E-4D76-AC0A-2DEC2B7F5DE1/9200.16384.WIN8_RTM.120725-1247_X86FRE_ENTERPRISE_EVAL_DE-DE-HRM_CENA_X86FREE_DE-DE_DV5.ISO"
#DL_ARCH[3]="X86"
#DL_EXTRACT_FORMAT[3]="7zip"
#DL_EXTRACT_TO[3]="win8dotnet35"
#DL_FILE[4]="9200.16384.WIN8_RTM.120725-1247_X64FRE_ENTERPRISE_EVAL_DE-DE-HRM_CENA_X64FREE_DE-DE_DV5.ISO"
#DL_SOURCE[4]="http://care.dlservice.microsoft.com/dl/download/A/5/5/A55BCF48-BF3E-4D76-AC0A-2DEC2B7F5DE1/9200.16384.WIN8_RTM.120725-1247_X64FRE_ENTERPRISE_EVAL_DE-DE-HRM_CENA_X64FREE_DE-DE_DV5.ISO"
#DL_ARCH[4]="X86"
#DL_EXTRACT_FORMAT[4]="7zip"
#DL_EXTRACT_TO[4]="win8dotnet35"
##################
### Uninstallers
##################
@ -79,7 +91,7 @@ OPSI_INI_VALUE[1]="WinPKG.exe"
### set sane default for once uninstall functionality
##################
OPSI_INI_SECTION[1]="COMMON"
OPSI_INI_OPTION[1]="OnceUninstallDone"
OPSI_INI_VALUE[1]="false"
OPSI_INI_SECTION[2]="COMMON"
OPSI_INI_OPTION[2]="OnceUninstallDone"
OPSI_INI_VALUE[2]="false"