Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I know you can remotely shutdown a Windows machine with the "shutdown" command line. But I think it's impossible to remotely get a machine into safe mode (with networking). Does anyone know of a way to do this?

share|improve this question
add comment

7 Answers

up vote 7 down vote accepted

If you have admin rights on the remote machine then it's possible.

You need to edit the boot.ini file (usually found on the root of the C: drive)

Open a command prompt on your local machine

type:

EDIT \\MACHINENAME\C$\BOOT.INI

The boot ini file will open which usually looks something like this:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional"  
/noexecute=optin /fastdetect

On the end of the last line you need to add

/safeboot:network

the last line will then read something like

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional"  
/noexecute=optin /fastdetect /safeboot:network

Save the changes and then force a reboot from the command line and it should restart into safe mode with networking. Remember to change the boot.ini file back when you're done!

share|improve this answer
2  
Its also worth mentioning that RDP might not work in safe mode. I haven't tried/tested it myself but I've been told it doesn't work on XP Home. Your mileage may vary. –  KPWINC Aug 17 '09 at 16:05
1  
This doesn't work with Vista/7. Using msconfig.exe works in XP, Vista and 7 (and is easier). –  mivk May 26 '12 at 7:37
add comment

To reboot Windows 7 into safe mode with networking, run msconfig.exe. On the Boot tab, you can select "Safe boot" and there is a checkbox for networking.

I'm not sure if Remote Desktop will run in safe mode. I use TightVNC. To have the TightVNC service start in safe mode, copy it's registry entry to safeboot\network:

REG COPY HKLM\system\CurrentControlSet\services\tvnserver HKLM\system\CurrentControlSet\control\safeboot\network\tvnserver /s /f

Other VNC services can probably be activated in the same way.

share|improve this answer
add comment

Not likely for a workstation machine. You need something that gives you control of the machine itself in order to tell Windows how to boot.

You will have more luck on server hardware as many vendors build in an option to connect to the console remotely.

If you have the option to interactively connect to Windows on the machine, though, you can use MSCONFIG to set the /SAFEBOOT switch in boot.ini, then reboot the machine. Do Start -> Run and type in MSCONFIG, then on the boot.ini tab check /SAFEBOOT under Boot Options and choose which safe mode you want to boot into (in this scenario, NETWORK).

share|improve this answer
add comment

LogMeIn has a safemode reboot option.

share|improve this answer
add comment

This is exactly what HP's integrated lights-out option is for. Editing the boot.ini file won't be much help, since you won't be able to log into the machine, as the RDP service won't run. In case that's an HP server though you can connect directly to it's console via https portal, and also have access to virtual "power button".

share|improve this answer
add comment

That answer above about edit the boot.ini , is nice and all -- EXCEPT....you can't change the boot.ini file...if you follow "Mark's" directions step by step - you hit a brick wall because the boot.ini is read only.

EDIT: And yes....I tested it signed in as an administrator to.

share|improve this answer
3  
So change it.... Right Click ---> Properties and uncheck "read-Only"... If you're in the remote computer's c$ with administrative rights you should have no problem doing that. –  user81808 May 18 '11 at 9:25
add comment

If you hastily chose to modify the BOOT.ini to restart in safe mode with networking, and then restart, you will find that you cannot remotely log in at all. You WILL likely be able to view the boot file \\machinename\C$\boot.ini, but won't be able to modify it because it is read only. You will also not be able to "right-click and uncheck 'read-only' " because you won't be able to navigate to the C$ directory at all. I now have to physically login to this virtual workstation in order to change the boot.ini back. I will never make that mistake again!

share|improve this answer
    
It may feel like a mistake but it could be taken as experience gained, knowhow level up. Next time you will have your failover plans ready? ...and SSH services active, remember WMIC? WMI works perfectly in safe mode, you could for example reboot to normal if there is no activity in safe mode for some period of time. And of course you could use WMI for altering boot process. –  Sampo Sarrala Oct 10 '12 at 18:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.