OS Deployment‎ > ‎

Batch File Application Installer

This is a batch file that I created which has support for both network deployments (from the deployment share) and a media based installation (such as a USB drive or DVD disc). I had to create some type of solution for the CutePDF installer which has two parts:

1) The Ghostscript installer.
2) The actual CutePDF virtual printer.

I didn't want to separate the Ghostscript installer and the CutePDF installer as two different applications in MDT. I wanted to keep both of them together since they are dependent on each other. This is why I chose to use a Batch file to kick off the installation. Easy to write, easy to execute.



Here is a copy of my CutePDF.BAT installer.


>>>>>>>>>> START BATCH FILE <<<<<<<<<<<<<<<<<

@ECHO OFF
Echo Installing CutePDF

IF EXIST D:\Deploy\Applications\CutePDF\CuteWriter.exe GOTO CDINSTALLD
IF EXIST E:\Deploy\Applications\CutePDF\CuteWriter.exe GOTO CDINSTALLE
IF EXIST F:\Deploy\Applications\CutePDF\CuteWriter.exe GOTO CDINSTALLF
IF EXIST G:\Deploy\Applications\CutePDF\CuteWriter.exe GOTO CDINSTALLG
IF EXIST H:\Deploy\Applications\CutePDF\CuteWriter.exe GOTO CDINSTALLH
IF EXIST \\server\deploymentshare$\Applications\CutePDF\CuteWriter.exe GOTO NETINSTALL
GOTO GOODBYE

:NETINSTALL
md c:\cutepdf
xcopy \\dbghost\mdt$\applications\CutePDF\ C:\CUTEPDF /E /Y
C:\CutePDF\converter\setup.exe
c:\CutePDF\CuteWriter.exe /verysilent /no3d
rd c:\CutePDF /s /q
EXIT

:CDINSTALLD
md c:\cutepdf
xcopy d:\deploy\applications\cutepdf c:\cutepdf /E /Y
C:\CutePDF\converter\setup.exe
c:\CutePDF\CuteWriter.exe /verysilent /no3d
rd c:\CutePDF /s /q
EXIT

:CDINSTALLE
md c:\cutepdf
xcopy e:\deploy\applications\cutepdf c:\cutepdf /E /Y
C:\CutePDF\converter\setup.exe
c:\CutePDF\CuteWriter.exe /verysilent /no3d
rd c:\CutePDF /s /q
EXIT

:CDINSTALLF
md c:\cutepdf
xcopy f:\deploy\applications\cutepdf c:\cutepdf /E /Y
C:\CutePDF\converter\setup.exe
c:\CutePDF\CuteWriter.exe /verysilent /no3d
rd c:\CutePDF /s /q
EXIT

:CDINSTALLG
md c:\cutepdf
xcopy g:\deploy\applications\cutepdf c:\cutepdf /E /Y
C:\CutePDF\converter\setup.exe
c:\CutePDF\CuteWriter.exe /verysilent /no3d
rd c:\CutePDF /s /q
EXIT

:CDINSTALLH
md c:\cutepdf
xcopy h:\deploy\applications\cutepdf c:\cutepdf /E /Y
C:\CutePDF\converter\setup.exe
c:\CutePDF\CuteWriter.exe /verysilent /no3d
rd c:\CutePDF /s /q
EXIT

:GOODBYE
EXIT

>>>>>>>>>> END BATCH FILE <<<<<<<<<<<<<<<<<
Comments