USEFUL SIMPLE BATCH FILES WHICH I USE ON DAILY BASIS

USEFUL SIMPLE BATCH FILES WHICH I USE ON DAILY BASIS
Page content

UPDATED ON: 2023-08-21

All batch files are tested under Windows 7 x64.

► SHUTDOWN PUTER

shutdown /p /f

► REBOOT PUTER

shutdown /r /f /t 0

► RESTART AUDIO SERVICE

net stop "AudioSrv"
net start "AudioSrv"

► DISABLE HIBERNATE

powercfg -h off 

► DISABLE/ENABLE LAN INTERFACES

netsh interface set interface name="Local Area Connection" admin=disabled
netsh interface set interface name="Local Area Connection" admin=enabled

Where: Local Area Connection ◄ the name of your network connection

► TERMINATE FROZEN APPLICATIONS

taskkill /F /IM vegas180.exe
wmic process where name="vegas180.exe" call terminate

Vegas is prone to freezing, so good example is here. Second method is more efficient for my workflow.

► START APPLICATION WITH TIMEOUT

ping -n 20 127.0.0.1 > nul
start "Browser" "C:\Program Files\Iceweasel_x64\App\iseweasel.exe"

where n sets delay in seconds.