This is how you would run the function:
----------------------------
WinExecAndWait(Pchar(FileString),Pchar(commandstring),SW_HIDE);
----------------------------

You can also call it like this: (make sure you have the Dialogs unit in your uses clause to do it this way).
----------------------------
Var
Ret: Integer;
Begin
Ret:=WinExecAndWait(Pchar(FileString),Pchar(commandstring),SW_HIDE);
If Ret=-1 Then ShowMessage('Error');
End;
----------------------------

// this allows the application to breathe
// and still wait until
// the other application is shut down
Repeat
lRetVal := WaitForSingleObject (pi.hProcess, 0);
Application.ProcessMessages;
until lRetVal <> 258;

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…

Creating an auto free TStringList
The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list.
In such cases, you have to…

In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you!
In this Micro Tutorial, you'll learn yo…