Solved

Remote shutdown using API

Posted on 2003-10-29
5
503 Views
Last Modified: 2013-11-13
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
Comment
Question by:kirannapit
  • 2
5 Comments
 
LVL 9

Accepted Solution

by:
bhagyesht earned 75 total points
Comment Utility
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
 
LVL 9

Expert Comment

by:bhagyesht
Comment Utility
u can use WNetUseConnection to programatically log on using API
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

This is about my first experience with programming Arduino.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now