# Safemode with networking



## newguy2forum (Jul 3, 2010)

I am looking for help in creating a batch file that would allow on click to go into safemode with networking? 

In addition with help in a second batch file that would run a program X meaning the code would change based on the program i needed to run id change the name just need to know how to run a program.


last having it where that batch file goes to a specific site


I am attempted to create a automated virus removal tool.


----------



## TheOutcaste (Aug 8, 2007)

Welcome to TSG!



newguy2forum said:


> I am looking for help in creating a batch file that would allow on click to go into safemode with networking?


What OS? For Win2K, XP, Win2K3 you'd edit the boot.ini file. For Vista and later versions of Windows, you need to edit the BCD Store.
If it's a multi boot system, it could get quite complex, especially if the OS you are in is not the default, or booting to a pre Vista OS and the *Earlier version of Windows* option isn't the default OS


newguy2forum said:


> In addition with help in a second batch file that would run a program X meaning the code would change based on the program i needed to run id change the name just need to know how to run a program.


Just put the program name, or a variable containing the program name, on a line, or use the *Start* command.

```
Set RunThis=Notepad.exe
%RunThis%
```



newguy2forum said:


> last having it where that batch file goes to a specific site


*Start <url>* will open that page in the default browser, i.e. this will open the TechGuy Forums page:

```
Start http://forums.techguy.org
```


----------



## newguy2forum (Jul 3, 2010)

The OS will vary. The concept is that ill be using this to make an automated system for customers to scan their computers. I want it so that a customer clicks and downloads a batch file and thus restart their computer in safemode with networking


----------



## TheOutcaste (Aug 8, 2007)

See this post, it will show you have to add entries to the boot.ini file, should get you started:
http://forums.techguy.org/7243687-post11.html
It adds two safe mode entries for the Default OS to the bottom of the Boot Menu. If you run it a 2nd time, they are removed.
If you want to set Safe Mode as default rather than just adding it so the user can choose it from the menu, it would take a lot more coding, especially if you have a multiboot system.


----------

