system("tskill explorer")???
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 14 of 14

Thread: system("tskill explorer")???

  1. #1
    Join Date
    Sep 2008
    Location
    Novi Sad
    Posts
    5

    Question system("tskill explorer")???

    I tried to terminate explorer.exe with "system("tskill explorer")" but after few seconds everything comes back. When I close it from "Task Manager" it stays closed. Is there a way to close it for good from my program?
    Last edited by Pajsh; September 19th, 2008 at 11:38 AM.

  2. #2
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Fairfax, VA
    Posts
    10,888

    Re: system("tskill explorer")???

    Um, explorer.exe is your desktop environment, is it not? Why would you want to close that?

  3. #3
    Join Date
    Sep 2008
    Location
    Novi Sad
    Posts
    5

    Re: system("tskill explorer")???

    I want my application to be only available. It's an application for Internet caffes.

  4. #4
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Fairfax, VA
    Posts
    10,888

    Re: system("tskill explorer")???

    That's typically an OS-level restriction, not application-level.

    I don't know what support Windows has for it (must be some). OSX calls this concept the "Simple Finder".

  5. #5
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: system("tskill explorer")???

    Quote Originally Posted by Pajsh
    I want my application to be only available. It's an application for Internet caffes.
    The explorer is the core of your desktop. That's why it will ALWAYS come back after you killed it. So, killing it is not an option.

    There are 2 other options AFAIK.
    1. Write your own explorer. It is possible and allowed, but it is a BIG job.
    2. Write a application that is full-screen and make sure it will ALWAYS stay full screen.

    Btw, why does it need to be the only app. ?If your problem is the fact that other users can change your system, than there is also a rights system in windows that makes it possible to exclude almost anything except your own app.

  6. #6
    Join Date
    Sep 2008
    Location
    Novi Sad
    Posts
    5

    Re: system("tskill explorer")???

    How can I kill it permanently with "Task Manager" but can not with "Command Prompt"?

  7. #7
    Join Date
    Sep 2008
    Location
    Novi Sad
    Posts
    5

    Re: system("tskill explorer")???

    Quote Originally Posted by Skizmo
    than there is also a rights system in windows that makes it possible to exclude almost anything except your own app.
    If you could explain it more, please.

  8. #8
    Join Date
    Mar 2003
    Location
    India {Mumbai};
    Posts
    3,871

    Re: system("tskill explorer")???

    Because TM uses EnumProcess, and OpenProcess to list out all processes. It uses TerminateProcess to terminate the process. TSKILL also internally uses TerminateProcess to kill a process.

    You can disable (I dont know how and where), using Group Policy Editor. Enter gpedit.msc on Run box. There must be some registry setting to disable the explorer.

    But be warned that user may open explorer using task-manager (the TM keys!). So you must disable TM too! Using some application user may open explorer (or task-manager), if File Open/Save dialog-box is supported by application. Yes, implementing tight NTFS security to system folders may prevent this.

    In short, a long way to go!
    My latest article: Explicating the new C++ standard (C++0x)

    Do rate the posts you find useful.

  9. #9
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: system("tskill explorer")???

    Quote Originally Posted by Pajsh
    If you could explain it more, please.
    Windows has users account and policy settings. I must admit I'm not an expert on these things, but I know they exist. You can create a user account (for your standard internet cafe user) with very limited rights, so they can only read and write in 1 directory (download/upload dir). You can limit this account to only run stuff that you allow. As I said, I'm not really an expert, but there is enough info to google for. Your decision should be, am I going to write complex software, or am I going to learn how to use the windows right system. I would advice the last

  10. #10
    Join Date
    Sep 2008
    Location
    Novi Sad
    Posts
    5

    Talking Re: system("tskill explorer")???

    I managed to kill it permanently but in a very stupid way. I made a button with "system("tskill explorer")" when clicked. Then I started the app and pressed it once, explorer died & when he tryed to start again, I pressed the button again & killed him for good. I don't have any use from it, but it was FUN.

  11. #11
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Fairfax, VA
    Posts
    10,888

    Re: system("tskill explorer")???

    When re-launching Explorer after it's forced closed, Windows should really play a "BRAAAAINNS!" audio clip.

    Except I think Microsoft takes itself too seriously for that....

  12. #12
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,202

    Re: system("tskill explorer")???

    Quote Originally Posted by Lindley
    When re-launching Explorer after it's forced closed, Windows should really play a "BRAAAAINNS!" audio clip.

    Except I think Microsoft takes itself too seriously for that....
    Judging from the recent ads from Microsoft, it seems apparent that they don't.

  13. #13
    Join Date
    May 2014
    Posts
    1

    Re: system("tskill explorer")???

    Quote Originally Posted by Pajsh View Post
    I tried to terminate explorer.exe with "system("tskill explorer")" but after few seconds everything comes back. When I close it from "Task Manager" it stays closed. Is there a way to close it for good from my program?
    taskkill /f /im "explorer.exe"

    Should work.

  14. #14
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    3,782

    Re: system("tskill explorer")???

    just killing explorer.exe is not anywhere near enough to being enough to make a usable and safe kiosk type ui.

    You will typically need a special keyboard to prevent (among others) Ctrl+Alt+Del, Alt+F4, Alt+Space and a bunch of other system keys.
    You will need to properly secure your windows via the local policies.

    TBF, depending on what you want to do, there are a bunch of alternative approaches for kiosk/internet cafe apps without trying to get windows to play ball (which isn't easy).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center