English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Using C programming how can i write a programme to shutdown windows?
That is, whats the coding used to create such a programme.
So that when i run the .exe file the system/computer should shutdown.

2007-01-21 21:49:27 · 4 answers · asked by sh 1 in Computers & Internet Programming & Design

note: this is not to harm anyones machine but purely for myself... i like to try interesting programmes like this.

2007-01-21 22:01:26 · update #1

4 answers

Is there any purpose for that other than malice?

2007-01-21 21:54:14 · answer #1 · answered by Nick 2 · 1 0

This can be done, but I'm reluctant to share this knowledge as I suspect you have bad intentions. There are very few circumstances in which you should need to do this. A better solution would be to display a dialog box _requesting_ that the user shuts down - users like to be in control, and they hate it when some arrogant coder thinks they know better.

As I mentioned though, this is entirely possible - search the net and see for yourself.

2007-01-22 06:12:26 · answer #2 · answered by Anonymous · 0 0

1. Go to http://www.planetsourcecode.com
2. Register
3. Search for SHUTDOWN under C/C# category.
3. Search and download any source codes you think helpful to you.

Hope this is the best!

2007-01-22 07:36:54 · answer #3 · answered by Anonymous · 0 0

Windows XP already has a shutdown exe located in C:\Windows\System32\ known as shutdown.exe. Hope this helps.

2007-01-22 06:08:41 · answer #4 · answered by General_Payne 5 · 0 0

fedest.com, questions and answers