Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 561
  • Last Modified:

Remote shutdown using API

hi,
    i have a cluster of servers using WindowsNT/2k, and need to write utility for remote shutdown using VC and windows API's.
i tried using initiatesystemshutdown but, dosent work for remote servers.
 i need to know what all tasks and functions to write before giving call to initiatesystemshutdown
thanks in advance
kiran
0
kirannapit
Asked:
kirannapit
  • 2
1 Solution
 
bhagyeshtCommented:
To shut down the local computer, the calling process must have the SE_SHUTDOWN_NAME privilege. To shut down a remote computer, the calling process must have the SE_REMOTE_SHUTDOWN_NAME privilege on the remote computer. By default, users can enable the SE_SHUTDOWN_NAME privilege on the computer they are logged onto, and administrators can enable the SE_REMOTE_SHUTDOWN_NAME privilege on remote computers.

u can log on using
net use \\<computername > /user:<username> <password>

normally use the username as administrator
0
 
bhagyeshtCommented:
u can use WNetUseConnection to programatically log on using API
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now