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

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,27 +107,28 @@ else
comment "Copy files"
Files_install /32Bit
if not (FileExists($msifile$))
isFatalError
Endif
Winbatch_install
Sub_check_exitcode
endif
[DosInAnIcon_TMWF]
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