locked
CMD Window is not closing automatically after the command executes in a batch file - take 2 requested by Mike Laughlin RRS feed

  • Question

  • I have a problem with the DOS window not closing when executing parametric.bat in a script.  Creo Parametric 2.0 is the latest version of CAD software from PTC.  I did not have the issue of the DOS window hanging up with previous versions of the software (Pro/Engineer WF5).  The DOS window does close when Creo Parametric 2.0 is closed.  Or I can manually close the DOS window with Creo Parametric still running.  I would just prefer the DOS window to close after parametric.bat is executed.

    Here is the batch file I am running:

    @echo off
    copy \\maap01\stdpc\Mconfig\WC10_Creo\config.sup "C:\ptc\Creo 2.0\Common Files\M070\text\config.sup"
    rem place "rem" on line below
    copy \\maap01\stdpc\Mconfig\WC10_Creo\config.pro "C:\ptc\Creo 2.0\Common Files\M070\text\config.pro"
    rem place "rem" on line below
    copy \\maap01\stdpc\Mconfig\WC10_Creo\creo_parametric_admin_customization.ui "C:\ptc\Creo 2.0\Common Files\M070\text\creo_parametric_admin_customization.ui"
    copy \\maap01\stdpc\Mconfig\appearance.dmt "C:\ptc\Creo 2.0\Common Files\M070\graphic-library\appearances\appearance.dmt"
    copy \\maap01\stdpc\Mconfig\feature.dat "C:\ptc\Creo 2.0\Common Files\M070\mech\text\licensing\mech\feature.dat"
    copy \\maap01\stdpc\Mconfig\config C:\ptc\config
    "C:\ptc\Creo 2.0\Parametric\bin\parametric.exe"
    @echo off
    Exit

    One other thing, I am using a shortcut to the batch file and setting the Start in folder to c:\ptc\startup with the Run set as Normal window.  Not sure if that has an effect or not.  I can set the Run to Minimized and at least it is not displayed on the screen.

    Friday, January 24, 2014 8:44 PM

Answers

  • Found a solution here:

    http://www.thefreewindows.com/82/close-a-batch-dos-window-automatically-after-execution/

    start "" "C:\ptc\Creo 2.0\Parametric\bin\parametric.exe" worked for me.

    • Marked as answer by Bill_Stewart Sunday, January 26, 2014 2:39 PM
    Friday, January 24, 2014 9:19 PM

All replies

  • As I posted in the other thread.  Yu need to contact the vendor to learn why this is happening.

    It is clear the the vendors batch file is designed to keep the window open and that it requires it to stay open and NOT hidden.  Contact the vendors forum for a complete explanation.

    This is not a scripting issue and cannot be resolved in your batch file.


    ¯\_(ツ)_/¯

    Friday, January 24, 2014 8:50 PM
  • Will contact vendor.  Thank you for the reply.
    Friday, January 24, 2014 8:52 PM
  • Post your Creo issues here: http://communities.ptc.com/community/creo?view=discussions


    ¯\_(ツ)_/¯

    Friday, January 24, 2014 8:52 PM
  • Will contact vendor.  Thank you for the reply.

    Note that part of you issue is Creo configuration and how it needs to be launched.  That has nothing to do with script or batch files.

    ¯\_(ツ)_/¯

    Friday, January 24, 2014 8:59 PM
  • Found a solution here:

    http://www.thefreewindows.com/82/close-a-batch-dos-window-automatically-after-execution/

    start "" "C:\ptc\Creo 2.0\Parametric\bin\parametric.exe" worked for me.

    • Marked as answer by Bill_Stewart Sunday, January 26, 2014 2:39 PM
    Friday, January 24, 2014 9:19 PM