Pro/ENGINEER

Performing a silent installation of PTC's Pro/ENGINEER[1] 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:

  1. Create a customer installer of the PTC installation media. To do this, click on Other Products in the PTC.Setup program and choose Custom Installer. Select the components you want to install and output the results to an appropriate directory within your WPKG software folder.
  2. From a command prompt, run "setup.exe -uilog" in the directory you created in Step 1 above. Input all the configuration parameters that you want to use on your silent installation. The setup program will write a trail file (named ps_trl.txt.1) that contains these parameters. (See PTC TPI 103331[2] for details about using trail files to automate installations.)
  3. Copy the trail file to your WPKG software area. You will need it during installations. (Note that I created different trail files for each version, release code, and installation drive.)
  4. Create install-silent.bat and remove-silent.bat batch files for the installation and removal of Pro/ENGINEER. The installation files should copy installer data (including the trail file) to the local drive, run the installer as "setup.exe -nographics -uitrail setup.txt", wait a fixed period of time for the installer to complete, and then exit.
  5. Define the WPKG package, which will run the aforementioned batch files.

Sample batch files are below but will need to be customized for your environment. Some extra utilities from the Windows 2003 Server Resource Kit are used as tools: freedisk.exe, robocopy.exe, and sleep.exe.


%SOFTWARE%\PTC\ProENGINEER\install-silent.bat

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 "%PROGRAMFILES%\PTC\proeWildfire %WFVER%.0\bin\proe1.psf" del "%PROGRAMFILES%\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

%SOFTWARE%\PTC\ProENGINEER\remove-silent.bat

set WFVER=%1
copy /Y "%SOFTWARE%\PTC\ProENGINEER\WF%WFVER%\removetrail.txt" "%WINDIR%\TEMP\."
IF %PROCESSOR_ARCHITECTURE%==x86   "%PROGRAMFILES%\PTC\proeWildfire %WFVER%.0\uninstall\i486_nt\obj\psuninst.exe" -uitrail %SYSTEMDRIVE%\removetrail.txt "%PROGRAMFILES%\PTC\proeWildfire %WFVER%.0\uninstall\instlog.txt" -nographics
IF %PROCESSOR_ARCHITECTURE%==AMD64 "%PROGRAMFILES%\PTC\proeWildfire %WFVER%.0\uninstall\x86e_win64\obj\psuninst.exe" -uitrail %SYSTEMDRIVE%\removetrail.txt "%PROGRAMFILES%\PTC\proeWildfire %WFVER%.0\uninstall\instlog.txt" -nographics
del "%WINDIR%\TEMP\removetrail.txt"
EXIT /B 0

WPKG Packages:

<package
     id="proewf2"
     name="Pro/ENGINEER Wildfire 2.0"
     revision="280"
     reboot="false"
     priority="100">
	 
	<check type="uninstall" condition="exists" path="Pro/ENGINEER Release Wildfire 2.0 Datecode M280" />

	<install cmd='"%SOFTWARE%\PTC\ProENGINEER\install-silent.bat" 2 M280 4GB' />
		
	<upgrade cmd='"%SOFTWARE%\PTC\ProENGINEER\install-silent.bat" 2 M280 4GB' />

	<remove  cmd='"%SOFTWARE%\PTC\ProENGINEER\remove-silent.bat" 2' />

</package>

<package
     id="proewf3"
     name="Pro/ENGINEER Wildfire 3.0"
     revision="150"
     reboot="false"
     priority="100">

	<check type="uninstall" condition="exists" path="Pro/ENGINEER Release Wildfire 3.0 Datecode M150" />

	<install cmd='"%SOFTWARE%\PTC\ProENGINEER\install-silent.bat" 3 M150 4GB' />

	<upgrade cmd='"%SOFTWARE%\PTC\ProENGINEER\install-silent.bat" 3 M150 4GB' />
	
	<remove  cmd='"%SOFTWARE%\PTC\ProENGINEER\remove-silent.bat" 3' />

</package>

<package
     id="proewf4"
     name="Pro/ENGINEER Wildfire 4.0"
     revision="040"
     reboot="false"
     priority="100">

	<check type="uninstall" condition="exists" path="Pro/ENGINEER Release Wildfire 4.0 Datecode M040" />

	<install cmd='"%SOFTWARE%\PTC\ProENGINEER\install-silent.bat" 4 M040 8GB' />

	<upgrade cmd='"%SOFTWARE%\PTC\ProENGINEER\install-silent.bat" 4 M040 8GB' />
		
	<remove  cmd='"%SOFTWARE%\PTC\ProENGINEER\remove-silent.bat" 4' />

</package>