Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

running a dos app without showing it

Posted on 2000-03-31
3
Medium Priority
?
135 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 180 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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 The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Loops Section Overview
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month21 days, 1 hour left to enroll

810 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