Click here to Skip to main content
15,893,668 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to block shutdown/logoff in Windows Vista? Pin
turbosupramk31-Dec-10 3:07
turbosupramk31-Dec-10 3:07 
GeneralRe: How to block shutdown/logoff in Windows Vista? Pin
Pete O'Hanlon1-Dec-10 3:30
mvePete O'Hanlon1-Dec-10 3:30 
GeneralRe: How to block shutdown/logoff in Windows Vista? Pin
turbosupramk32-Dec-10 9:44
turbosupramk32-Dec-10 9:44 
GeneralRe: How to block shutdown/logoff in Windows Vista? Pin
Pete O'Hanlon3-Dec-10 11:11
mvePete O'Hanlon3-Dec-10 11:11 
QuestionRebooting to safe mode... Pin
Jacob D Dixon30-Nov-10 7:08
Jacob D Dixon30-Nov-10 7:08 
AnswerRe: Rebooting to safe mode... Pin
Henry Minute30-Nov-10 7:52
Henry Minute30-Nov-10 7:52 
GeneralRe: Rebooting to safe mode... Pin
Jacob D Dixon30-Nov-10 8:20
Jacob D Dixon30-Nov-10 8:20 
GeneralRe: Rebooting to safe mode... Pin
Henry Minute30-Nov-10 9:26
Henry Minute30-Nov-10 9:26 
Jacob D Dixon wrote:
Note:
I guess I could try opening reflector and finding this code and how they are doing it. Do you know if this is legal for me to do?


Probably not, if you use the code directly. Although if it's not obfuscated there is no harm in just having a look, to satisfy your curiosity.

I used to do a similar thing back in the DOS days with the Autoexec.bat and Config.sys for some programs (Games mostly) that required non standard settings.

In your situation, make a copy of Boot.ini, rename it Boot.ini.safe (safe mode), or similar. Make another copy and rename it Boot.ini.std (standard mode). Modify the .safe file to include the /SAFEBOOT stuff.

BTW: Try the next bit out manually first, to make sure that it works.

I used to do the next bit using batch files, you could do the same, or write a small app to do it.
1. Delete Boot.ini
2. Depending on whether you're going from standard to safe, or the other way, copy the Boot.ini.safe/Boot.ini.std file as Boot.ini.
4. When going to Safe mode add the entry to Runonce in the registry to run the app/batch that prepares for standard boot on next restart.
3. Restart.

[Edit]
Just discovered that step 4, above won't work See Notes section in this[^].

Hmmm and it seemed like such a good idea. Frown | :(
[/Edit]
Henry Minute

Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”

GeneralRe: Rebooting to safe mode... Pin
Jacob D Dixon1-Dec-10 3:44
Jacob D Dixon1-Dec-10 3:44 
GeneralRe: Rebooting to safe mode... Pin
Rose WiFiTech & Electronics Library Research Cen26-Oct-11 5:36
Rose WiFiTech & Electronics Library Research Cen26-Oct-11 5:36 
Questionc# Webbrowser control with frames Pin
Franklin Smith30-Nov-10 2:03
Franklin Smith30-Nov-10 2:03 
AnswerRe: c# Webbrowser control with frames Pin
Henry Minute30-Nov-10 4:09
Henry Minute30-Nov-10 4:09 
GeneralRe: c# Webbrowser control with frames Pin
Franklin Smith30-Nov-10 13:07
Franklin Smith30-Nov-10 13:07 
QuestionC# debug in vs2010 Pin
polycom12330-Nov-10 1:59
polycom12330-Nov-10 1:59 
AnswerRe: C# debug in vs2010 Pin
Luc Pattyn30-Nov-10 3:03
sitebuilderLuc Pattyn30-Nov-10 3:03 
GeneralRe: C# debug in vs2010 Pin
polycom12330-Nov-10 18:39
polycom12330-Nov-10 18:39 
QuestionCSV file logging data on timer event Pin
cages29-Nov-10 10:26
cages29-Nov-10 10:26 
QuestionRe: CSV file logging data on timer event Pin
Luc Pattyn29-Nov-10 10:28
sitebuilderLuc Pattyn29-Nov-10 10:28 
AnswerRe: CSV file logging data on timer event Pin
cages29-Nov-10 10:37
cages29-Nov-10 10:37 
AnswerRe: CSV file logging data on timer event Pin
Luc Pattyn29-Nov-10 10:47
sitebuilderLuc Pattyn29-Nov-10 10:47 
AnswerRe: CSV file logging data on timer event Pin
PIEBALDconsult29-Nov-10 11:08
mvePIEBALDconsult29-Nov-10 11:08 
AnswerRe: CSV file logging data on timer event Pin
Pete O'Hanlon29-Nov-10 11:13
mvePete O'Hanlon29-Nov-10 11:13 
QuestionPrinting from a C# application Pin
memorexr29-Nov-10 8:58
memorexr29-Nov-10 8:58 
AnswerRe: Printing from a C# application Pin
Henry Minute29-Nov-10 10:32
Henry Minute29-Nov-10 10:32 
GeneralRe: Printing from a C# application Pin
Luc Pattyn29-Nov-10 11:09
sitebuilderLuc Pattyn29-Nov-10 11:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.