Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

WHAT IS THE RESTART PC CMMAND IN " C"

Status
Not open for further replies.

ronydc

Full Member level 3
Joined
Nov 17, 2005
Messages
166
Helped
4
Reputation
8
Reaction score
3
Trophy points
1,298
Activity points
2,612
hi friends..
can soem one tel me..
what is the REASTART COMMAND to pc . IN "C"?

i mean i find at the end of the many applications that "restert pc now" -- how and what is that command works behind that .?

thanks in advance ..

--Rony
 

there is no such a thing as a REBOOT COMMAND IN C.
The reboot process is an OPERATNG SYSTEM very high PRIVILEGE FUNCTION
Otherwise any virus could do use it .So it dependend what OPERATING SYSTEM you are talking about .Then if you have the SDK ( toolbox) for that OS .For windows is a very expensive thing! .Then you need to READ A LOT of documentation.
Another solution is use an external port to control the power of the PC !
is a poor's man solution!
 

For windows is a very expensive thing!
Windows SDK is basically available for free from MS since many years and included in some way with most today's programming enviroments, e.g. VisualStudio, Borland C-Builder, OpenWatcom, whatever. Windows has an InitiateSystemShutdown API function, that provides the said functionality. Sysinternals also has a simple console application, psshutdown, that allows shutdown and reboot of local or remote Windows PCs without programming - with sufficient user rights.
 

Reboot command is specific to OS.

If you are using Linux system you can use

.....
system("sudo init 6"); OR system ("sudo reboot");

system (); allows you to run system commands on POSIX compliant system.
 

THANKS FRIENDS FOR THE REPLY..

but as i am saying.. it. some different way, i am talking about the situation when we install a new software, it asks us to reboot the pc sometime.. and by clicking on a button we can reboot the PC .
correct .?
i ask .. whts the code behind that button if the application is written in c++..? or or vb .?

i hope this clears my question once again for my friends.

-- Rony
 

I answered this for the case of a Windows application.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top