[wpkg-users] %cd% in Batch File
Stefan Pendl
stefan.pendl.71 at gmail.com
Thu Dec 22 12:24:15 CET 2011
Am 22.12.2011 02:32, schrieb Michael MacKay:
> Interesting, I didn't know about %~dp0 before.
>
> To try another route, just so I don't have to edit their batch files
> every release, which are every other week it seems. Is it possible to
> map a drive within WPKG for the term of the session? Could I do a 'net
> use X: \\unc\path' and then run my batch from there? That would
> probably allow there patch to work unedited, but I haven't attempted to
> create a Mapped Network Drive in a pre boot situation before (I am using
> the WPKG client, not the script after logon). Can I use the 'net use
> /persistent:no' and have it drop the connection when done?
>
I do have a package which mounts a drive and sets a working folder, see
below.
<!---code start (watch for line wraps)-->
<package
id="TcVis83Professional"
name="Teamcenter Visualization 8.3 Professional"
revision="2010.10.23"
reboot="false"
priority="30">
<include package-id="JRE6" />
<include package-id="AdobeSVGviewer" />
<include package-id="3DxWareSpaceMouseUSB"
hostname="^(ELE\d\d|CAD24)$"/>
<include package-id="3Dconnexion3DxWare"
hostname="^([ABDF-Z].+|EDV.+|EK.+|ELYSIUM.+|CAM\d\d|CAM\-[^A].+|CAD[013-9].+|CAD\-K.+)$"/>
<!-- change version number !!! -->
<variable name="JH_PKG_ROOT"
value="U:\Teamcenter\Teamcenter_Visualization\TcVis83\%PROCESSOR_ARCHITECTURE%"
/>
<variable name="JH_PKG_DEST"
value="%ProgramFiles%\Siemens\Teamcenter8.3\Visualization" />
<variable name="JH_PKG_MSI"
value="Teamcenter_Visualization_8_3.msi" />
<variable name="JH_PKG_MSI_LOG" value="%TMP%\TcVisLog.txt" />
<variable name="JH_PKG_MSI_TRANS" value="TRANSFORMS=1031.mst
INSTALL_GERMAN=1" />
<variable name="JH_PKG_MSI_LICENSE" value="LICENSE_TYPE=2
SERVER_NAME=Array01 SERVER_PORT=28000" />
<variable name="JH_PKG_MSI_FEAT"
value="VVPro,VVPro_animation,VVPro_ecad,VVPro_issues,VVPro_vsa,VVPro_ug,VVPro_vr,VVPro_iges,VVPro_step,VVPro_step_export,VVPro_dxf,VVPro_stl,VVPro_vrml,Help,PMI_fonts,LicenseBorrow"
/>
<check type="uninstall" condition="exists"
path="Teamcenter Visualization 8.3.*" />
<check type="file" condition="versiongreaterorequal"
path="%JH_PKG_DEST%\Products\Professional\VisView.exe"
value="8.3.0.10259" />
<install cmd='cscript.exe
"%WPKG_ROOT%\tools\WPKG-utility\DiskFreeV101.js" "%ProgramFiles%"
"greaterthan" 800' />
<install cmd='%ComSpec% /c NET USE U: "%SOFTWARE%"' >
<exit code="2" />
</install>
<install cmd='%comspec% /c for %F in
("%JH_PKG_ROOT%\ISSetupPrerequisites\VS2005SP1\vcredist_*.exe") do "%~F"
/q' >
<exit code="3010" reboot="false"/>
</install>
<install cmd='%comspec% /c for %F in
("%JH_PKG_ROOT%\ISSetupPrerequisites\VS2008SP1\vcredist_*.exe") do "%~F"
/q' >
<exit code="3010" reboot="false"/>
</install>
<install workdir="%JH_PKG_ROOT%" cmd='MsiExec -i "%JH_PKG_MSI%"
-passive -norestart -log "%JH_PKG_MSI_LOG%" %JH_PKG_MSI_TRANS%
INSTALLDIR="%JH_PKG_DEST%" %JH_PKG_MSI_LICENSE%
ADDLOCAL=%JH_PKG_MSI_FEAT%' />
<!-- remove 32-bit version -->
<remove cmd="msiexec -x {A7511BA1-00AC-4922-9C8E-5C7066343DE5}
-passive CLEANUP_LEVEL=11">
<exit code="1605"/>
</remove>
<!-- remove 64-bit version -->
<remove cmd="msiexec -x {434BB36B-4F54-410F-99BF-70187B74A406}
-passive CLEANUP_LEVEL=11">
<exit code="1605"/>
</remove>
</package>
<!---code end-->
--
Stefan P.
Top-posting:
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
More information about the wpkg-users
mailing list