Login Screen instead of Reboot

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all,

the following issue is giving us sleepless nights.

On our Minimalsystems one is able to open a taskmanager via some special key
combo and the "runas" command.
To reboot a machine we coded some small program that sets the appropriate
permissions on the current process and uses the "ExitWindowsEx" function to
do the reboot.

Everything worked fine up to a few days ago. Now it is _sometimes_ the case
that the machine does not reboot but logs out the current user and displays a
login screen.
The issue gets even more strange due to the fact that we use flash disks
with write protection for storage of the OS and its data. After a reboot the
system comes back again in a clean state as it was before. I haven't been
able to reliably reproduce the problem mentionend above.

Does anybody have a clue which setting or anything else might be responsible
for this problem to occur?

If I left out important information please feel free to ask. I will provide
you with the necessary information as soon as possible.

Many thanks and regards
Jens
 
Jens said:
Hello all,

the following issue is giving us sleepless nights.

On our Minimalsystems one is able to open a taskmanager via some special key
combo and the "runas" command.
To reboot a machine we coded some small program that sets the appropriate
permissions on the current process and uses the "ExitWindowsEx" function to
do the reboot.

Everything worked fine up to a few days ago. Now it is _sometimes_ the case
that the machine does not reboot but logs out the current user and displays a
login screen.
The issue gets even more strange due to the fact that we use flash disks
with write protection for storage of the OS and its data. After a reboot the
system comes back again in a clean state as it was before. I haven't been
able to reliably reproduce the problem mentionend above.

Does anybody have a clue which setting or anything else might be responsible
for this problem to occur?

If I left out important information please feel free to ask. I will provide
you with the necessary information as soon as possible.

Many thanks and regards
Jens

Is there any reason you're using your own rebooter rather than xpepm?
 
Adora Belle Dearheart said:
Is there any reason you're using your own rebooter rather than xpepm?

xpepm is not included in our image. Besides we must have the opportunity to
issue a reboot from 3 different programs written by us and ShellExecute is
not an option.
Is there any reason why ExitWindowsEx should not work? Or the other way
round: What is doing xpepm different from ExitWindowsEx?
 
Jens said:
xpepm is not included in our image. Besides we must have the opportunity to
issue a reboot from 3 different programs written by us and ShellExecute is
not an option.
Is there any reason why ExitWindowsEx should not work? Or the other way
round: What is doing xpepm different from ExitWindowsEx?

Not a clue. I don't do the coding here, so anything that involves having
code written is a delay, so I tend to avoid it.
 
Jens,

When ExitWindowsEx fails to reboot the machine do you see anything in Event Log?
Do you set EWX_FORCE flag while calling the API?

If it stopped working suddenly, did you happen to install some custom app(s)/driver(s) recently on your image?

You can try InitiateSystemShutdown API instead.

Or you can use undocumented NtShutdownSystem, although be careful with it as it is not going to do a graceful shutdown.
http://undocumented.ntinternals.net/UserMode/Undocumented Functions/Hardware/NtShutdownSystem.html
 

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

Back
Top