Solved

Remote shutdown using API

Posted on 2003-10-29
5
525 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
ID: 9640395
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
ID: 9640437
u can use WNetUseConnection to programatically log on using API
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 …

832 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