Solved

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

Posted on 2010-11-26
15
600 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
  • 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 8

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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

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 8

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 8

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Window placement 17 82
NotAlone Challenge 20 83
Arduino EDI - Programming language 3 94
Problem to App source 6 40
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

772 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