[wpkg-users] Problem with consecutive package deployment (ProEngineer)
David Davies
ddavies at apriori.com
Tue Dec 2 14:40:51 CET 2008
Wow, I thought I was the only one who needs to install three separate
versions of Pro/ENGINEER on systems, and I'm surprised that there are
others doing it with WPKG, let alone down the road in Waltham (I'm in
Concord).
PTC's installation technology is awful from a sysadmin perspective. Note
that you'll probably need to tweak your installation trail file in odd
ways to deal with locations of different installation "disks" (who
installs from CDs any more?) and/or different installation drive letters
on your systems.
I have WPKG execute a batch file to install Pro/E, and this gives me
more flexibility. To address your specific problem with the Pro/E
installers handing control back to early, I simply have my batch file
wait a safe amount of time (30 minutes) after the installer is started.
I know that the installation should take less than that amount of time,
so I'm safe. My batch file for Pro/ENGINEER Wildfire 2.0 is:
set WFVER=2
set RELCODE=M280
set FREESPACE=4GB
::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 message 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%"
:END
Note that this relies on sleep.exe and freedisk.exe, which are part of
the Windows Server 2003 Resource Kit Tools. These are located in
%WPKGROOT%\tools.
This batch file includes some other interesting features:
1. The variables in the first three lines set parameters that I can
change in order to use this script with other versions of Pro/E. Now
that I think about it, I could specify that stuff in the command line
instead, and then I would not need separate installation batch files for
each Pro/E version.
2. This installs a 32-bit version of Pro/E if the OS is 32-bit, and
a 64-bit version if the OS is 32-bit.
3. It will install on the C or D drive, whichever is the boot
volume.
4. I copy all the installation files to the local system and then
run the installer locally.
5. A Pro/E upgrade's screens are different from a fresh
installation's screens, so the same trail file does not work for both.
To deal with this, I make sure that Pro/E is always doing a fresh
installation by deleting an active proe1.psf file.
My actual WPKG installation command is a one-liner where I ignore the
exit code:
<install cmd='%SOFTWARE%\PTC\ProENGINEER\WF2\install-silent.bat'>
<exit code="any" />
</install>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20081202/5ec02896/attachment-0002.html>
More information about the wpkg-users
mailing list