Jump to content
  • 0

Running Self Created Executable File from Script


CFalardeau97

Question

I have created a Script to automate and gather a bunch of measurements that I wish to export to a report. To do so, I have written a simple C# program that opens up a word document and automatically saves it as a pdf. However, I have tried using both "Tool.start" and "Tool.Exec" to run the created executable. I have it pointed to the directory it is located in, but it does not seem to want to run. Could this have anything to do with my use of the .Net Framework? I can provide additional information or screenshots if needed. Thank you in advance!

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Hi @CFalardeau97

It the application is in the PATH or next to the app then it can be called just by name (like: ping, cmd, ...) otherwise the full path should be used, like: Tool.start("C:/test/myapp.exe").
The argument array is optional, depends on your app.
The work directory is also optional, it depends if you need this for your app or not.

In some cases the app may need to be open like this:
Tool.start("cmd", ["/c myapp.exe"], "C:/test/")

Link to comment
Share on other sites

  • 0

Ok, I have moved your question to a more appropriate section of the Forum where the engineer most familiar with WaveForms will be able to see and respond to your question.

I'm not an expert in this particular usage of WaveForms, but posting the script you are currently attempting to use (filepath's blanked out or made ambiguous of course; I also presume the script is separately capturing and storing data in a .csv or something like that) would be helpful as well.

Thanks,
JColvin

Link to comment
Share on other sites

  • 0

Hi @attila,

I have refered to this document and I am still confused on why things will not run. Does ".start" and ".exec" require an argument array to function? I ask as the C# program I am attempting to call does not take any arguments. It simply edits a docx document by filling a table with information from a text file that the Waveforms script creates. It then saves the document to PDF form.

 

What I have found to be interesting is that these functions have no issues calling executables from this directory: "C:\Windows\System32\". I have called msconfig with no argument array and without referring to that directory like the ping example.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...