Reboot Windows 2003 Server With ExitWindowsEx

C

Condor

Hi There. There is a lot of post about reboot windows.
I need to reboot my server with a ASPX application and the code must
run on server side.
Y do all that people says: (open a process token, Ajusting token
privileges, etc...)
The question is that the code works fine in Windows XP but not In
Windows 2003 Server.

Theres someone that know how to do the same in Win 2003 Server ? Is
there a security issue that i missing ?
 
J

Josip Medved

Hi There. There is a lot of post about reboot windows.
I need to reboot my server with a ASPX application and the code must
run on server side.
Y do all that people says: (open a process token, Ajusting token
privileges, etc...)
The question is that the code works fine in Windows XP but not In
Windows 2003 Server.
Theres someone that know how to do the same in Win 2003 Server ? Is
there a security issue that i missing ?

Here is full code for that in VB60. Just convert declarations
to .NET syntax. Part that you need is in AdjustToken sub.
Let me know if you need further help.

http://www.jmedved.com?findbyname=shutdown
 

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