delete possible local (old) msi-file, exception handling copy (new) msi-file

This commit is contained in:
Dennis Trinks 2012-06-21 13:02:37 +02:00
parent ac6576558a
commit ccf8aecb64
1 changed files with 13 additions and 7 deletions

View File

@ -7,6 +7,7 @@
requiredWinstVersion >= "4.10.8.6"
DefVar $msifile$
DefVar $officescan.fqdn$
DEfVar $officescan.sharename$
DefVar $domainuser.loginname$
@ -28,6 +29,7 @@ Set $officescan.fqdn$ = GetProductProperty ("officescan.fqdn","values")
Set $officescan.sharename$ = GetProductProperty ("officescan.sharename","values")
Set $domainuser.loginname$ = GetProductProperty ("domainuser.loginname","values")
Set $domainuser.password$ = GetProductProperty ("domainuser.password","values")
Set $msifile$ = "%SystemDrive%\tmp\agentWin32.msi"
Set $connectionstr$ = "\\" + $officescan.fqdn$ + "\" + $officescan.sharename$ + " /user:" + $domainuser.loginname$ + " " + $domainuser.password$
@ -95,6 +97,9 @@ else
Sub_get_licensekey
endif
if FileExists($msifile$)
DosInAnIcon_delmsi
EndIf
comment "Start setup program"
DosInAnIcon_TMWF
@ -102,9 +107,12 @@ else
comment "Copy files"
Files_install /32Bit
Winbatch_install
if not (FileExists($msifile$))
isFatalError
Endif
Winbatch_install
Sub_check_exitcode
endif
@ -112,17 +120,15 @@ endif
net use f: /delete /y
net use f: $connectionstr$
[DosInAnIcon_delmsi]
del $msifile$
[Files_install]
copy "F:\Download\agentWin32.msi" %SystemDrive%\tmp\
[Winbatch_install]
; Choose one of the following examples as basis for your installation
; You can use $LicenseKey$ var to pass a license key to the installer
;
; === Nullsoft Scriptable Install System ================================================================
%SystemDrive%\tmp\agentWin32.msi /quiet
[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode