Jump to content

Is there a way to automatically close an application after it launches in startup?

Go to solution Solved by Avocado Diaboli,

Create a batch or powershell script that closes the applications you want to close. Then open the task scheduler and create a task that runs after login. You can delay the task in the scheduler. Here's a guide on how to do that: https://www.maketecheasier.com/start-scheduled-tasks-with-delay-windows/

I have Razer Synapse, RGBFusion, and a few other programs on startup to set RGB and profiles on my pc/peripherals, and I'm wondering if there's something I can download, configure, etc. that would close these programs automatically after they've launched.

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, izz said:

Just turn launch at startup off?

They probably need to be started to apply the settings, but OP wants to then close them as they don't need to be kept running afterwards.

F@H
Desktop: i9-13900K, ASUS Z790-E, 64GB DDR5-6000 CL36, RTX3080, 2TB MP600 Pro XT, 2TB SX8200Pro, 2x16TB Ironwolf RAID0, Corsair HX1200, Antec Vortex 360 AIO, Thermaltake Versa H25 TG, Samsung 4K curved 49" TV, 23" secondary, Mountain Everest Max

Mobile SFF rig: i9-9900K, Noctua NH-L9i, Asrock Z390 Phantom ITX-AC, 32GB, GTX1070, 2x1TB SX8200Pro RAID0, 2x5TB 2.5" HDD RAID0, Athena 500W Flex (Noctua fan), Custom 4.7l 3D printed case

 

Asus Zenbook UM325UA, Ryzen 7 5700u, 16GB, 1TB, OLED

 

GPD Win 2

Link to comment
Share on other sites

Link to post
Share on other sites

Is launched minimized not an option? 

Laptop: 2019 16" MacBook Pro i7, 512GB, 5300M 4GB, 16GB DDR4 | Phone: iPhone 13 Pro Max 128GB | Wearables: Apple Watch SE | Car: 2007 Ford Taurus SE | CPU: R7 5700X | Mobo: ASRock B450M Pro4 | RAM: 32GB 3200 | GPU: ASRock RX 5700 8GB | Case: Apple PowerMac G5 | OS: Win 11 | Storage: 1TB Crucial P3 NVME SSD, 1TB PNY CS900, & 4TB WD Blue HDD | PSU: Be Quiet! Pure Power 11 600W | Display: LG 27GL83A-B 1440p @ 144Hz, Dell S2719DGF 1440p @144Hz | Cooling: Wraith Prism | Keyboard: G610 Orion Cherry MX Brown | Mouse: G305 | Audio: Audio Technica ATH-M50X & Blue Snowball | Server: 2018 Core i3 Mac mini, 128GB SSD, Intel UHD 630, 16GB DDR4 | Storage: OWC Mercury Elite Pro Quad (6TB WD Blue HDD, 12TB Seagate Barracuda, 1TB Crucial SSD, 2TB Seagate Barracuda HDD)
Link to comment
Share on other sites

Link to post
Share on other sites

29 minutes ago, DrMacintosh said:

Is launched minimized not an option? 

Thanks for the reply; it is and it's what I have done, but I'm looking for a way for the programs to be terminated after launching minimized.

I'm basically looking for an automated "open task manager, select the program, hit 'end task'."

Link to comment
Share on other sites

Link to post
Share on other sites

57 minutes ago, Kilrah said:

They probably need to be started to apply the settings, but OP wants to then close them as they don't need to be kept running afterwards.

You are correct, thanks for clarifying. I'm basically looking for an automated way to emulate booting task manager and hitting "end task" on a program after it's already launched.

Link to comment
Share on other sites

Link to post
Share on other sites

I have thought about that many times. But it's not that time consuming to close them manually 😆

Ryzen 5 2600X / ASRock Fatal1ty B450 Gaming K4 / G.Skill RIPJAWS V 16GB (2X8) 3000Mhz CL15 / Gigabyte RTX 2060 Super Gaming 8GB OC / Corsair RM650X 2018 / Crucial BX500 240GB / Seagate Barracauda 2TB 7200RPM Cooler Master MasterBox E500L /  ASUS TUF Gaming VG27WQ // Rog Orion / Corsair Harpoon RGB Pro / Cooler Master MasterKeys Lite L / Xbox One Red Sport  Special Edition Controller for Windows
Link to comment
Share on other sites

Link to post
Share on other sites

Create a batch or powershell script that closes the applications you want to close. Then open the task scheduler and create a task that runs after login. You can delay the task in the scheduler. Here's a guide on how to do that: https://www.maketecheasier.com/start-scheduled-tasks-with-delay-windows/

And now a word from our sponsor: 💩

-.-. --- --- .-.. --..-- / -.-- --- ..- / -.- -. --- .-- / -- --- .-. ... . / -.-. --- -.. .

ᑐᑌᑐᑢ

Spoiler

    ▄██████                                                      ▄██▀

  ▄█▀   ███                                                      ██

▄██     ███                                                      ██

