Skip to main content
1-Visitor
September 30, 2020
Solved

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

  • September 30, 2020
  • 2 replies
  • 14422 views

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?

Best answer by MartinHanak

@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

 

2 replies

23-Emerald III
September 30, 2020

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%

 

24-Ruby III
October 1, 2020

@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

 

emrecan1-VisitorAuthor
1-Visitor
October 1, 2020

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...

24-Ruby III
October 1, 2020

@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.