Skip to main content
21-Topaz II
July 14, 2015
Solved

Creo 3 - Determining the Installed Build Code

  • July 14, 2015
  • 1 reply
  • 1504 views

Creo 3, M040

 

In our launch batch files, I have a line that extracts the installed build code by looking in the Creo 2 installation folder:

 

for /f "delims=" %%A in ('dir /a:d /b "C:\Program Files\PTC\Creo 2.0\Common Files\"') do set BUILD=%%A

 

This reliably extracts the installed build so I can set a path to parametric.exe.

 

In Creo 3, this doesn't work as the build folder has been moved out of Common Files and into the main Creo 3 folder along with "Help" and "View Express". Using this line:

 

for /f "delims=" %%A in ('dir /a:d /b "C:\Program Files\PTC\Creo 3.0\"') do set BUILD=%%A


Sets BUILD to "View Express" instead of "M040" as I'd like.


How can I get my BUILD variable set properly in Creo 3?


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
Best answer by dgschaefer

Should have dug further first. Olaf Corten had the answer here:

 

Creo 3.0 install and build code identification

 

I need to add F* and M* to filter out all but the build paths, like this:

 

for /f "delims=" %%A in ('dir /a:d /b /o:n"C:\Program Files\PTC\Creo 3.0\F*" "C:\Program Files\PTC\Creo 3.0\M*"') do set BUILD=%%A


He also added the /o:n switch to force alphabetic order.


Until PTC adds new folders that start with F or M, this should work.

1 reply

dgschaefer21-Topaz IIAuthorAnswer
21-Topaz II
July 14, 2015

Should have dug further first. Olaf Corten had the answer here:

 

Creo 3.0 install and build code identification

 

I need to add F* and M* to filter out all but the build paths, like this:

 

for /f "delims=" %%A in ('dir /a:d /b /o:n"C:\Program Files\PTC\Creo 3.0\F*" "C:\Program Files\PTC\Creo 3.0\M*"') do set BUILD=%%A


He also added the /o:n switch to force alphabetic order.


Until PTC adds new folders that start with F or M, this should work.