LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stopping DOS window flashing up when System Exec. is called?

Solved!
Go to solution

Hi,

 

Would anybody know how I can avoid having the DOS window flash up when I run the VI I have attached  : program that just calls an .exe file.

 

Thanks,

 

Marc

 

XP & LV 8.5

0 Kudos
Message 1 of 10
(5,148 Views)
The only thing I can see is that you should wire a TRUE to the "Run minimized (F)" terminal of System Exec.vi. As I see the complete command is "cmd /x /s start "...."" where ..... is the program you will start. Start from the command prompt will start the program asynchronously without waiting to complete. You can just use the program as commandline and set "Wait until completetd" to FALSE. This will also start the program asynchronously.
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 2 of 10
(5,138 Views)

Thanks for answering. I forgot to say I had already tried setting the RUN MINIMIZE entry to True, but it doesn't change anything. To answer your question, the  program that I am calling is on the desk but it can be set anywhere on my computer. Does this have any importance?

 

The program that I am calling communicates with Multimeter using a RS-232 cable. Since it takes quite a time, I need to do other things before open a file where my other program has writen the value of the measurement. (all this to say I don't need to wait for this particulat program to have finished its job).

 

I am sorry, but I haven't understood your suggestion : Start the promptwill start the program...". I have no experience with, would you mind explaning again what I can try to do?

 

If you use my program to launch any of your .exe file, do you have the same behaviour (DOS flashing up) ?

 

Thanks,

 

 Regards,

 

Marc

0 Kudos
Message 3 of 10
(5,109 Views)

That is curious.  The Run Minimized has always worked for me.  Looking at your code, there are a couple of things that may be happening.

  1. You are running in an NT variant and changed the first run minimized, but not the one in the error case, which actually executed your code
  2. Your code itself causes the pop-up.  You can determine this by running it from the Windows Start->Run dialog.

As a side note, you can get the operating system using the App->OS.Name and OS.Version properties.  This would allow you to execute exactly the code you want to and not rely on an error.  Drop a property node from the Application Control palette and select Operating System->Name or Version.  You do not need to wire a reference into it.

 

One last note I have to bring up.  On Windows, LabVIEW 8.5 is only supported on Windows 2000/XP/Vista.  It may work on Win9x, but is not guaranteed to.

0 Kudos
Message 4 of 10
(5,090 Views)

You can also run the dos window in quiet mode. It will not pop up and you will not even see the dos window

 

msiexec /uninstall install.msi /quiet

 

The example from above uses the /quiet switch to make the dos window not visible. 

Tim
GHSP
0 Kudos
Message 5 of 10
(5,070 Views)

aeastet wrote:

You can also run the dos window in quiet mode. It will not pop up and you will not even see the dos window

 

msiexec /uninstall install.msi /quiet

 

The example from above uses the /quiet switch to make the dos window not visible. 


 

The quiet flag is a function of the msiexec program, not the cmd program.  So I'm not sure how your statement is going to help the original poster as his post mentions nothing about installing or uninstalling.Smiley Wink
0 Kudos
Message 6 of 10
(5,062 Views)

Sorry It has been a while. I knew we had the same issue so I looked back.

 

if you add a /s to the end of the command it makes it silent (hidden)

Tim
GHSP
0 Kudos
Message 7 of 10
(5,059 Views)
Solution
Accepted by marc france

I changed your VI to let it execute the program directly. Also I changed Your Code to show you how to use the run minimized.

 

I used it to start LV 7.1.1 form LV 8.6.

 

Your code sligthly modified 

 

 My code

Message Edited by waldemar.hersacher on 10-09-2008 11:22 PM
Message Edited by waldemar.hersacher on 10-09-2008 11:26 PM
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
Download All
Message 8 of 10
(5,055 Views)

Hey Marc,

 

Have a read through the thread below: 

http://forums.ni.com/ni/board/message?board.id=170&thread.id=358373

 

I have recently been through the same sort of issue (plus some others) the best solution i have come up with is built in to the 

Opening and closing applications gracefully from LV.zip (53 kb) example.  This overcomes the need to open the dos (CMD) window by placing the path to the file in the Environmental Variables settings in XP (explained in the thread). 

 

The LVWUtil32 set of examples is also really handy for doing other things, so check that out if you are looking to do further windows manipulations.

 

Cheers,

 

Blue 

 

 

0 Kudos
Message 9 of 10
(5,035 Views)

Hi everyone,

 

Thanks a lot for all your answers. I have only tried 2 of your suggestions. Just for intrest, the \s one didn't solve the problem, but Waldermar's solution stops the Dos window from poping up.

 

So thanks again !

 

Best Regards,

 

Marc

0 Kudos
Message 10 of 10
(5,005 Views)