CreateProcess: executing hidden

CreateProcess: executing hidden

Post by Felix Kasza [MV » Mon, 03 Mar 1997 04:00:00



German,

 > I want execute but not show the program.

You could always create a new desktop (or go the whole hog with a new
window station) for the new process. That should do the trick, if all
else has failed.

Cheers,
Felix.

----------
If you post a reply, kindly refrain from emailing it, too.

 
 
 

CreateProcess: executing hidden

Post by German Mende » Mon, 03 Mar 1997 04:00:00


I'm executing an external program with CreateProcess.

I want execute but not show the program.

My code is:

  CreateProcess(........, StartupInfo, ProcessInfo);

with StartupInfo parameters:

   dwflags=STARTF_USESHOWWINDOW;
   wShowWindow:= SW_HIDE ;

It run but Show it :(

_______ German Mendez _______
 http://gmendez.home.ml.org


A CORUNHA * GALICIA * SPAIN

 
 
 

CreateProcess: executing hidden

Post by German Mende » Tue, 04 Mar 1997 04:00:00



> German,

>  > I want execute but not show the program.

> You could always create a new desktop (or go the whole hog with a new
> window station) for the new process. That should do the trick, if all
> else has failed.

 Is it possible in win95? or NT only.

 Thanks!

_______ German Mendez _______
 http://gmendez.home.ml.org


A CORUNHA * GALICIA * SPAIN

 
 
 

CreateProcess: executing hidden

Post by Patrik Blomber » Tue, 04 Mar 1997 04:00:00


German Mendez wrote...

> > German,

> >  > I want execute but not show the program.

> > You could always create a new desktop (or go the whole hog with a new
> > window station) for the new process. That should do the trick, if all
> > else has failed.

>  Is it possible in win95? or NT only.

German,

It's NT only. I'm just a bit curious, if it's a GUI-app,
then why do you want to run it but not show it?

Cheers,
Patrik

-----------------------------------------------------------------

AU-System Network AB

 
 
 

CreateProcess: executing hidden

Post by Mike Ber » Tue, 04 Mar 1997 04:00:00



>It's NT only. I'm just a bit curious, if it's a GUI-app,
>then why do you want to run it but not show it?

  I don't know about Mendez, but I would like to run a DOS app hidden.
It simply processes some files, and it would look better if a DOS
window did not appear (I am redirecting its output into a file
anyway.)

  ---Mike

 
 
 

CreateProcess: executing hidden

Post by German Mende » Wed, 05 Mar 1997 04:00:00



> >  Is it possible in win95? or NT only.

> German,

> It's NT only. I'm just a bit curious, if it's a GUI-app,
> then why do you want to run it but not show it?

There are some programs that I excute always,
when I start Win95.

 For example:
        - Time counter for Internet access (with self-detected
          conection).
        - Mailer checkers
        and another utilities ...

 Then I can edit the Win95 registry, and adding:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices]
"LAUNCH"="launchhidden.exe counter.exe"

My programs will be executed when I start but Hidden, without molest in
the desktop.

 Also, would be interesting hide some programs to the anothers users.
For example programs that register manipulations of files, ....

_______ German Mendez _______
 http://gmendez.home.ml.org


A CORUNHA * GALICIA * SPAIN

 
 
 

CreateProcess: executing hidden

Post by Mitlon Moble » Thu, 13 Mar 1997 04:00:00




> > German,

> >  > I want execute but not show the program.

> > You could always create a new desktop (or go the whole hog with a new
> > window station) for the new process. That should do the trick, if all
> > else has failed.

>  Is it possible in win95? or NT only.

>  Thanks!

> _______ German Mendez _______
>  http://gmendez.home.ml.org


> A CORUNHA * GALICIA * SPAIN

In your original message you mentioned CreateProcess and the
STARTUP_INFO fields, so I assume
you want to write a program that runs another in hidden mode. I have
used code like this with
good results:

        ...
        STARTUPINFO             sui;
        PROCESS_INFORMATION     pi;

        memset(&sui, 0, sizeof(sui));
        sui.cb = sizeof(sui);
        sui.dwFlags = STARTF_USESHOWWINDOW;
        sui.wShowWindow = SW_HIDE;

        BOOL bCreated = CreateProcess(...
        ...

If it doesn't work for you, perhaps you are setting up some other
argument to CreateProcess
incorrectly. I used this code to launch DOS apps that would load vxd's
to execute some control
function. It should work for win32 console apps also. One problem is
that if the dos app or
console app prints messages using printf or fprintf(stderr, the process
will hang when the app
terminates. Then GetExitCodeProcess always returns STILL_ACTIVE.

 
 
 

1. CreateProcess: executing hidden

I'm reacting to following parts of German Mendez

microsoft.public.win32.programmer.kernel on Sun, 02 Mar 1997 07:37:23
+0100:

I guess the wShowWindows parameter is passed to the created process,
which can interpret it as it is, or ignore it (most programmers want
their application to be visible).

Dirk

2. How to add additional cluster drives

3. Hiding an application or executing it in the Systray

4. peeling Psion5

5. Executing another program and hiding it

6. memory problem ?

7. keep the Win2000's auto-hide-enabled taskbar permanently hidden

8. help me with The basics

9. permanently disable or hide (NOT auto-hide

10. permanent hide of Win2000's auto-hide-enabled taskbar

11. Execute Shell and Hide Window. Continue Code on Completion

12. createprocess() from an ISAPI dll?