Solved

running a dos app without showing it

Posted on 2000-03-31
3
128 Views
Last Modified: 2010-04-04
Hello,

I need to run, from within a Delphi app, a DOS command-line proggy. It's easy, BUT... I do not want it to show. Well, if it encounters problems (like "file not found" or the like), ok, let it display the DOS prompt window, but otherwise it has to run without showing. Please, a working piece of code to achieve this...

yegor
0
Comment
Question by:yegor
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
Epsylon earned 45 total points
ID: 2675215
Hi Yegor, use

WinExec('someapp.exe');

or

ShellExecute(Handle, 'open', 'someapp.exe', '', '', SW_HIDE);

Cheers,

Epsylon.
0
 

Author Comment

by:yegor
ID: 2675235
Epsylon,

lot of thanks! ShellExecute refused to work (I dunno why, perhaps something missing in the uses clause...), but since you provided me with the magic word SW_HIDE, I have tried it in ExecuteFile, and it has worked!

Thank you,

yegor
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 2675250
Sorry, put ShellAPI in the uses clause to be able to use ShellExecute.

Eps.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Windows Drag & Drop Location 2 100
Internet Explorer View Settings Question 15 111
FMX enumerated colours 2 97
How to open a new windows chrome resized and disabled the toolbar? 3 110
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now