Overview
There is enough resources to setting up your Windows 7 Developer workstation for running SPS 2010. On an occasion we may not always run the SharePoint 2010 and the SQL Server on our Win 7 workstation or our lap tops all the time. Here I have been using Batch scripts to on demand Start and Stop quickly SPS 2010 and SQL Server services.
Place the below script in a batch file and run as administrator to start or stop your SharePoint and SQL Services. Not the order or start and stop matters so pay attention.
Make sure you set each of the services to start manually in your Services console so that its the script that controls the service activation.
Below in both the scripts make sure to substitute for your <YourSQLServerInstance> name.
Start Script
net start <YourSQLServerInstance>
net start sptracev4
net start spadminv4
net start w3svc
net start iisadmin
net start sptimerv4
net start SPUserCodeV4
net start SPSearch4
net start OSearch14
Stop Script
net stop W3SVC
net stop IISADMIN
net stop SPSearch4
net stop OSearch14
net stop SPTimerV4
net stop SPUserCodeV4
net stop spadminv4
net stop sptracev4
net stop <YourSQLServerInstance>
Happy Sharepointing….