delete possible local (old) msi-file, exception handling copy (new) msi-file
This commit is contained in:
		| @@ -7,6 +7,7 @@ | |||||||
| requiredWinstVersion >= "4.10.8.6" | requiredWinstVersion >= "4.10.8.6" | ||||||
|  |  | ||||||
|  |  | ||||||
|  | DefVar $msifile$ | ||||||
| DefVar $officescan.fqdn$ | DefVar $officescan.fqdn$ | ||||||
| DEfVar $officescan.sharename$ | DEfVar $officescan.sharename$ | ||||||
| DefVar $domainuser.loginname$ | DefVar $domainuser.loginname$ | ||||||
| @@ -28,6 +29,7 @@ Set $officescan.fqdn$ = GetProductProperty ("officescan.fqdn","values") | |||||||
| Set $officescan.sharename$ = GetProductProperty ("officescan.sharename","values") | Set $officescan.sharename$ = GetProductProperty ("officescan.sharename","values") | ||||||
| Set $domainuser.loginname$ = GetProductProperty ("domainuser.loginname","values") | Set $domainuser.loginname$ = GetProductProperty ("domainuser.loginname","values") | ||||||
| Set $domainuser.password$ = GetProductProperty ("domainuser.password","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$ | Set $connectionstr$ = "\\" + $officescan.fqdn$ + "\" + $officescan.sharename$ + " /user:" + $domainuser.loginname$ + " " + $domainuser.password$ | ||||||
|  |  | ||||||
| @@ -95,6 +97,9 @@ else | |||||||
| 		Sub_get_licensekey | 		Sub_get_licensekey | ||||||
| 	endif | 	endif | ||||||
| 	 | 	 | ||||||
|  |         if FileExists($msifile$) | ||||||
|  |            DosInAnIcon_delmsi | ||||||
|  |         EndIf | ||||||
|  |  | ||||||
| 	comment "Start setup program" | 	comment "Start setup program" | ||||||
|         DosInAnIcon_TMWF |         DosInAnIcon_TMWF | ||||||
| @@ -102,27 +107,28 @@ else | |||||||
| 	comment "Copy files" | 	comment "Copy files" | ||||||
|         Files_install /32Bit |         Files_install /32Bit | ||||||
|  |  | ||||||
|  | 	if not (FileExists($msifile$)) | ||||||
|  |            isFatalError | ||||||
|  |         Endif | ||||||
|  |  | ||||||
|         Winbatch_install |         Winbatch_install | ||||||
| 	Sub_check_exitcode | 	Sub_check_exitcode | ||||||
|  |  | ||||||
|  |  | ||||||
| endif | endif | ||||||
|  |  | ||||||
| [DosInAnIcon_TMWF] | [DosInAnIcon_TMWF] | ||||||
| net use f: /delete /y | net use f: /delete /y | ||||||
| net use f: $connectionstr$ | net use f: $connectionstr$ | ||||||
|  |  | ||||||
|  | [DosInAnIcon_delmsi] | ||||||
|  | del $msifile$ | ||||||
|  |  | ||||||
| [Files_install] | [Files_install] | ||||||
| copy "F:\Download\agentWin32.msi" %SystemDrive%\tmp\ | copy "F:\Download\agentWin32.msi" %SystemDrive%\tmp\ | ||||||
|  |  | ||||||
| [Winbatch_install] | [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 | %SystemDrive%\tmp\agentWin32.msi /quiet | ||||||
|  |  | ||||||
|  |  | ||||||
| [Sub_check_exitcode] | [Sub_check_exitcode] | ||||||
| comment "Test for installation success via exit code" | comment "Test for installation success via exit code" | ||||||
| set $ExitCode$ = getLastExitCode | set $ExitCode$ = getLastExitCode | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user