Solved

running a dos app without showing it

Posted on 2000-03-31
3
126 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 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

20 Experts available now in Live!

Get 1:1 Help Now