Solved

running a dos app without showing it

Posted on 2000-03-31
3
130 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

730 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