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

Launch script for creo 1.0

SOLVED
Newbie

Launch script for creo 1.0

Hi folks

I have downloaded the document of launch script from PTC community.

in that sample simple script was there i excuted that simple script. But no use could anyone can help me please?

I have attached my script (.bat file), please review it and help me.

I am dam stuck.

Thanks and regards

Viswanathan.K

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Launch script for creo 1.0

Hi Viswanathan,

I apologize I couldn't respond to your email sooner. I'm in a tough spot this week and it's very difficult to carve out time to reply to PTC Community messages. I did take a look at your launch script.

First... this is the worst launch script in history. It doesn't actually do anything. I'm just giving you a hard time- I know it's not your script.

Your problem is actually not that difficult. You're setting a variable to the place where Creo lives- and then running the parametric.exe file from that location. That means your error is either in the setting of the variable... or the call statement. In this case, I think you've set the variable incorrectly. On your last file, you added a backslash to your variable name and then repeat it in your call statement. This alone will stop the script from working.

Just to make sure there's not something else going on... let's just comment out the variable line and make a new call statement that includes everything. If it runs with this modification, then it should run with the variable corrected. Try this for the script:

@echo off

:: Set Environment Variables

:: set proe_load_point="C:\Program Files\PTC\Creo 1.0\"

:: Launch Pro/ENGINEER

call "C:\Program Files\PTC\Creo 1.0\Parametric\bin\Parametric.exe"

@echo on

exit

Note that only the bold line is actually doing anything. If you try it, does this work? If so, your problem is in the variable as I suggested above. If not then maybe there's something else going on. Let us know what happens...

Thanks!

-Brian

View solution in original post

21 REPLIES 21

Re: Launch script for creo 1.0

Echo back the string for the variable you defined. See if it truncated at the 1st space character. You might need to enclose it in quotation marks.

Re: Launch script for creo 1.0

Dear Antonius Dirriwachter

I have attached the script i modified and run as you said, but app crash saying now. what should i do?

I have attached modified script and and screen shot of error.

Kindly review it and help me.

To sort it out.

Else you advise me how to create basic script. attach me document.

And have another question should I add any other in environment variables (variable name & variable value on user or system).

12.JPG

Thanks&regards

Viswanathan.K

Re: Launch script for creo 1.0

I guess that wasn't it... but if you look at your script, I suspect you have 2 backslashes when you joint the variable with the path:

@echo off

:: Set Environment Variables
set proe_load_point="C:\Program Files\PTC\Creo 1.0\"

:: Launch Pro/ENGINEER
call %proe_load_point%\Parametric\bin\Parametric.exe

@echo on
exit

C:\Program Files\PTC\Creo 1.0\ + \Parametric\bin\Parametric.exe =

C:\Program Files\PTC\Creo 1.0\\Parametric\bin\Parametric.exe

Also, Parametric.exe is actually parametric.exe ...not that this should matter.

Try removing the quotes and correct the double backslash

Check your work by typing "SET" at the command prompt and see if it shows a valid path. (comment out the "call...")

Highlighted

Re: Launch script for creo 1.0

Hi Viswanathan,

I apologize I couldn't respond to your email sooner. I'm in a tough spot this week and it's very difficult to carve out time to reply to PTC Community messages. I did take a look at your launch script.

First... this is the worst launch script in history. It doesn't actually do anything. I'm just giving you a hard time- I know it's not your script.

Your problem is actually not that difficult. You're setting a variable to the place where Creo lives- and then running the parametric.exe file from that location. That means your error is either in the setting of the variable... or the call statement. In this case, I think you've set the variable incorrectly. On your last file, you added a backslash to your variable name and then repeat it in your call statement. This alone will stop the script from working.

Just to make sure there's not something else going on... let's just comment out the variable line and make a new call statement that includes everything. If it runs with this modification, then it should run with the variable corrected. Try this for the script:

@echo off

:: Set Environment Variables

:: set proe_load_point="C:\Program Files\PTC\Creo 1.0\"

:: Launch Pro/ENGINEER

call "C:\Program Files\PTC\Creo 1.0\Parametric\bin\Parametric.exe"

@echo on

exit

Note that only the bold line is actually doing anything. If you try it, does this work? If so, your problem is in the variable as I suggested above. If not then maybe there's something else going on. Let us know what happens...

Thanks!

-Brian

View solution in original post

Re: Launch script for creo 1.0

And Tom beat me to it!

Re: Launch script for creo 1.0

Dear Brain

I am extremely sorry to make worst script, i am scratch on this script mr. Brain.

and thanks brain your script is working. Now am going to try next level please guide me.

Re: Launch script for creo 1.0

Dear Antonius Dirriwachter

I am very sorry to disappoint you and apologise me for my bad script as (Mr. Brain said) , I am on scratch level of making script, please guide me. I am going to try next level script.

Please guide me.

Thanks&regards

Viswanathan.K

Re: Launch script for creo 1.0

No need to be sorry, Viswanathan. I use to program many years ago and I am very happy that I do not need to do this any more. I am certain you have a good reason to use this script. I hope you can make it work as expected.

Re: Launch script for creo 1.0

Hi Viswanathan,

What would you like to achieve with your script. I've got a ton of experience writing and tweaking startup scripts. What would you like to do with them? If you don't need to do anything special, you can just use the standard files that come with Creo. They only start to come in handy when you need to do something special.

For instance, at my job, we have a "company-wide" config.pro and config.sup file that's maintained by me and the other support administrators. We needed a way that we would make a change and have it instantly "pushed out" to all users without having everyone loading Creo off a single server. By using a startup script, we're able to put those files into the hands of our users each time they launch Creo.

We have expanded our startup script so that we can now offer upgrades to users when they launch Creo. If they're not running the latest version, they can be prompted to upgrade. We haven't deployed this yet but it's an example of what you can do with a startup script.

What particular things would you like to do? I'll be happy to help.

Thanks!
-Brian