1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

Hiding a minimized running programe

Discussion in 'Windows XP' started by GRAHAM WESTON, 2006/03/31.

  1. 2006/03/31
    GRAHAM WESTON

    GRAHAM WESTON Well-Known Member Thread Starter

    Joined:
    2002/07/30
    Messages:
    371
    Likes Received:
    0
    I have a Pinnacle PCTV Pro card in my machine with a camera and mic connected. I use this to record security footage in my office. When the programe is running and minimized, staff can still see that it is running because it shows in the task bar. Is there anyway of not having it show in the task bar when running. Is it possible to have the minimized program show only in a desktop folder, or somewhere else where staff cannot see it.

    Many thanks.
    Graham Weston
     
  2. 2006/03/31
    JRosenfeld

    JRosenfeld Inactive

    Joined:
    2006/03/18
    Messages:
    110
    Likes Received:
    3
    You could try running the program from within CMDOW, which is a command line extension with the ability to hide its own window.

    Place CMDOW.exe in your system32 folder.

    http://www.commandline.co.uk/cmdow/

    see especially usage 4 and look through the examples.

    I use it to have WMP10 play a wav file with no windows showing.
     

  3. to hide this advert.

  4. 2006/04/01
    GRAHAM WESTON

    GRAHAM WESTON Well-Known Member Thread Starter

    Joined:
    2002/07/30
    Messages:
    371
    Likes Received:
    0
    Many thanks, I have downloaded it, but how do you run it. I unzipped the file and saved it in system 32 as you mentioned. But when I click to run it, a window opens, it appears to load, then the window shuts. What am I doing wrong.

    Graham
     
  5. 2006/04/01
    Welshjim

    Welshjim Inactive

    Joined:
    2002/01/07
    Messages:
    5,643
    Likes Received:
    0
    GRAHAM WESTON--After downloading CMDOW.exe to the System32 folder, it appears you run the following from a Command prompt
    cmdow /run /hid myprog.exe
    In place of "myprog.exe" you would substitute the name of the program you wish to hide.
     
  6. 2006/04/03
    JRosenfeld

    JRosenfeld Inactive

    Joined:
    2006/03/18
    Messages:
    110
    Likes Received:
    3
    You could write a simple .bat file in Notepad. To execute it you can double click on the file or you can execute it from start/run.

    For example, this is what I have to make WMP play a sound file, called blckbird.wav, then close WMP, without any windows showing, either open or in the taskbar:

    Code:
    @echo off
    CMDOW @ /hid
    CMDOW /run /hid  "C:\Program Files\Windows Media Player\wmplayer.exe"  C:\Windows\Media\Blckbird.wav
    ping 127.0.0.1 -n 5 >nul
    CMDOW  "Windows Media Player" /CLS
    CMDOW @ /CLS
    
    In the above,

    CMDOW @ /hid hides the CMDOW window
    The next command opens WMP (but hidden) and tells it to play the specified sound file.
    The ping command gives WMP the 4 seconds it needs to play that sound file (change 5 to x+1 to wait for x seconds), before the next command in the bat file is executed.
    The next command closes WMP (note that the specification refers to the program's window name (in my case Windows Media Player), rather than the .exe (in my case wmplayer.exe), and that names with spaces require to be in " "). Instead of the /CLS switch, you can also use the /END switch, which also ends other processes that might have been started by the program.
    CMDOW @ /CLS closes the CMDOW window

    Other examples are in the link I gave earlier.
     
    Last edited: 2006/04/03
  7. 2006/04/03
    GRAHAM WESTON

    GRAHAM WESTON Well-Known Member Thread Starter

    Joined:
    2002/07/30
    Messages:
    371
    Likes Received:
    0
    Gentlemen,
    Many thanks for all your help. I managed to get the programe running last night. I manually start the PCTV program, then run CMD. In that window I type CMDOW "HANDLE /HID, and the running program disappears from view, along with the task bar icon. To get it to reappear, I type CMDOW "HANDLE" /VIS. Works like a charm.

    I do have a problem or two. I have to enter the HANDLE , as it does not recognize the Caption. Every time I start the PCTV program, I run CMDOW /T to get the HANDLE. I then have to write down the Handle somewhere, before I hide the program and shut down CMD. If I do not do this, and forget the HANDLE, I cannot make it visable again. And as the HANDLE changes everytime you start PCTV, you have no choice but to record the number somewhere every time you start it.

    Is there any way of checking what programs are running HIDDEN. This would make life much easier, plus I would not have little numbers written down all over my table.

    Regards
    Graham.
     
  8. 2006/04/03
    JRosenfeld

    JRosenfeld Inactive

    Joined:
    2006/03/18
    Messages:
    110
    Likes Received:
    3
    I'm not familiar with Pinnacle PCTV, but presumably it is started by running some .exe file? It will have some name, but for the purpose of this comment I'll call it PCTV.exe. If so, instead of starting the PCTV program manually and then getting the handle of its window to hide it, why not go start/run, type

    CMDOW /run /hid path\PCTV.exe (where path is the path to where PCTV.exe is located)

    that will (should) start it hidden. If PCTV.exe requires parameters to run you can add them as well (if you have a shortcut that you use to start it, look at the target line in the shortcut's properties; or there may be info in the software's help file).

    To stop it, if the PCTV window doesn't have a fixed caption then CMDOW is indeed a little cumbersome as you point out you need the process PID or window handle.

    There is another way to kill a program or process, which can use the program's *.exe instead of the process PID or the program's window caption or handle, and that is the CMD command taskkill. This is available in XP pro by default, but not in XP Home. However it will run perfectly well in XP Home and if you need it you can download it from

    http://home.wanadoo.nl/gigajosh/2005/05/taskkillexe.html

    (that version happens to have the help in Dutch, but is otherwise the same as an English language version; the English version explaining the parameters for taskkill can be found here:

    http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds.mspx?mfr=true
    scroll down to Taskkill and click on the link)

    Place Taskkill.exe it in your \system32 folder.

    The command is easy to use, with the parameters /f and /im for example

    Taskkill /f /im wmplayer.exe would close wmplayer.exe if it was running, whether hidden or not.

    Instead of using CMDOW to stop the PCTV program, you could therefore try click start, run, type

    Taskkill /f /im/ PCTV.exe (just the file name here)

    If PCTV opens more processes than just its .exe, you can kill the associated child processes by adding the /t parameter (but use with caution, in case otrher processes share one or other child process and need it to continue running):

    Taskkill /f /im/ PCTV.exe /t

    Hope this helps to simplify the procedure and eliminates the need to write down all those numbers.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.