?
Solved

how to reboot system in safe mode with networking in vc++

Posted on 2010-11-26
15
Medium Priority
?
613 Views
Last Modified: 2013-11-20
Hello expert
I want to create a application that reboot the system with networking. how is it possible in c++,vc++.  i alos want to revert back with normal mode. please give me sample if any one or give me your valuable idea. please reply me as soon as possible.
waiting your Response
Thanks
SHIVA
0
Comment
Question by:shivani98
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 3
  • +2
15 Comments
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 1000 total points
ID: 34218725
ExitWindowsEx can be used to shutdown (and reboot) but as for restarting in a 'safe' mode that I don't know how, or even if it is possible.
0
 
LVL 86

Assisted Solution

by:jkr
jkr earned 1000 total points
ID: 34218755
Well, the bad news is, it is not possible by "official" means (and I don't even know any hacks) - see http://msdn.microsoft.com/en-us/library/aa376881%28VS.85%29.aspx ("Shutting Down"), which documents all three ways to shut down Windows via an API.
0
 
LVL 9

Expert Comment

by:Subrat (C++ windows/Linux)
ID: 34218782
I guess there might be a way to reboot with networking by setting some key, value in registry and using ExitWindowsEx () as already advised by AndyAinscow.

Just google the registry key...
0
Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

 

Author Comment

by:shivani98
ID: 34220609
Sir basically i want to edit BOOT>INI file and add the following multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect . how to do it by c++. please give me sample.
Thanks
Shiva
0
 
LVL 9

Expert Comment

by:Subrat (C++ windows/Linux)
ID: 34223909
you need to know file handling in c++. Just google it.
http://www.cplusplus.com/reference/iostream/

Also need to set the permission of the file that you want to modify.
0
 
LVL 9

Expert Comment

by:Subrat (C++ windows/Linux)
ID: 34223918
0
 
LVL 86

Expert Comment

by:jkr
ID: 34224025
You are aware that your advice is more than dangerous? You don NOT WANT to tamper with boot.ini in ANY WAY. Period. Chances are that the system will not boot at all if something goes wrong.
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 34225613
I'd agree with jkr - get it wrong and you have major problems.
If you do want that then at least make certain the disc is formatted with FAT32 (not NTFS) so you could at least boot to floppy / CD and use an editor to put a functional version of boot.ini into place.
0
 

Author Comment

by:shivani98
ID: 34237367
sir basically i want to restart my xp system in safe mode with networking. this is my requuirement. so if you have idea then give me how is it possible? is there any command for xp.  i have already done it by Windows 7 and vista. but i have not done in it xp. so please give me idea.
Thanks for your valuable time
Shiva
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 34237482
>>basically i want to restart my xp system in safe mode with networking.

At the command prompt type in
msconfig then press enter
Select the boot.ini tab
click the checkbox for safe mode
now click the radio for networking
reboot your system
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 34237491
To get into a normal reboot
At the command prompt type in

    * msconfig then press enter


    * Select the boot.ini tab


    * uncheck the checkbox for safe mode    


    * reboot your system

0
 

Author Comment

by:shivani98
ID: 34239463
if possible please send the command. i am not getting you properly.
Waiting your response.
Shiva
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 34239522
You want to reboot YOUR pc in safe mode with networking you now say.

So follow the instructions:

At the command prompt (the little box you can enter a command in when you display the menu at the bottom left of the XP screen - might be called 'run' or similar) type in

    * msconfig then press enter - the config utility starts


    * Select the boot.ini tab - third or fourth tab, called boot.ini


    * click the checkbox for safe mode - about half way down


    * now click the radio for networking - to the right of the 'safemode' checkbox


    * reboot your system
0
 
LVL 40

Expert Comment

by:evilrix
ID: 34824150
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
Suggested Courses

741 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