0

Possible Duplicate:
Windows7 Force boot to Safe mode via API

I want to put a button in my form that when someone click it system restart and go to safe mode.Does anyone how can I do it?

Community
  • 1
  • 1
ahmadali shafiee
  • 4,350
  • 12
  • 56
  • 91
  • 4
    See http://stackoverflow.com/questions/5897922/windows7-force-boot-to-safe-mode-via-api. In particular, check out the MSDN link in the comments. – Jim Mischel Nov 28 '11 at 20:36

1 Answers1

0

You could programmatically set the "boot.ini" switch as described here and then P/Invoke a call to InitateSystemShutdown.

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291