Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
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?
Solved! Go to Solution.
@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:
Information:
@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" %*
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%
@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:
Information:
@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" %*
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...
@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.
@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.