How to terminate the shell without logging of the current user?

How to terminate the shell without logging of the current user?

Post by Daniel Lohman » Tue, 17 Jun 2003 06:49:27



Hi folks,

I need to close the shell process from my app. However, if you send it
a WM_CLOSE it calls ExitWindows() and logs off the current user. Any
idea how to tell Explorer.exe to terminate without logging of the
current user?

Thanks

Daniel

BTW: On NT4 and Windows 2000 there was a "magic trick" to manually
close the shell by pressing Alt+Shift and Cancel in the Logoff dialog
box. However, this seems not to work any more on XP...

 
 
 

How to terminate the shell without logging of the current user?

Post by David Lownde » Tue, 17 Jun 2003 07:51:11


Quote:>BTW: On NT4 and Windows 2000 there was a "magic trick" to manually
>close the shell by pressing Alt+Shift and Cancel in the Logoff dialog
>box. However, this seems not to work any more on XP...

You have to press Ctrl+Shift+Alt while you click Cancel (or press Esc)
- it still works in XP.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq

 
 
 

How to terminate the shell without logging of the current user?

Post by Jian-Shen Lin[M » Tue, 17 Jun 2003 17:45:23


Ctrl+Shift+Alt  doesn't work for Win2003. Why do you want to terminate the
Explorer.exe?

You can call terminateprocess
TerminateProcess

The TerminateProcess function terminates the specified process and all of
its threads.

Thanks

Jian shen

This posting is provided "AS IS" with no warranties, and confers no rights.

 
 
 

How to terminate the shell without logging of the current user?

Post by David Lownde » Tue, 17 Jun 2003 18:02:34


Quote:>Ctrl+Shift+Alt  doesn't work for Win2003.

It appears to work for me!

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq

 
 
 

How to terminate the shell without logging of the current user?

Post by Daniel Lohman » Tue, 17 Jun 2003 20:01:38




>Ctrl+Shift+Alt  doesn't work for Win2003. Why do you want to terminate the
>Explorer.exe?

Ah. Sad - it was helpful.

I am developing a multi-desktop manager, each desktop running its own
instance of the shell. To close a desktop, all windows have to be
closed on it. Thats what I want to shut down the shell process without
logging of.

Quote:>You can call terminateprocess
>TerminateProcess

Yes, I know. Howerver, that it is the bad and dirty way, cause the
shell then has no chance to update its state in the registry. I am
looking for a variant without using the big gun (TerminateProcess).

Daniel

 
 
 

How to terminate the shell without logging of the current user?

Post by Jim Barr » Wed, 18 Jun 2003 08:07:00



> Why do you want to terminate the Explorer.exe?

I regularly use Ctrl+Shift+Alt+Cancel for debugging purposes.

Quote:> You can call terminateprocess

Yuck!

--
Jim Barry, MVP for Windows SDK
"For bureaucratic reasons, we settled on one issue, weapons of mass
destruction, because it was the one reason everyone could agree on."
Paul Wolfowitz, US Deputy Defence Secretary

 
 
 

How to terminate the shell without logging of the current user?

Post by Jim Barr » Wed, 18 Jun 2003 08:07:37



> >Ctrl+Shift+Alt  doesn't work for Win2003.
> It appears to work for me!

Phew, Jian-Shen Lin had me worried there for a moment!

--
Jim Barry, MVP for Windows SDK
"For bureaucratic reasons, we settled on one issue, weapons of mass
destruction, because it was the one reason everyone could agree on."
Paul Wolfowitz, US Deputy Defence Secretary

 
 
 

How to terminate the shell without logging of the current user?

Post by Jim Barr » Wed, 18 Jun 2003 09:05:27



> Yes, I know. Howerver, that it is the bad and dirty way, cause the
> shell then has no chance to update its state in the registry. I am
> looking for a variant without using the big gun (TerminateProcess).

KB article 137572 suggests posting WM_QUIT to the "Progman" window. However, this is not entirely satisfactory because when Explorer is restarted, it runs all the startup items again, causing loads of windows to pop up. This does not happen with the Ctrl+Shift+Alt trick.

http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B137572

--
Jim Barry, MVP for Windows SDK
"For bureaucratic reasons, we settled on one issue, weapons of mass
destruction, because it was the one reason everyone could agree on."
Paul Wolfowitz, US Deputy Defence Secretary

 
 
 

1. Get user credentials using standart Windows logon box without logging user on

Hi ladies and gentlemen,

  I'm looking for a way to display a standart Windows dialog box to get
username and password from the user in a consistent with Windows UI way. I
found a perfect function for doing it: CredUIPromptForCredentials. But as
though it is documented in MSDN, it doesn't exist in the headers of the
latest .NET Visual Studio (neither WinCred.h, nor credui.lib). Why would
that be?..

  Also that function is for XP and above (.NET Server, for example), but
Microsoft doesn't say anything about whether it's gonna work on Win2000.
Does anybody know anything that performs the same action as
CredUIPromptForCredentials, but in Win2000? Does anybody have WinCred.h and
credui.lib?

  As far as I understand, CredUIPromptForCredentials shows the same dialog
box as MSN Messenger does when it asks you to SignIn. But MSN Messenger also
works under Win2000, so there must be a way to have this functionality under
Win2000?

  Thanks beforehands!

--
Best regards,
  Maksym Schipka
  Senior Software Developer
  Invisimail IOM Ltd

2. !!Help!!

3. Getting PID of current logged user

4. NTP client for NT that runs as a service

5. Re. Users of AEgis Shell 3.0.8....Shell users mailing list.

6. Sharp PC3x00

7. user graphics drawing without prior current image knowledge

8. A first attempt --> Genetic Algorithms.

9. IAS logs - Terminate Cause

10. Add a user group (without a user)

11. Save LOG Clear LOG Save LOG ...

12. NT Terminate User Connection

13. How to terminate telnet when an user power down his PC.