how to write a code to shutdown a remote machine in VB

prashantbhuse
prashantbhuse used Ask the Experts™
on
I used a initiatesystemshutdown API but it didn't worked.
what is TOKEN's? Can anybody tell me the use of TOKEN in this code?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
MSDN has the following:

BOOL InitiateSystemShutdown(
  LPTSTR lpMachineName,      // computer name
  LPTSTR lpMessage,          // message to display
  DWORD dwTimeout,           // length of time to display
  BOOL bForceAppsClosed,     // force closed option
  BOOL bRebootAfterShutdown  // reboot option
);

As you can see, there is no parameter called TOKEN. Of course, it could have been aliased in the declare statement, but frankly you'd be better off using some of the scripting interfaces that are available nowadays. For that, you should probably start by following the link twalgrave gave.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in Community Support that this question is:
- points to twalgrave
Please leave any comments here within the
next seven days.
I also recommend "points to twalgrave"
per recommendation.

SpideyMod
Community Support Moderator @Experts Exchange

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial