# Windows 7 SSD optimizer batch script



## deviess (Apr 7, 2010)

Hey, everyone.

I'm a bit of a noob when it comes to batch scripts, but I have an idea...


I am an SSD user and with SSDs, you should always disable certain services and so I do... But, I constantly reformat my computer because I'm a bit OCD and because I hate it when my computer runs even a little slow.

I generally reformat about once every 6 weeks or so. It's been about a 3 month run for me and I couldn't be bothered anymore. So I reformatted over the weekend and I'm now spending god knows how many hours of today sorting out all my programs and services, power options, etc.

Then, an idea popped into my head: create a script file to disable all the services I don't need, edit power options and to install some programs I use all the time.

After some googling of how to disable services in command line, I wrote this:


```
@echo off
echo Running SSD Optimization Program - RSSDOP
vssadmin Resize ShadowStorage /For=C: /On=C: /MaxSize=5GB
echo Done. Press any key to continue...
pause >nul
echo ""
net stop cisvc
echo Done. Press any key to continue...
pause >nul
echo ""
net stop System Restore Services
echo Done. Press any key to continue...
pause >nul
echo ""
net stop defragsvc
echo Done. Press any key to continue...
pause >nul
echo ""
net stop superfetch
echo Done. Press any key to continue...
pause >nul
echo ""
pause
```
The intention was to test it first, hence the pause after each statement, but as soon as I tried it, only the shadowstorage command worked. The rest say that it's not running. (Is there an update in SP1 that automatically does all this stuff if you install to an SSD?)

Anyways, I have a folder on an HDD that has all my commonly used programs, such as windows gadgets, Origin, Steam, drivers etc and I'd REALLY love to be able to install all of them without having to do anything (I use ninite.com for a lot of programs, but it doesn't do all the programs I use, and obviously not service disabling and such.

So... My main question: is this all possible? Or at least partially?

And secondary questions: how would I program it? I would also like to install some applications to different directories than default.

Thanks in advance


----------

