Just in case you had any shred of curiosity about how many ways you can deploy software, well, it’s damn near infinite. Here is yet one more permutation of a script installer for AutoCAD 2012 used with System Center Configuration Manager 2007.
@echo off rem ****************************** ****************************** ****
rem Filename..: setup.cmd
rem Author....: David M. Stein
rem Date......: 05/23/2011
rem Purpose...: install network client of AutoCAD 2012
rem ****************************** ****************************** ****
CLS
SETLOCAL
SET APPNAME=Acad2012
SET LOG=%TMP%\%APPNAME%_install. log
SET UNC=\\Servername\Apps\ Autodesk\Acad2012
echo %DATE% %TIME% installing... %APPNAME%... >%LOG%
echo %DATE% %TIME% source....... %~dps0 >>%LOG%
echo %DATE% %TIME% target....... %COMPUTERNAME% >>%LOG%
echo %DATE% %TIME% WinDir....... %WinDir% >>%LOG%
echo %DATE% %TIME% progfiles.... %ProgramFiles% >>%LOG%
echo %DATE% %TIME% temp......... %TMP% >>%LOG%
echo ------------------------------ ----------------- >>%LOG%
rem ------------------------------ ------------------------------ ----------
rem Check if AutoCAD 2012 is already installed
rem ------------------------------ ------------------------------ ----------
if exist "%ProgramFiles%\Autodesk\ AutoCAD 2012\acad.exe" (
echo %DATE% %TIME% info: application is already installed >>%LOG%
exit 0
)
if exist "%ProgramFiles%\Autodesk\ AutoCAD 2012 - English\acad.exe" (
echo %DATE% %TIME% info: application is already installed >>%LOG%
exit 0
)
rem ------------------------------ ------------------------------ ----------
rem Check if .NET Framework 4.0 is already installed - or install it
rem ------------------------------ ------------------------------ ----------
if exist "%WinDir%\Microsoft.NET\ Framework\v4.0.30319\clr.dll" (
echo %DATE% %TIME% info: dotnet framework 4.0 is already installed. >>%LOG%
) else (
echo %DATE% %TIME% info: installing MS .NET 4.0 client runtime... >>%LOG%
pushd "%UNC%\AdminImage\3rdParty\ NET\4\wcu\dotNetFramework"
dotNetFx40_Full_x86_x64.exe /q /norestart /lang:ENU
echo %DATE% %TIME% info: exit code is %errorlevel% >>%LOG%
popd
)
rem ------------------------------ ------------------------------ ----------
rem Install DirectX components
rem ------------------------------ ------------------------------ ----------
echo %DATE% %TIME% info: installing DirectX package for acad2012... >>%LOG%
echo %DATE% %TIME% info: command is -- msiexec /i Acad2012DX.msi /quiet /norestart >>%LOG%
pushd "%UNC%"
msiexec /i Acad2012DX.msi /quiet /norestart
echo %DATE% %TIME% info: exit code is %errorlevel% >>%LOG%
popd
rem ------------------------------ ------------------------------ ----------
rem Install AutoCAD 2012 deployment
rem ------------------------------ ------------------------------ ----------
echo %DATE% %TIME% info: installing AutoCAD 2012 deployment package... >>%LOG%
pushd "%UNC%\AdminImage"
setup.exe /I /Q /W ACAD2012.ini /Lang en-US
popd
echo %DATE% %TIME% info: exit code is %errorlevel% >>%LOG%
rem ------------------------------ ------------------------------ ----------
rem The following code is only required if you don't modify the setup .INI
rem to suppress shortcuts during the installation
rem ------------------------------ ------------------------------ ----------
if exist "%Public%\Desktop\Autodesk Design Review 2012.lnk" (
echo %DATE% %TIME% info: cleaning up desktop shortcuts... >>%LOG%
del "%Public%\Desktop\Autodesk Design Review 2012.lnk" /f /q
del "%Public%\Desktop\Inventor Fusion 2012.lnk" /f /q
)
if exist "%AllUsersProfile%\Desktop\ Autodesk Design Review 2012.lnk" (
echo %DATE% %TIME% info: cleaning up desktop shortcuts... >>%LOG%
del "%AllUsersProfile%\Desktop\ Autodesk Design Review 2012.lnk" /f /q
del "%AllUsersProfile%\Desktop\ Inventor Fusion 2012.lnk" /f /q
)
echo %DATE% %TIME% info: final exit code is %errorlevel% >>%LOG%
No comments:
Post a Comment