Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
I recently saw a batch file that retrieved this information. It was for setting up ProE starting environments, but should be a good basis for this as well. I will look further.
x
Found where it was in my Wiki.
From communities.ptc.com/message/247275#247275:
Markus Trautner asked I'd like to update my start script for Creo thus that it checks which date code version is installed on the users computer (e.g. M040, M090...)
Is there a general parameter, which i can use to do this?
By FABRICE PEREZ,
hello, we are using a DOS script:(if somebody has a better way...maybe we can do an idea ?
we install Creo in : C:\CAO\appli\Creo 2.0
The script:
SET DRIVE=C:
SET REP_CAO=%DRIVE%\CAO
IF EXIST "%REP_CAO%\Appli\Creo 2.0" SET CREO_INSTALL=%REP_CAO%\Appli\Creo 2.0
SET PARAMETRIC_INSTALL=%CREO_INSTALL%\Parametric
SET COMMONFILES_INSTALL=%CREO_INSTALL%\Common Files
:: *** Récupération du release installé de Creo
PUSHD %COMMONFILES_INSTALL%
FOR /F %%a IN ('DIR /d /b') DO SET RELEASE=%%a
POPD
SET COMMONFILES_INSTALL=%CREO_INSTALL%\Common Files\%RELEASE%
ECHO RELEASE: %RELEASE%
ECHO COMMON FILES: %COMMONFILES_INSTALL%
Martin Hanak includes this background:
Markus,
let us assume that you call something like C:\PTC\Creo 2.0\Parametric\bin\parametric.exe inside your script.
To get Creo Parametric 2.0 date code, look for the name of subdirectory of C:\PTC\Creo 2.0\Common Files directory.
Martin Hanak
x
THANK YOU! We have been trying to figure this out for a long time.
Also for those moving to Creo 3.0 here is the new version.
We install to C:\PTC
So the Creo 3.0 folder is install to the above location.
SET DRIVE=C:
SET REP_PTC=%DRIVE%\PTC
IF EXIST "%REP_PTC%\Creo 3.0" SET CREO_INSTALL=%REP_PTC%\Creo 3.0
:: *** Recover Creo install release
PUSHD %CREO_INSTALL%
FOR /F %%a IN ('DIR /d /b') DO SET RELEASE=%%a
POPD
SET CREO_INSTALL=%CREO_INSTALL%\%RELEASE%
SET PARAMETRIC_INSTALL=%CREO_INSTALL%\Parametric
SET COMMONFILES_INSTALL=%CREO_INSTALL%\Common Files
ECHO RELEASE: %RELEASE%
ECHO COMMON FILES: %COMMONFILES_INSTALL%