05-29-2015 04:59 PM
Hi,
Vi is attached, i use the system exec vi twice in the same vi at different times though and i have two different path controls wired to each one. It appears when i get to the second use of the system exec it still returns to the first path that it was executed with. Any clues why?
05-29-2015 04:59 PM
here is the attached vi
05-29-2015 05:10 PM
Is there a reason that once you append the quotes to the string, you send append it to the command string twice?
05-29-2015 05:13 PM
That was a code i found online that seemed to do the trick, but looking at it now that could be problematic correct? Is there a reason to do that? it works to start my batch file, but that could be why it returns to that directory. ill try without the double append
05-29-2015 05:44 PM
When i changed the append, the exec vi actually errored out. I assume that after the system exec runs that it is stuck in that working directory, now there is a workign directory assignment on the vi, but if i wire to it, it actually doesnt even run....
05-29-2015 06:22 PM
I would try putting a probe or an indicator on the final string that you send to the System exec function, once assembled. Then copy that to a CMD window and try to run it there and see what happens.
Try both with and without the double wiring of the quoted path.
05-29-2015 06:25 PM
I actually did that already and the command it is sending is wrong. When it runs the second time no matter what command i send it, it still sends the first command as i can see from the command prompt. It uses the path from the first vi. Even if i go to run it in the same exculsive vi it will run the first command that i send to it. Im really at a loss here.
05-29-2015 06:35 PM
You know. I did something crazy here and i actually just put both of the files in the same folder I dont fully understand the system exec function, but for now it gets it done. It has to be something about the working directory id think.