Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Batch files for shutting apps?
New Posts  All Forums:Forum Nav:

Batch files for shutting apps?

post #1 of 17
Thread Starter 
How would I do this? I already have one to shut down my PC, but say I want to keep my PC on, but make the video stop after a certain amount of time(after I'm asleep). Is there a way to shut down that .exe and possibly a few others?

Thanks in advance!
me setup
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD X2 4600 MSI K8N Neo4 Platinum BFG 7950GT OC 256mb 2x1 gb OCZ Performance DDR400 
Hard DriveOSMonitorKeyboard
Samsung 80 GB, Maxtor 300 Windows XP Profession SP2 Acer 19', Proview 15' LCD G15 
PowerCaseMouseMouse Pad
OCZ GameXtreme 600W Thermaltake Soprano Logitech MX518 SteelPad 5L 
  hide details  
Reply
me setup
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD X2 4600 MSI K8N Neo4 Platinum BFG 7950GT OC 256mb 2x1 gb OCZ Performance DDR400 
Hard DriveOSMonitorKeyboard
Samsung 80 GB, Maxtor 300 Windows XP Profession SP2 Acer 19', Proview 15' LCD G15 
PowerCaseMouseMouse Pad
OCZ GameXtreme 600W Thermaltake Soprano Logitech MX518 SteelPad 5L 
  hide details  
Reply
post #2 of 17
well thiers tools in windows called taskkill the bat could run. And have Scheduled Tasks run it at a certain time. A simple bat would be change the filename to ones you need.

@echo off
taskkill /IM notepad.exe
SABERWOLF
(18 items)
 
XEON-WOLF
(18 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i7-6800K MSI X99A GAMING PRO CARBON EVGA GTX 1080 FTW Hydro Copper G.SKILL TridentZ Series 
Hard DriveCoolingCoolingCooling
Samsung EVO 850 500 EK-SBAY Dual DDC 3.2 PWM Serial Alphacool NexXxoS ST30 Full Copper Radiator 360 Hardware Labs Black Ice SR2 Multiport Black Car... 
CoolingCoolingOSMonitor
EK-CoolStream RAD XTC 420 koolance 380i Windows 10 Pro ASUS VW246H Black 24" 2ms 
PowerCaseMouseAudio
SeaSonic M12D SS-850 850W  Thermaltake core x71 CM Storm Sentinel Advance II Corsair Void 
CPUMotherboardGraphicsRAM
X5675@4400 1.344 ASUS P6X58D-E XfX RX480 RS F3-12800CL7T-6GBPI 6-7-6-21 1T 
RAMHard DriveHard DriveHard Drive
F3-12800CL9S-4GBRL WDC WD1001FALS-00J7B1 ST31000340AS WDC WD7500AAKS-00RBA0 
Hard DriveOptical DriveCoolingOS
Hitachi HDS723020BLA642 ihas 624-A SilverStone Heligon HE01 windows 10 64 Pro 
MonitorPowerCase
Vizio 42inch lcd tv CORSAIR CMPSU-950TX Modded Rocketfish 
  hide details  
Reply
SABERWOLF
(18 items)
 
XEON-WOLF
(18 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i7-6800K MSI X99A GAMING PRO CARBON EVGA GTX 1080 FTW Hydro Copper G.SKILL TridentZ Series 
Hard DriveCoolingCoolingCooling
Samsung EVO 850 500 EK-SBAY Dual DDC 3.2 PWM Serial Alphacool NexXxoS ST30 Full Copper Radiator 360 Hardware Labs Black Ice SR2 Multiport Black Car... 
CoolingCoolingOSMonitor
EK-CoolStream RAD XTC 420 koolance 380i Windows 10 Pro ASUS VW246H Black 24" 2ms 
PowerCaseMouseAudio
SeaSonic M12D SS-850 850W  Thermaltake core x71 CM Storm Sentinel Advance II Corsair Void 
CPUMotherboardGraphicsRAM
X5675@4400 1.344 ASUS P6X58D-E XfX RX480 RS F3-12800CL7T-6GBPI 6-7-6-21 1T 
RAMHard DriveHard DriveHard Drive
F3-12800CL9S-4GBRL WDC WD1001FALS-00J7B1 ST31000340AS WDC WD7500AAKS-00RBA0 
Hard DriveOptical DriveCoolingOS
Hitachi HDS723020BLA642 ihas 624-A SilverStone Heligon HE01 windows 10 64 Pro 
MonitorPowerCase
Vizio 42inch lcd tv CORSAIR CMPSU-950TX Modded Rocketfish 
  hide details  
Reply
post #3 of 17
Thread Starter 
Say I wanted to shut down VLC.exe after 2 hours (7200 seconds)

How would I do that?(it's 1:22 am and I'm just so out of it...)
me setup
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD X2 4600 MSI K8N Neo4 Platinum BFG 7950GT OC 256mb 2x1 gb OCZ Performance DDR400 
Hard DriveOSMonitorKeyboard
Samsung 80 GB, Maxtor 300 Windows XP Profession SP2 Acer 19', Proview 15' LCD G15 
PowerCaseMouseMouse Pad
OCZ GameXtreme 600W Thermaltake Soprano Logitech MX518 SteelPad 5L 
  hide details  
Reply
me setup
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD X2 4600 MSI K8N Neo4 Platinum BFG 7950GT OC 256mb 2x1 gb OCZ Performance DDR400 
Hard DriveOSMonitorKeyboard
Samsung 80 GB, Maxtor 300 Windows XP Profession SP2 Acer 19', Proview 15' LCD G15 
PowerCaseMouseMouse Pad
OCZ GameXtreme 600W Thermaltake Soprano Logitech MX518 SteelPad 5L 
  hide details  
Reply
post #4 of 17
but problem lies in getting it to run at a certain time Its also 1:24am here to.

@echo off
taskkill /IM vlc.exe
SABERWOLF
(18 items)
 
XEON-WOLF
(18 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i7-6800K MSI X99A GAMING PRO CARBON EVGA GTX 1080 FTW Hydro Copper G.SKILL TridentZ Series 
Hard DriveCoolingCoolingCooling
Samsung EVO 850 500 EK-SBAY Dual DDC 3.2 PWM Serial Alphacool NexXxoS ST30 Full Copper Radiator 360 Hardware Labs Black Ice SR2 Multiport Black Car... 
CoolingCoolingOSMonitor
EK-CoolStream RAD XTC 420 koolance 380i Windows 10 Pro ASUS VW246H Black 24" 2ms 
PowerCaseMouseAudio
SeaSonic M12D SS-850 850W  Thermaltake core x71 CM Storm Sentinel Advance II Corsair Void 
CPUMotherboardGraphicsRAM
X5675@4400 1.344 ASUS P6X58D-E XfX RX480 RS F3-12800CL7T-6GBPI 6-7-6-21 1T 
RAMHard DriveHard DriveHard Drive
F3-12800CL9S-4GBRL WDC WD1001FALS-00J7B1 ST31000340AS WDC WD7500AAKS-00RBA0 
Hard DriveOptical DriveCoolingOS
Hitachi HDS723020BLA642 ihas 624-A SilverStone Heligon HE01 windows 10 64 Pro 
MonitorPowerCase
Vizio 42inch lcd tv CORSAIR CMPSU-950TX Modded Rocketfish 
  hide details  
Reply
SABERWOLF
(18 items)
 
XEON-WOLF
(18 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i7-6800K MSI X99A GAMING PRO CARBON EVGA GTX 1080 FTW Hydro Copper G.SKILL TridentZ Series 
Hard DriveCoolingCoolingCooling
Samsung EVO 850 500 EK-SBAY Dual DDC 3.2 PWM Serial Alphacool NexXxoS ST30 Full Copper Radiator 360 Hardware Labs Black Ice SR2 Multiport Black Car... 
CoolingCoolingOSMonitor
EK-CoolStream RAD XTC 420 koolance 380i Windows 10 Pro ASUS VW246H Black 24" 2ms 
PowerCaseMouseAudio
SeaSonic M12D SS-850 850W  Thermaltake core x71 CM Storm Sentinel Advance II Corsair Void 
CPUMotherboardGraphicsRAM
X5675@4400 1.344 ASUS P6X58D-E XfX RX480 RS F3-12800CL7T-6GBPI 6-7-6-21 1T 
RAMHard DriveHard DriveHard Drive
F3-12800CL9S-4GBRL WDC WD1001FALS-00J7B1 ST31000340AS WDC WD7500AAKS-00RBA0 
Hard DriveOptical DriveCoolingOS
Hitachi HDS723020BLA642 ihas 624-A SilverStone Heligon HE01 windows 10 64 Pro 
MonitorPowerCase
Vizio 42inch lcd tv CORSAIR CMPSU-950TX Modded Rocketfish 
  hide details  
Reply
post #5 of 17
Thread Starter 
Is there anyway to put a timer on this?

taskkill /IM vlc.exe
me setup
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD X2 4600 MSI K8N Neo4 Platinum BFG 7950GT OC 256mb 2x1 gb OCZ Performance DDR400 
Hard DriveOSMonitorKeyboard
Samsung 80 GB, Maxtor 300 Windows XP Profession SP2 Acer 19', Proview 15' LCD G15 
PowerCaseMouseMouse Pad
OCZ GameXtreme 600W Thermaltake Soprano Logitech MX518 SteelPad 5L 
  hide details  
Reply
me setup
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD X2 4600 MSI K8N Neo4 Platinum BFG 7950GT OC 256mb 2x1 gb OCZ Performance DDR400 
Hard DriveOSMonitorKeyboard
Samsung 80 GB, Maxtor 300 Windows XP Profession SP2 Acer 19', Proview 15' LCD G15 
PowerCaseMouseMouse Pad
OCZ GameXtreme 600W Thermaltake Soprano Logitech MX518 SteelPad 5L 
  hide details  
Reply
post #6 of 17
Umm, just a idea, why not just have it do something to waste time? Ie. you want to waste 7200 seconds, have it ping 127.0.0.1 7200 times and then run the kill command?
post #7 of 17
my brain aint thinking right now i know their is just cant thk of it back in old days id ping 127.0.0.1 -t 60000 or somthing.
SABERWOLF
(18 items)
 
XEON-WOLF
(18 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i7-6800K MSI X99A GAMING PRO CARBON EVGA GTX 1080 FTW Hydro Copper G.SKILL TridentZ Series 
Hard DriveCoolingCoolingCooling
Samsung EVO 850 500 EK-SBAY Dual DDC 3.2 PWM Serial Alphacool NexXxoS ST30 Full Copper Radiator 360 Hardware Labs Black Ice SR2 Multiport Black Car... 
CoolingCoolingOSMonitor
EK-CoolStream RAD XTC 420 koolance 380i Windows 10 Pro ASUS VW246H Black 24" 2ms 
PowerCaseMouseAudio
SeaSonic M12D SS-850 850W  Thermaltake core x71 CM Storm Sentinel Advance II Corsair Void 
CPUMotherboardGraphicsRAM
X5675@4400 1.344 ASUS P6X58D-E XfX RX480 RS F3-12800CL7T-6GBPI 6-7-6-21 1T 
RAMHard DriveHard DriveHard Drive
F3-12800CL9S-4GBRL WDC WD1001FALS-00J7B1 ST31000340AS WDC WD7500AAKS-00RBA0 
Hard DriveOptical DriveCoolingOS
Hitachi HDS723020BLA642 ihas 624-A SilverStone Heligon HE01 windows 10 64 Pro 
MonitorPowerCase
Vizio 42inch lcd tv CORSAIR CMPSU-950TX Modded Rocketfish 
  hide details  
Reply
SABERWOLF
(18 items)
 
XEON-WOLF
(18 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i7-6800K MSI X99A GAMING PRO CARBON EVGA GTX 1080 FTW Hydro Copper G.SKILL TridentZ Series 
Hard DriveCoolingCoolingCooling
Samsung EVO 850 500 EK-SBAY Dual DDC 3.2 PWM Serial Alphacool NexXxoS ST30 Full Copper Radiator 360 Hardware Labs Black Ice SR2 Multiport Black Car... 
CoolingCoolingOSMonitor
EK-CoolStream RAD XTC 420 koolance 380i Windows 10 Pro ASUS VW246H Black 24" 2ms 
PowerCaseMouseAudio
SeaSonic M12D SS-850 850W  Thermaltake core x71 CM Storm Sentinel Advance II Corsair Void 
CPUMotherboardGraphicsRAM
X5675@4400 1.344 ASUS P6X58D-E XfX RX480 RS F3-12800CL7T-6GBPI 6-7-6-21 1T 
RAMHard DriveHard DriveHard Drive
F3-12800CL9S-4GBRL WDC WD1001FALS-00J7B1 ST31000340AS WDC WD7500AAKS-00RBA0 
Hard DriveOptical DriveCoolingOS
Hitachi HDS723020BLA642 ihas 624-A SilverStone Heligon HE01 windows 10 64 Pro 
MonitorPowerCase
Vizio 42inch lcd tv CORSAIR CMPSU-950TX Modded Rocketfish 
  hide details  
Reply
post #8 of 17
Thread Starter 
I'm doing this by right clicking on desktop and then new>shortcut.

What would I key in?

ping 127.0.0.1 -t 7200 taskkill /IM vlc.exe
me setup
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD X2 4600 MSI K8N Neo4 Platinum BFG 7950GT OC 256mb 2x1 gb OCZ Performance DDR400 
Hard DriveOSMonitorKeyboard
Samsung 80 GB, Maxtor 300 Windows XP Profession SP2 Acer 19', Proview 15' LCD G15 
PowerCaseMouseMouse Pad
OCZ GameXtreme 600W Thermaltake Soprano Logitech MX518 SteelPad 5L 
  hide details  
Reply
me setup
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD X2 4600 MSI K8N Neo4 Platinum BFG 7950GT OC 256mb 2x1 gb OCZ Performance DDR400 
Hard DriveOSMonitorKeyboard
Samsung 80 GB, Maxtor 300 Windows XP Profession SP2 Acer 19', Proview 15' LCD G15 
PowerCaseMouseMouse Pad
OCZ GameXtreme 600W Thermaltake Soprano Logitech MX518 SteelPad 5L 
  hide details  
Reply
post #9 of 17
no you open a text file and put in this then save it and rename it to say sleep.bat

@echo off
ping 127.0.0.1 -t 7200
taskkill /IM vlc.exe
SABERWOLF
(18 items)
 
XEON-WOLF
(18 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i7-6800K MSI X99A GAMING PRO CARBON EVGA GTX 1080 FTW Hydro Copper G.SKILL TridentZ Series 
Hard DriveCoolingCoolingCooling
Samsung EVO 850 500 EK-SBAY Dual DDC 3.2 PWM Serial Alphacool NexXxoS ST30 Full Copper Radiator 360 Hardware Labs Black Ice SR2 Multiport Black Car... 
CoolingCoolingOSMonitor
EK-CoolStream RAD XTC 420 koolance 380i Windows 10 Pro ASUS VW246H Black 24" 2ms 
PowerCaseMouseAudio
SeaSonic M12D SS-850 850W  Thermaltake core x71 CM Storm Sentinel Advance II Corsair Void 
CPUMotherboardGraphicsRAM
X5675@4400 1.344 ASUS P6X58D-E XfX RX480 RS F3-12800CL7T-6GBPI 6-7-6-21 1T 
RAMHard DriveHard DriveHard Drive
F3-12800CL9S-4GBRL WDC WD1001FALS-00J7B1 ST31000340AS WDC WD7500AAKS-00RBA0 
Hard DriveOptical DriveCoolingOS
Hitachi HDS723020BLA642 ihas 624-A SilverStone Heligon HE01 windows 10 64 Pro 
MonitorPowerCase
Vizio 42inch lcd tv CORSAIR CMPSU-950TX Modded Rocketfish 
  hide details  
Reply
SABERWOLF
(18 items)
 
XEON-WOLF
(18 items)
 
 
CPUMotherboardGraphicsRAM
Intel Core i7-6800K MSI X99A GAMING PRO CARBON EVGA GTX 1080 FTW Hydro Copper G.SKILL TridentZ Series 
Hard DriveCoolingCoolingCooling
Samsung EVO 850 500 EK-SBAY Dual DDC 3.2 PWM Serial Alphacool NexXxoS ST30 Full Copper Radiator 360 Hardware Labs Black Ice SR2 Multiport Black Car... 
CoolingCoolingOSMonitor
EK-CoolStream RAD XTC 420 koolance 380i Windows 10 Pro ASUS VW246H Black 24" 2ms 
PowerCaseMouseAudio
SeaSonic M12D SS-850 850W  Thermaltake core x71 CM Storm Sentinel Advance II Corsair Void 
CPUMotherboardGraphicsRAM
X5675@4400 1.344 ASUS P6X58D-E XfX RX480 RS F3-12800CL7T-6GBPI 6-7-6-21 1T 
RAMHard DriveHard DriveHard Drive
F3-12800CL9S-4GBRL WDC WD1001FALS-00J7B1 ST31000340AS WDC WD7500AAKS-00RBA0 
Hard DriveOptical DriveCoolingOS
Hitachi HDS723020BLA642 ihas 624-A SilverStone Heligon HE01 windows 10 64 Pro 
MonitorPowerCase
Vizio 42inch lcd tv CORSAIR CMPSU-950TX Modded Rocketfish 
  hide details  
Reply
post #10 of 17
Quote:
Originally Posted by panzer126 View Post
I'm doing this by right clicking on desktop and then new>shortcut.

What would I key in?

ping 127.0.0.1 -t 7200 taskkill /IM vlc.exe
Its been along time since i used bat files. Just open up notepad, paste in

ping 127.0.0.1 -t 7200
taskkill /IM vlc.exe

and save it as like vlc.bat or something.bat and see how that works.
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Operating Systems
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Batch files for shutting apps?