Running custom exe - InfoPath Dev
in

InfoPath Dev

Running custom exe

Last post 10-12-2006 02:54 PM by Matt Faus. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 09-27-2006 04:25 AM

    • Alison
    • Not Ranked
    • Joined on 09-05-2006
    • Posts 4

    Running custom exe

    Does anyone know how do I run a custom .exe file?

    A have a file called my.exe and wish to run it. I have found examples for running notepad etc but not for a custom exe.

    Is it possible or can we only run microsoft executables?

    Thanks

    Kay
  • 10-12-2006 02:54 PM In reply to

    You can run the my.exe, but you will have to alter the example that you have seen a little bit. I'm sure in the code snippets you have seen when someone wanted to run Notepad they simply typed "notepad.exe". The reason this can be done is that notepad.exe is included in the %PATH% environment variable. So you have a couple options:

    1. Place my.exe in one of the folders included in %PATH%
    2. Update the %PATH% variable on each machine that you run the program on to include the folder that contains my.exe (this is the worst choice)
    3. Change the code to have a relative or absolute reference to the my.exe (this is the best choice)

    So, if my.exe is stored within a folder in the XSN you should be able to change it to "./folderName/my.exe" and it will run. Just play around with the relative paths a little bit until you get it.

    I hope this helps, let us know if you have any more problems!
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.