@Rem Unattended setup of pdfcreator @Rem 2010 by patrick (at) freeclimbers.ch @Rem Various inspirations from the web @Rem User freely... @Rem Depending on Version, we first install latest GhostScript Version @Rem This is currently (V1.10) superceded @Rem For a unknown reason, we need to change local dir @Rem pushd %~dp0PDFCreator\\GhostScript @Rem start /w %~dp0PDFCreator\\GhostScript\\setupgs.exe "%ProgramFiles%\\GhostScript" @Rem popd @Rem Remove StartMenu Entry (German XP only here!) @Rem rmdir /s /q "%AllUsersProfile%\\startmen\\Programme\\GhostScript"
@Rem Install latest PDFCreator with or w/o included GhostScript (defined in PDFCreator.inf) @Rem Use Text replace to enable use of system variables (%ProgramFiles%)
@echo off if exist %tmp%\\pdfcreator.inf del %tmp%\\pdfcreator.inf for /f "tokens=*" %%a in (%~dp0\\pdfcreator\\pdfcreator.inf) do call :AddText "%%a
start /w %~dp0PDFCreator\\PDFCreator-1_1_0_setup.exe /LOADINF=%tmp%\\PDFCreator.inf /SP- /NORESTART /VERYSILENT if exist %tmp%\\pdfcreator.inf del %tmp%\\pdfcreator.inf
exit /b
:AddText %1 set Text=%~1% if "%Text%"=="Dir=[ReplaceMe]" ( echo Dir=%ProgramFiles%\\pdfcreator >> %tmp%\\pdfcreator.inf) else ( echo %Text% >> %tmp%\\pdfcreator.inf) exit /b