Windows ftp脚本 和bladelogic RSCD Agent自动安装脚本
比较简单的命令是msiexec /I "C:\RSCD85-SP1-WIN64.msi" /QN /norestart INSTALLDIR="C:\Program Files\BladeLogic\RSCD" EXPORTSFILE="C:\exports"
下面是做过判断的
@echo off %== ( netsh advfirewall firewall add rule name= action=allow netsh advfirewall firewall add rule name= action=allow netsh advfirewall firewall add rule name= action=allow echo open 10.200.251.47 >c:\autoftp.cfg echo user >>c:\autoftp.cfg echo user >>c:\autoftp.cfg echo bin >>c:\autoftp.cfg echo prompt >>c:\autoftp.cfg echo cd agent/windows >>c:\autoftp.cfg echo lcd c:\ >>c:\autoftp.cfg echo mget RSCD85-SP1-WIN64.msi exports >>c:\autoftp.cfg echo bye >>c:\autoftp.cfg ftp -v -s:c:\autoftp.cfg del c:\autoftp.cfg .5请稍候... c:\RSCD85-SP1-WIN64.msi /quiet /norestart copy /Y c:\exports C:\Windows\rsc\ .5安装完成。) else ( netsh firewall set portopening TCP ENABLE netsh firewall set portopening TCP ENABLE netsh firewall set portopening TCP ENABLE set ftpfilename=autoftp.cfg echo open 10.200.251.47 >c:\autoftp.cfg echo user >>c:\autoftp.cfg echo user >>c:\autoftp.cfg echo bin >>c:\autoftp.cfg echo prompt >>c:\autoftp.cfg echo cd agent/windows >>c:\autoftp.cfg echo lcd c:\ >>c:\autoftp.cfg echo mget RSCD85-SP1-WIN32.msi exports >>c:\autoftp.cfg echo bye >>c:\autoftp.cfg ftp -v -s:c:\autoftp.cfg del c:\autoftp.cfg .5请稍候... c:\RSCD85-SP1-WIN32.msi /qn /norestart copy /Y c:\exports C:\Windows\rsc\ .5安装完成)