PC Review


Reply
Thread Tools Rate Thread

Disable shutdown confirmation

 
 
Jared Holzman
Guest
Posts: n/a
 
      31st May 2005
Hey All,

I've got a headless embedded device running XPE SP1 and am using the
ACPI Power Button to shutdown the device cleanly when I want it to turn
off. I'm also using Remote Desktop to administer the device, but I've
discovered after I've logger in via Remote Desktop, the power button no
longer appears to shutdown the device. After plugging in a monitor, I've
discovered the reason is that after an RDP login the following dialog
appears on pressing of the power button:

"Other people are logged on to this computer. Shutting down Windows
might cause them to lose data.

Do you want to continue shutting down?"

How do I disable this confirmation?

TIA,
Jared

 
Reply With Quote
 
 
 
 
Slobodan Brcin \(eMVP\)
Guest
Posts: n/a
 
      1st Jun 2005
Jared,

If you are using headless device, have you read and implemented message box interception?

Read this and follow link on the page:
http://msdn.microsoft.com/embedded/c...s/default.aspx

Regards,
Slobodan


"Jared Holzman" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> Hey All,
>
> I've got a headless embedded device running XPE SP1 and am using the
> ACPI Power Button to shutdown the device cleanly when I want it to turn
> off. I'm also using Remote Desktop to administer the device, but I've
> discovered after I've logger in via Remote Desktop, the power button no
> longer appears to shutdown the device. After plugging in a monitor, I've
> discovered the reason is that after an RDP login the following dialog
> appears on pressing of the power button:
>
> "Other people are logged on to this computer. Shutting down Windows
> might cause them to lose data.
>
> Do you want to continue shutting down?"
>
> How do I disable this confirmation?
>
> TIA,
> Jared
>



 
Reply With Quote
 
Jared
Guest
Posts: n/a
 
      3rd Jun 2005
Slobodan,

Thanks! That EnableDefault Response setting solved the problem nicely, now perhaps you can
help me with another one.

My program uses SetConsoleCtrlHandler so it can be notified when the power button is pressed
and clean itself up before the shutdown occurs. Unfortunately this only seems to work some
of the time. Sometimes pushing the power button causes the program to get killed immediately
without notification. This causes a problem as my program uses the watchdog on the CPU card
and this will fire before windows finsihes shutting down resulting in the device resetting
and restarting rather then shutting down as intended. The call to setconsolectrlhandler does
not fail as this would be logged at the console so I'm not sure why the notification doesn't
always work. I am using winlogon and the explorer shell and am starting my program from the
HKLM\Software\Microsoft\Windows\CurrentVersion\Run key.

It usually seems to fail following a system reset rather than a shutdown, of course this
then causes the system to reset the next time resulting in a self perpepuating condition.
I have found that if I beleive this condition has occured and I manually restart the program
from the local console then it will behave correctly. Of course I'm never sure if the
condition has occured until I push the power button and observe what happens, so it could
just be coincidence.

TIA,
Jared

"Slobodan Brcin (eMVP)" wrote:

> Jared,
>
> If you are using headless device, have you read and implemented message box interception?
>
> Read this and follow link on the page:
> http://msdn.microsoft.com/embedded/c...s/default.aspx
>
> Regards,
> Slobodan
>
> "Jared Holzman" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> > Hey All,
> >
> > I've got a headless embedded device running XPE SP1 and am using the
> > ACPI Power Button to shutdown the device cleanly when I want it to turn
> > off. I'm also using Remote Desktop to administer the device, but I've
> > discovered after I've logger in via Remote Desktop, the power button no
> > longer appears to shutdown the device. After plugging in a monitor, I've
> > discovered the reason is that after an RDP login the following dialog
> > appears on pressing of the power button:
> >
> > "Other people are logged on to this computer. Shutting down Windows
> > might cause them to lose data.
> >
> > Do you want to continue shutting down?"
> >
> > How do I disable this confirmation?
> >
> > TIA,
> > Jared
> >


 
Reply With Quote
 
KM
Guest
Posts: n/a
 
      3rd Jun 2005
Jared,

Do you process CTRL_SHUTDOWN_EVENT in your own HandlerRoutine?
Actually, accroding to SDK (http://msdn.microsoft.com/library/de...lerroutine.asp) this
signal is intended to be received only by services. Interactive applications are terminated at logoff, so they are not present when
the system sends this signal. I guess if you make a service that installs its own HandlerRoutine, it should work stable.

You can also try and lower the shutdown range for your current app with SetProcessShutdownParameters API so it get time to process
that signal. (http://msdn.microsoft.com/library/de...parameters.asp)

KM

> My program uses SetConsoleCtrlHandler so it can be notified when the power button is pressed
> and clean itself up before the shutdown occurs. Unfortunately this only seems to work some
> of the time. Sometimes pushing the power button causes the program to get killed immediately
> without notification. This causes a problem as my program uses the watchdog on the CPU card
> and this will fire before windows finsihes shutting down resulting in the device resetting
> and restarting rather then shutting down as intended. The call to setconsolectrlhandler does
> not fail as this would be logged at the console so I'm not sure why the notification doesn't
> always work. I am using winlogon and the explorer shell and am starting my program from the
> HKLM\Software\Microsoft\Windows\CurrentVersion\Run key.
>
> It usually seems to fail following a system reset rather than a shutdown, of course this
> then causes the system to reset the next time resulting in a self perpepuating condition.
> I have found that if I beleive this condition has occured and I manually restart the program
> from the local console then it will behave correctly. Of course I'm never sure if the
> condition has occured until I push the power button and observe what happens, so it could
> just be coincidence.


KM

> "Slobodan Brcin (eMVP)" wrote:
>
>> Jared,
>>
>> If you are using headless device, have you read and implemented message box interception?
>>
>> Read this and follow link on the page:
>> http://msdn.microsoft.com/embedded/c...s/default.aspx
>>
>> Regards,
>> Slobodan
>>
>> "Jared Holzman" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
>> > Hey All,
>> >
>> > I've got a headless embedded device running XPE SP1 and am using the
>> > ACPI Power Button to shutdown the device cleanly when I want it to turn
>> > off. I'm also using Remote Desktop to administer the device, but I've
>> > discovered after I've logger in via Remote Desktop, the power button no
>> > longer appears to shutdown the device. After plugging in a monitor, I've
>> > discovered the reason is that after an RDP login the following dialog
>> > appears on pressing of the power button:
>> >
>> > "Other people are logged on to this computer. Shutting down Windows
>> > might cause them to lose data.
>> >
>> > Do you want to continue shutting down?"
>> >
>> > How do I disable this confirmation?
>> >
>> > TIA,
>> > Jared
>> >

>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How do I disable delete confirmation? Stefan Blom Microsoft Word Document Management 0 23rd Jan 2007 02:29 PM
Disable clipboard confirmation =?Utf-8?B?aG1t?= Microsoft Excel Programming 2 22nd Nov 2006 02:30 PM
Need to disable a confirmation =?Utf-8?B?TGFyZTI=?= Microsoft Word Document Management 2 14th Mar 2006 12:41 PM
Re: shutdown without confirmation MJ@MJ.com Windows XP Customization 0 1st Jul 2003 05:10 AM
Re: shutdown without confirmation Shenan T. Stanley Windows XP Customization 0 30th Jun 2003 07:05 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:20 PM.