DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: IDEA: explorer.exe auto-restarter  (Read 22,904 times)

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
IDEA: explorer.exe auto-restarter
« on: December 07, 2005, 09:37 PM »
Hi,

I'd like to add code to my AHK script to always restart explorer.exe maybe 20 seconds after it died or after I had to kill it. Windows should restart it automatically, but often does not  :(

What do you think? And what would be the best way to do this?
Thank you.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: IDEA: explorer.exe auto-restarter
« Reply #1 on: December 07, 2005, 09:40 PM »
wasn't there a coding snack written for this (kansas): http://www.donationcoder.com/CodingSnacks/index.php

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
Re: IDEA: explorer.exe auto-restarter
« Reply #2 on: December 07, 2005, 09:46 PM »
No, not really, it has a quite different purpose:

Code
; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.0
; Author:         edvard_mcfly
;
; Script Name:
; Kansas (as in, "There's no place like Home")
;
; Script Function:
;	Reverts to Explorer as your default shell and quickly logs off 
; 	in case your alternate shell crashes or misbehaves.
; 
; ----------------------------------------------------------------------------

; Script Start

RegWrite ("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\IniFileMapping\system.ini\boot","Shell","REG_SZ","SYS:Microsoft\Windows NT\CurrentVersion\Winlogon")
RegWrite ("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon","Shell","REG_SZ","explorer.exe")
RegWrite ("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon","Shell","REG_SZ","explorer.exe")
RegWrite ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer","DesktopProcess","REG_DWord","0")
RegWrite ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer","BrowseNewProcess","REG_SZ","no")

Shutdown (0)

; Fi
Thank you.

PhilKC

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 117
    • Coding Snacks
Re: IDEA: explorer.exe auto-restarter
« Reply #3 on: December 08, 2005, 10:24 AM »
I'd like to add code to my AHK script to always restart explorer.exe maybe 20 seconds after it died or after I had to kill it. Windows should restart it automatically, but often does not  :(

What do you think? And what would be the best way to do this?

Well, XP? use

TSKILL Explorer

And windows will always restart it...

Other Windows based systems? Download TSKILL and use the above method :P

Edit: WTF, why is the : P smiley so messed up?

PhilKC
It's not a bug, it's an undocumented and unexplainable feature.
Stick it on your site:
« Last Edit: December 08, 2005, 10:32 AM by PhilKC »

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
Re: IDEA: explorer.exe auto-restarter
« Reply #4 on: December 08, 2005, 11:22 AM »
I'd like to add code to my AHK script to always restart explorer.exe maybe 20 seconds after it died or after I had to kill it. Windows should restart it automatically, but often does not  :(

What do you think? And what would be the best way to do this?

Well, XP? use

TSKILL Explorer

And windows will always restart it...

Other Windows based systems? Download TSKILL and use the above method
Hmm, where could I download this? Couldn't find it with Google...  :(
Thank you.

skywalka

  • Member
  • Joined in 2005
  • **
  • Posts: 254
Re: IDEA: explorer.exe auto-restarter
« Reply #5 on: December 15, 2005, 07:11 AM »
Maybe it's a run command or something?  I'd like 2 know more also.

I actually know a little bit about this!  When U kill the main Explorer thread, U can type "explorer" in the "File - New Task (Run)" menu on the Task Manager.  But if there is a "file browser" version of Explorer open 4 some idiotic reason Windows opens yet another "file browser" version.  Which is quite useless.  If you kill all other explorer threads also then you can restart the main system tray thread.

I haven't wasted my time going 2 the Microsoft website looking 4 help on this.  I'm sure the response would just be "Micorsoft have confirmed this to be a problem with Windows".  They certainly have a poor commitment 2 their paying customers.

« Last Edit: December 15, 2005, 07:13 AM by skywalka »

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,073
    • Cody Award
    • Furry Fandom Badge - Furry Fandom
Re: IDEA: explorer.exe auto-restarter
« Reply #6 on: December 15, 2005, 10:32 AM »
Open a DOS window, put it in a batch file or Start>RUN

skywalka

  • Member
  • Joined in 2005
  • **
  • Posts: 254
Re: IDEA: explorer.exe auto-restarter
« Reply #7 on: December 15, 2005, 12:02 PM »
OK.  Thanx.

What is TSKILL?

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,073
    • Cody Award
    • Furry Fandom Badge - Furry Fandom
Re: IDEA: explorer.exe auto-restarter
« Reply #8 on: December 15, 2005, 01:01 PM »
Terminal Services KILL - it is part of WindowsXP

Goto Start > Help and Support Centre and type TSKILL in the search box to get the full set of options available.

At the bottom you will see a link to "Related Topics" if click it pops up a menu with "Command Line Reference A-Z" which will give you all the possible command line programmes supplied as standard with Windows XP and their full syntax.

PhilKC

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 117
    • Coding Snacks
Re: IDEA: explorer.exe auto-restarter
« Reply #9 on: December 15, 2005, 01:10 PM »
TSKILL link:

http://bluescreenofdeath.co.uk/Programs/TSKILL.exe

<3 My new domain

Put it in system32 and it should be runnable from the command promt...

PhilKC
It's not a bug, it's an undocumented and unexplainable feature.
Stick it on your site:
« Last Edit: December 15, 2005, 01:14 PM by PhilKC »

skywalka

  • Member
  • Joined in 2005
  • **
  • Posts: 254
Re: IDEA: explorer.exe auto-restarter
« Reply #10 on: December 15, 2005, 01:13 PM »
Thanx Carol.

Phil, is that the TSKill that comes with XP.

PhilKC

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 117
    • Coding Snacks
Re: IDEA: explorer.exe auto-restarter
« Reply #11 on: December 15, 2005, 01:14 PM »
Phil, is that the TSKill that comes with XP.

Yesum...

PhilKC
It's not a bug, it's an undocumented and unexplainable feature.
Stick it on your site:

Original address: https://www.donationcoder.com/forum/index.php?topic=1748.0