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

Enable Visual Studio to use more than 2GB of memory

Firefox and Chrome dark mode

Dealing with the morons who built Dell 7710 and RAID