XPe 'shutdown'

L

Larry Waibel

I've built a commandline shell based target with the misc. command line
tools. When I use 'shutdown -s -t 10' from the command line, I get:

The operation completed successfully.
A required privilege is not held by the client.

and the shutdown never happens. What else do I need to do to enable using
the 'shutdown' tool? Thanks!
 
K

KM

Larry,

This is Minlogon image, isn't it?

The problem is known and very old. Basically, the problem is related to Minlogon (you have to explicitly enable required Privilege
level and Winlogon does that but Minlogon doesn't).

Instead you can use either :
xpepm.exe -shutdown ("Power Management Application" component),
fba.exe -shutdown,
your own app.
 
L

Larry Waibel

Yes, Minlogon; I Googled the newsgroup archives but didn't find this; thanks! Now I find
that using 'fba -shutdown' my MFC dialog application doesn't seem to get the
WM_ENDSESSION/OnEndSession. How do I tell if XPe is being shutdown?

From: "KM" <konstmor@nospam_yahoo.com>
Subject: Re: XPe 'shutdown'
Date: Mon, 2 May 2005 15:13:26 -0700
Newsgroups: microsoft.public.windowsxp.embedded

Larry,

This is Minlogon image, isn't it?

The problem is known and very old. Basically, the problem is related to Minlogon (you
have to explicitly enable required Privilege
 
K

KM

Larry,
Yes, Minlogon;

Then you can also use "shutdown -l" (logoff on Minlogon will do the shutdown).
I Googled the newsgroup archives but didn't find this; thanks! Now I find
that using 'fba -shutdown' my MFC dialog application doesn't seem to get the
WM_ENDSESSION/OnEndSession. How do I tell if XPe is being shutdown?

Ahh... That'd be a problem with xpepm/fba since they do "immediate" shutdown that is a direct call to NtShutdownSystem.
You can either broadcast the End Session event from your application code or use ExitWindows[Ex] API call (or
InitiateSystemShutdown) instead of launching the shutdown/xpepm/fba process.

Also, depending on the Minlogon version you are using (SP1/SP1 QFE/SP2) you may or may not get the End Session events at all. But
you can try "SetConsoleCtrlHandler approach". Read these threads:

http://groups-beta.google.com/group...155d7c44bbe/b4c49fdbbb7b4a69#b4c49fdbbb7b4a69

http://groups-beta.google.com/group...74f0994bbf4/d9af694da31252c9#d9af694da31252c9
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top