Thread: Killing process

  1. #1
    Registered User
    Join Date
    Apr 2006

    Unhappy Killing process

    I am experimenting with processes. I made a program that kills explorer.exe then asks for a password and restarts it.

    Unfortunately every time I kill explorer it restarts automatically.
    Anything I can do to prevent that.

  2. #2
    The Richness... Richie T's Avatar
    Join Date
    Jan 2006
    although this sounds like a hack to me, i will say this: windows
    has been around for donkey's years - we all know that it's crap
    in many ways, but the people at microsoft have spent a lot of time
    and money at making it more and more impenetrable. if there is
    a way to disable explorer completely like you want, i doubt it is
    easy to find. sorry if thats not what you're looking for
    No No's:
    fflush (stdin); gets (); void main ();

    Example of fgets (); The FAQ, C/C++ Reference

    My Gear:
    OS - Windows XP
    IDE - MS Visual C++ 2008 Express Edition

    ASCII stupid question, get a stupid ANSI

  3. #3
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Waterloo, Texas
    >> Unfortunately every time I kill explorer it restarts automatically.

    it's probably a protection mechanism kicking in. why would you stop an operating system file, though? the effects are bound to be undefined (the system might even become unstable).
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
        return std::pow
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;

  4. #4
    Registered User
    Join Date
    Apr 2006
    well here is the question when you use win task manager and end explorer it wont appear until you start it again.

    but when you do the same in c++ for some reason it restarts automatically.

    a hack...? lol

    a good use for it could be log in system which you want to kick in before explorer starts or if the comp is on, the app will need to close explorer and start it again when the username and pass are entered. (by the way im new to c so jsut experimenting and having fun)

    I mean there is an easy way to do it through the reg but thatís only when the comp starts, now the question is while its running how would you do something like that.

  5. #5
    Registered User
    Join Date
    Feb 2006
    There are some things which just aren't supposed to be done. explorer isn't just a process, it's the windows shell. As far as I know, explorer handles all interaction between the OS and other processes, including utilities and applications (not to mention user interactivity) - What you're trying to do is a bit like trying to run MS-DOS with removed. Whatever it is you actually want to do, can probably be done in some other way, which doesn't involve picking apart your OS.

    if you want an OS which you can pick apart, maybe linux would be better

  6. #6
    Registered User
    Join Date
    Apr 2006
    ok so here is a better question lets say you want to make a progr that will run in windows and ask a user for a username and password and will not let the user do anything until they enter that pasword and username?

  7. #7
    Registered User
    Join Date
    Feb 2006
    Yes, this is possible (There used to be a program called WinLock which did exactly that). - in fact, windows can do this itself if you password the screensaver. I couldn't say how you might do it in C++, but I expect there are some MS libraries which will allow you to take advantage of the mechanism which locks the computer. One thing is for sure though, closing explorer.exe is not part of the process

    edit: Check this link -

  8. #8
    Registered User
    Join Date
    Apr 2006
    damn thats exactly what i needed


    now its time to figure out this dll stuff lol

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Killing A Process
    By tommyb05 in forum C Programming
    Replies: 8
    Last Post: 06-01-2009, 06:41 AM
  2. Replies: 3
    Last Post: 10-15-2008, 09:24 AM
  3. Problem with forking a process
    By Unitedroad in forum C Programming
    Replies: 10
    Last Post: 10-04-2007, 01:43 AM
  4. process programming
    By St0rM-MaN in forum Linux Programming
    Replies: 2
    Last Post: 09-15-2007, 07:53 AM
  5. Killing a process.
    By Brian in forum Windows Programming
    Replies: 7
    Last Post: 01-19-2003, 01:36 PM
Website Security Test