如何在安裝框架時將此腳本移至INSTALLAX? 即使它已經存在,它也會安裝該框架。IF EXIST GOTO NEXT
我錯過了什麼?
Echo off
IF EXIST "%Programfiles(x86)%" (GOTO 64-Bit) ELSE (GOTO 32-Bit)
:32-Bit
IF EXIST "%windir%\Microsoft.NET\Framework\v4.0.30319\SetupCache\Extended\setup.exe" GOTO INSTALLAX ELSE GOTO INSTALLFRAMEWORK
:64-Bit
IF EXIST "%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\Extended\setup.exe" GOTO INSTALLAX ELSE GOTO INSTALLFRAMEWORK
:INSTALLFRAMEWORK
start "" /w "\\server1\appdata01\Deployment\MicrosoftDynamicsAX\Prerequisites\Net Framework 4.0\dotNetFx40_Full_x86_x64.exe" /q /norestart
ECHO .NETFramework4.0Installed %Date% %TIME% >> \\server1\appdata01\Deployment\MicrosoftDynamicsAX\Client_Log\Framework\%COMPUTERNAME%.log
:INSTALLAX
start "" /w "\\server1\appdata01\Deployment\MicrosoftDynamicsAX\DynamicsAX\setup.exe" RunMode=Custom HideUI=1 AcceptLicenseTerms=1 ByPasswarnings=0 InstallClientUI=1 ClientAOSServer=ax-aos02-prod AOSPort=2712 AOSWsdlPort=8101 ClientLanguage=en-us ConfigurePrerequisites=1 ClientConfigFile="\\sespfs01\appdata01\Deployment\MicrosoftDynamicsAX\AX_Icons\DAX_Prod(usr)32-bit.axc" LogDir="\\server1\appdata01\Deployment\MicrosoftDynamicsAX\Client_Log"
ECHO AXDynamics2012Installed %Date% %TIME% >> \\server1\appdata01\Deployment\MicrosoftDynamicsAX\Client_Log\AXDynamics\%COMPUTERNAME%.log" GOTO END
:END
Exit
您在64位標籤的IF子句中缺少ELSE。 – Vicky 2013-04-23 11:23:59
是的,還有比ELSE更多的東西,比如「&」。 – ElektroStudios 2013-04-23 11:30:03