███   ▄████  ▄█▀  ▀██▄    ▄████▄     ▄████▄     ▄████▄     ▄████▄██   ▄████▄

███████████ ███     ███ ▄██▀ ▀███▄ ▄██▀ ▀███▄ ▄██▀ ▀███▄ ▄██▀ ▀████ ▄██▀ ▀███▄

████▀   ███ ▀██▄   ▄██▀ ███    ███ ███        ███    ███ ███    ███ ███    ███

 ██▄    ███ ▄ ▀██▄██▀    ███▄ ▄██   ███▄ ▄██   ███▄ ▄███  ███▄ ▄███▄ ███▄ ▄██

  ▀█▄    ▀█ ██▄ ▀█▀     ▄ ▀████▀     ▀████▀     ▀████▀▀██▄ ▀████▀▀██▄ ▀████▀

       ▄█ ▄▄      ▄█▄  █▀            █▄                   ▄██  ▄▀

       ▀  ██      ███                ██                    ▄█

          ██      ███   ▄   ▄████▄   ██▄████▄     ▄████▄   ██   ▄

          ██      ███ ▄██ ▄██▀ ▀███▄ ███▀ ▀███▄ ▄██▀ ▀███▄ ██ ▄██

          ██     ███▀  ▄█ ███    ███ ███    ███ ███    ███ ██  ▄█

        █▄██  ▄▄██▀    ██  ███▄ ▄███▄ ███▄ ▄██   ███▄ ▄██  ██  ██

        ▀███████▀    ▄████▄ ▀████▀▀██▄ ▀████▀     ▀████▀ ▄█████████▄

 

Link to comment
Share on other sites

Link to post
Share on other sites

imo this may or may not work depending on the program because some of these programs will stop doing whatever they do after being closed, but then again i guess you checked that.

 

and i knew you could write a batch file, but no idea how... so the post above is probably helpful.  🙂

 

 

The direction tells you... the direction

-Scott Manley, 2021

 

Softwares used:

Corsair Link (Anime Edition) 

MSI Afterburner 

OpenRGB

Lively Wallpaper 

OBS Studio

Shutter Encoder

Avidemux

FSResizer

Audacity 

VLC

WMP

GIMP

HWiNFO64

Paint

3D Paint

GitHub Desktop 

Superposition 

Prime95

Aida64

GPUZ

CPUZ

Generic Logviewer

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

16 hours ago, Avocado Diaboli said:

Create a batch or powershell script that closes the applications you want to close. Then open the task scheduler and create a task that runs after login. You can delay the task in the scheduler. Here's a guide on how to do that: https://www.maketecheasier.com/start-scheduled-tasks-with-delay-windows/

This is what I needed, thanks a lot.

 

For future readers, this video will help you make a batch file to close programs: 

 

Link to comment
Share on other sites

Link to post
Share on other sites

On 11/14/2022 at 5:19 PM, Kilrah said:

They probably need to be started to apply the settings, but OP wants to then close them as they don't need to be kept running afterwards.

Ah, this makes sense. Thanks.

phone out of service?

give us a call.

Link to comment
Share on other sites

Link to post
Share on other sites

  • 6 months later...

Old thread, apologies for bump, but it came up #1 in my google search.
I also wanted to kill an app on startup, specifically the RGB controller for my ram (G.Skill's Trident Z app). For some reason the RGB settings don't stay between power cycles, but opening the app (even without hitting "apply") is enough to reapply them. So I just want the app to open and close.

The info is all here already but could use a more detailed walkthrough. Opening the app is easy, just add it to startup. But to auto-close the app you need two things:

  1. a batch script that closes the app(s)
  2. a scheduled task that automatically runs said batch

The batch script is easy. Make a text file, name it .bat instead of .txt and just add this:

@echo off

taskkill /F /IM gaming.exe /IM hid.exe

Where "gaming.exe" and "hid.exe" are the two apps that control the Trident Z app. Easiest way to check what your apps are named by looking a the "Details" tab in Task Manager while they're running. As I found, the names may not be intuitive (seriously, "gaming.exe"?)

Now you could just double click that .bat file and it would work, but why not automate it? So next we schedule the task that runs that. 

  1. Open Task Scheduler and select Create Task... and name it
  2. Under Triggers tab, create New.
  3. I selected Begin the task: "At log on", but you could choose startup, etc
  4. Under Advanced Settings, add a Delay. Our action doesn't know if the app is open yet so we just wait until we're pretty sure it's open. I chose 30 seconds.
  5. Now go to the Actions tab and create a new action
  6. Select "Start a program" from the dropdown and then navigate to your .bat file.

That's it! Test it out and see if it works.

There is a more advanced way to do it where in step 4, rather than choosing a delay you create a custom XML event based on when the app actually opens. The problem is that the event would then trigger even when you intentionally open the app. So pick your poison, imo using log on delay is easier. But if your machine has a slow startup you might need to up the delay time. Or if you're impatient you could re-run the batch script multiple times at a few intervals.
 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×