9
edits
Changes
no edit summary
Performing a silent installation of PTC's Pro/ENGINEER[http://www.ptc.com/products/proengineer/] software is time-consuming task. One way to do this is below, and the methods used are general enough to work for any version and release code of Pro/ENGINEER.
The basic steps are:
===%SOFTWARE%\PTC\ProENGINEER\install-silent.bat===
<source lang="dos">
set WFVER=%1
set RELCODE=%2
set FREESPACE=%3
::First, see if there is enough free space to copy the data locally and then install the application.
"%WPKGROOT%\tools\freedisk.exe" /D %SystemDrive% %FREESPACE% > NUL
if errorlevel 1 goto :END
::Proceed with the installation if there is enough space
if %PROCESSOR_ARCHITECTURE%==x86 set ARCH=32
if %PROCESSOR_ARCHITECTURE%==AMD64 set ARCH=64
if %SYSTEMDRIVE%==C: set DR=c
if %SYSTEMDRIVE%==D: set DR=d
::The below parameters make robocopy produce no console output. WPKG does not deal with robocopy's console output well.
set ROBOCOPYFLAGS=/NP /NS /NC /NFL /NDL /NJH /NJS /Z
::Delete the preferences file to avoid extra prompts that mess up the silent installer.
if exist "%SYSTEMDRIVE%\fbc_modelers\PTC\proeWildfire%WFVER%.0\bin\proe1.psf" del "%SYSTEMDRIVE%\fbc_modelers\PTC\proeWildfire%WFVER%.0\bin\proe1.psf"
::Copy over data for installation
"%WPKGROOT%\tools\robocopy.exe" /MIR %ROBOCOPYFLAGS% "%SOFTWARE%\PTC\ProENGINEER\Wildfire%WFVER%\win%ARCH%\%RELCODE%" "%WINDIR%\temp\%RELCODE%"
copy /Y "%SOFTWARE%\PTC\ProENGINEER\WF%WFVER%\installtrail%RELCODE%%DR%.txt" "%WINDIR%\TEMP\%RELCODE%\."
::Install the application
%WINDIR%\temp\%RELCODE%\setup.exe -nographics -uitrail %WINDIR%\TEMP\%RELCODE%\installtrail%RELCODE%%DR%.txt
::Wait 30 minutes for the installation to complete.
"%WPKGROOT%\tools\sleep.exe" 1800
rd /S /Q "%WINDIR%\temp\%RELCODE%"
IF EXIST "%PROGRAMFILES%\PTC\Wildfire %WFVER%.0\bin\proe.exe" EXIT /B 0
:END
EXIT /B 1
</source>
===%SOFTWARE%\PTC\ProENGINEER\remove-silent.bat===
<source lang="dos">
set WFVER=%1
copy /Y "%SOFTWARE%\PTC\ProENGINEER\WF%WFVER%\removetrail.txt" "%WINDIR%\TEMP\."
IF %PROCESSOR_ARCHITECTURE%==x86 "%SYSTEMDRIVE%\fbc_modelers\PTC\proeWildfire%WFVER%.0\uninstall\i486_nt\obj\psuninst.exe" -uitrail %SYSTEMDRIVE%\removetrail.txt "%SYSTEMDRIVE%\fbc_modelers\PTC\proeWildfire%WFVER%.0\uninstall\instlog.txt" -nographics
IF %PROCESSOR_ARCHITECTURE%==AMD64 "%SYSTEMDRIVE%\fbc_modelers\PTC\proeWildfire%WFVER%.0\uninstall\x86e_win64\obj\psuninst.exe" -uitrail %SYSTEMDRIVE%\removetrail.txt "%SYSTEMDRIVE%\fbc_modelers\PTC\proeWildfire%WFVER%.0\uninstall\instlog.txt" -nographics
del "%WINDIR%\TEMP\removetrail.txt"
EXIT /B 0
</source>
<source lang="xml">