Solved

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

Posted on 2010-11-26
15
609 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 250 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 250 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Not needed 13 134
x-bar in Google Sheets 2 126
Precision Problem in C++ 7 67
How to  include  stl  library  in  Visual C++  (VS 2012) 5 45
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

732 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