cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Creo 3 - Determining the Installed Build Code

dgschaefer
21-Topaz II

Creo 3 - Determining the Installed Build Code

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.
--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn
ACCEPTED SOLUTION

Accepted Solutions

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.

--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn

View solution in original post

1 REPLY 1

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.

--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn
Announcements
NEW Creo+ Topics: PTC Control Center and Creo+ Portal


Top Tags