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

For all users, read config pro file from network and set working directory to local. How to?

SOLVED
Highlighted
Regular Member

For all users, read config pro file from network and set working directory to local. How to?

Creo is reading the config.pro file over the public network. Therefore, all users have the same working directory. I want to set the working directory folder to the local folder of all users. In addition, I want this to be done automatically, without users doing anything. Is it possible?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: For all users, read config pro file from network and set working directory to local. How to?


@emrecan wrote:

Creo is reading the config.pro file over the public network. Therefore, all users have the same working directory. I want to set the working directory folder to the local folder of all users. In addition, I want this to be done automatically, without users doing anything. Is it possible?


Hi,

if I understand you well you want to achieve following:

  • config.pro file located on network drive (eg. X:\PTC_config\config.pro)
  • when user starts Creo then (1) Creo reads X:\PTC_config\config.pro and (2) changes working directory to user's personal directory

Information:

  • by default Creo is started using shortcut linked to parametric.exe
  • you can also start Creo using shortcut linked to parametric.bat
  • you can add commands into parametric.bat to achieve your goal - see below
@echo off
copy X:\PTC_config\config.pro .
"E:\PTC\Creo7_010\Creo 7.0.1.0\Parametric\bin\parametric.exe" "E:\PTC\Creo7_010\Creo 7.0.1.0\Parametric\bin\parametric.psf" %*
  • then you can create shortcut linked to parametric.bat and set its Start in property to user's personal directory

 


Martin Hanák

View solution in original post

5 REPLIES 5
Highlighted

Re: For all users, read config pro file from network and set working directory to local. How to?

Windchill or native filing?

Local install of Creo or network install?

Users cannot have the same working directory, it will cause corruption!

We create a c:\PTC_user\<username> folder for all users on their workstation and set this as the Start-in directory in the Creo shortcut on their desktop. To set it universally, use c:\ptc_user\%username%

 

Highlighted

Re: For all users, read config pro file from network and set working directory to local. How to?


@emrecan wrote:

Creo is reading the config.pro file over the public network. Therefore, all users have the same working directory. I want to set the working directory folder to the local folder of all users. In addition, I want this to be done automatically, without users doing anything. Is it possible?


Hi,

if I understand you well you want to achieve following:

  • config.pro file located on network drive (eg. X:\PTC_config\config.pro)
  • when user starts Creo then (1) Creo reads X:\PTC_config\config.pro and (2) changes working directory to user's personal directory

Information:

  • by default Creo is started using shortcut linked to parametric.exe
  • you can also start Creo using shortcut linked to parametric.bat
  • you can add commands into parametric.bat to achieve your goal - see below
@echo off
copy X:\PTC_config\config.pro .
"E:\PTC\Creo7_010\Creo 7.0.1.0\Parametric\bin\parametric.exe" "E:\PTC\Creo7_010\Creo 7.0.1.0\Parametric\bin\parametric.psf" %*
  • then you can create shortcut linked to parametric.bat and set its Start in property to user's personal directory

 


Martin Hanák

View solution in original post

Highlighted

Re: For all users, read config pro file from network and set working directory to local. How to?

Thanks for Reply @MartinHanak.You understood me very well. You showed me a great way.

 

However, some of your suggestions are missing. Below I share the commands I use.

@echo off
attrib -R
xcopy /s/y S:\PTC\Creo_work_dir\cfg\eng\config\config.pro C:\Users\%username%\AppData\Local\PTC\Working_Directory
xcopy /s/y S:\PTC\Creo_work_dir\cfg\eng\config\creo_parametric_customization.ui C:\Users\%username%\AppData\Local\PTC\Working_Directory
attrib +R
"C:\PTC\Creo 6.0.4.0\Parametric\bin\parametric.exe" "C:\PTC\Creo 6.0.4.0\Parametric\bin\parametric.psf" %*

 

When the bat file runs, the command screen remains open in the background. That's why I create a new file with vbs extension and start creo with this file.

 

Set WshShell = CreateObject("WScript.Shell") 
WshShell.Run chr(34) & "C:\PTC\Creo 6.0.4.0\Parametric\bin\parametric.bat" & Chr(34), 0
Set WshShell = Nothing

 I think it will help for friends with similar problems...

Highlighted

Re: For all users, read config pro file from network and set working directory to local. How to?


@emrecan wrote:

Thanks for Reply @MartinHanak.You understood me very well. You showed me a great way.

 

However, some of your suggestions are missing. Below I share the commands I use.

@echo off
attrib -R
xcopy /s/y S:\PTC\Creo_work_dir\cfg\eng\config\config.pro C:\Users\%username%\AppData\Local\PTC\Working_Directory
xcopy /s/y S:\PTC\Creo_work_dir\cfg\eng\config\creo_parametric_customization.ui C:\Users\%username%\AppData\Local\PTC\Working_Directory
attrib +R
"C:\PTC\Creo 6.0.4.0\Parametric\bin\parametric.exe" "C:\PTC\Creo 6.0.4.0\Parametric\bin\parametric.psf" %*

 

When the bat file runs, the command screen remains open in the background. That's why I create a new file with vbs extension and start creo with this file.

 

Set WshShell = CreateObject("WScript.Shell") 
WshShell.Run chr(34) & "C:\PTC\Creo 6.0.4.0\Parametric\bin\parametric.bat" & Chr(34), 0
Set WshShell = Nothing

 I think it will help for friends with similar problems...


Hi,

1.]

See https://www.ptc.com/en/support/article/CS27948 

and add following command at the beginning of parametric.bat

set PTC_SUPPRESS_RESTART_AWARE=true

2.]

In the past I asked Google ... windows 10 disable warning when starting batch file from network and got following link http://woshub.com/how-to-disable-open-file-security-warnings-in-windows-7/ . Maybe the solution is usable for you, too.

 


Martin Hanák
Highlighted

Re: For all users, read config pro file from network and set working directory to local. How to?

@MartinHanak  I used the 1st method you said and it works. In this way, there is no need for an extra vbs file.

@echo off

set PTC_SUPPRESS_RESTART_AWARE=true
attrib -R
xcopy /s/y S:\PTC\Creo_work_dir\cfg\eng\config\config.pro C:\Users\%username%\AppData\Local\PTC\Working_Directory
xcopy /s/y S:\PTC\Creo_work_dir\cfg\eng\config\creo_parametric_customization.ui C:\Users\%username%\AppData\Local\PTC\Working_Directory
attrib +R

"C:\PTC\Creo 6.0.4.0\Parametric\bin\parametric.exe" "C:\PTC\Creo 6.0.4.0\Parametric\bin\parametric.psf" %*

 I am not having a problem with item 2 right now. Thank you for support. 

Announcements