From ccf8aecb64a7a0d3e5945dd38c7d841fae30fe20 Mon Sep 17 00:00:00 2001 From: Dennis Trinks Date: Thu, 21 Jun 2012 13:02:37 +0200 Subject: [PATCH] delete possible local (old) msi-file, exception handling copy (new) msi-file --- CLIENT_DATA/setup32.ins | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/CLIENT_DATA/setup32.ins b/CLIENT_DATA/setup32.ins index 874d681..c469c85 100644 --- a/CLIENT_DATA/setup32.ins +++ b/CLIENT_DATA/setup32.ins @@ -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