Essential Batch File Commands

To stop a windows service:
net stop <service name>

To kill a process:
taskkill /im "<exe name>"

To kill a remote process:
taskkill /s <server name> /u "<domain>\<user>" /p "<password>" /im "<exe name>"

Change Directory:
cd "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\"

Build a Visual Studio Solution:
devenv %devdir%<solution file name> /build Debug

Build a solution using MSBUILD:
msbuild %devdir%<solution name> /property:WarningLevel=0 /p:Configuration=Debug

Copying files to another folder:
xcopy %devdir%<project folder>\bin\Debug\*.dll "C:\Program Files (x86)\<folder>\" /y /s /q

Starting a Windows Service:
net start <service name>

Showing "press enter to exit":
pause

Comments

Popular posts from this blog

Tutorial: Using Google Cloud Storage from C# and .NET

Late 2008 Macbook only giving 1.5 gb/s speed with 6 gb/s Intel SSD?

Enable Visual Studio to use more than 2GB of memory