| View previous topic :: View next topic |
| Author |
Message |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Thu Aug 28, 2003 9:49 pm Post subject: AbortSystemShutdown VS. shutdown.exe -a |
|
|
Hi,
Can someone explain the differences between AbortSystemShutdown
and shutdown.exe -a?
I think they might do the same thing but the API didn't work for me
when I tried it, I don't think, unless I was doing something wrong.
Thanks for any pointers.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Fri Aug 29, 2003 10:11 am Post subject: |
|
|
not sure if you already know this or not...shutdown.exe is a xp program that users can use to automate a shutdown...i found lots of information on that little utility by doing a search with google using shutdown.exe as the search term
don't know anything about the api call
serge _________________
|
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Fri Aug 29, 2003 1:27 pm Post subject: |
|
|
Yup I'm using Win XP Professional. Here's the documentation about
using the -a parameter:
| Code: | | -a Abort a system shutdown |
When the system is not shutting down and it is used, it returns the
following:
| Code: | C:\>shutdown -a
Unable to abort the system shutdown because no shutdown was in progress. |
_________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Fri Aug 29, 2003 2:19 pm Post subject: |
|
|
For an app to shutdown the system or stop it the calling process must have the SE_SHUTDOWN_NAME privilege else the command fails. This is for security reasons and is very strict on NT based systems.
So you should get the current privileges of your VDS app and if it does not have proper privilge you should give it by using AdjustTokenPrivileges
API. The path is *quite complex* and involves defining an array within a structure. Somehow I lost interest in that one reason being time constraints.
You can have a look for details:
http://developer.vdsworld.com/viewtopic.php?t=109
FF
I will look up for a working VB code on my HDD if you know VB
Regards _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Fri Aug 29, 2003 2:57 pm Post subject: |
|
|
Thanks CodeScript for your response. I don't need any code, just
was wondering what the difference was.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Fri Aug 29, 2003 6:25 pm Post subject: |
|
|
FF,
There is no difference between the -a switch and AbortSystemShutdown the utility uses the same API. I have built a DLL for this but I never released it because I wanted a better way to perform the Remote shutdown. I have found shell script that can do this just I have not had time to translate it to a DLL for us to use... _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
|