how do you run a batch (*.bat) file from PCDMIS?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • how do you run a batch (*.bat) file from PCDMIS?

    I need to run a batch file from PCDMIS to send data to our ERP system (IQMS) automatically the batch file works if i run it outside PCDMIS however I can't get it to run Properly from PCDMIS. anyone have experience with this task?

  • #2
    Where is the batch file located? I'm not sure PC-DMIS changes the current directory to the folder where the batch file is, and the batch file itself may reference other files, expecting them to be in the current directory.

    Maybe the batch file needs some extra commands at the very beginning

    Code:
      Q:
      chdir folder_for_batchfile
    where Q is the drive name where the batch file folder is located.

    Do you run PC-DMIS as admininstrator or as normal user? Do you test run the batch file as administrator or normal user? When you start it from PC-MDIS it will have the same access rights as the PC-DMIS process, when you start it from a command promp it will have the access rights of that command prompt...
    AndersI
    SW support - Hexagon Metrology Nordic AB

    Comment


    • #3
      currently i am testing on a test server. maybe i have to move the batch file to the test server as well. currently i have it on a network drive. thanks for the insight.

      Comment


      • KIRBSTER269
        KIRBSTER269 commented
        Editing a comment
        This is how I use .bat file for making a pacman dying sound at the end of my program, don't know if this info helps. post #7

        https://www.pcdmisforum.com/forum/pc...am-is-finished
        Last edited by KIRBSTER269; 12-12-2019, 08:45 AM.

      • KIRBSTER269
        KIRBSTER269 commented
        Editing a comment
        I'm just saying if it works good outside of the program, then you could use the external command, but I'm not quite sure what your doing, so just throwing this out there too.

    • #4
      Originally posted by Vikingroovin View Post
      I need to run a batch file from PCDMIS to send data to our ERP system (IQMS) automatically the batch file works if i run it outside PCDMIS however I can't get it to run Properly from PCDMIS. anyone have experience with this task?
      Im trying to do this as well. What code do you use to get pc dmis to execute an external batch file?

      Comment


      • Sora5
        Sora5 commented
        Editing a comment
        Goto Insert-> External Command. Change the drop down from .exe to .bat

    Related Topics

    Collapse

    Working...
    X