Windows 10: How can I make a .bat program close itself after it opens a file?

Discus and support How can I make a .bat program close itself after it opens a file? in Windows 10 Customization to solve the problem; Hello, so basically, I have a .bat program designed to open a file yes, only that, and I would like it to end itself immediately after opening said... Discussion in 'Windows 10 Customization' started by Vincent Cerowski, Oct 13, 2020.

  1. How can I make a .bat program close itself after it opens a file?


    Hello,


    so basically, I have a .bat program designed to open a file yes, only that, and I would like it to end itself immediately after opening said file.


    The program:

    "C:\Program Files x86\DesignFOIL\DESIGNFOIL_R6_DEMO.exe"

    end


    As of now, the program runs the file, but stays open until I close said file. I would like it to close itself instantly after opening said file.


    How do I do that?


    Also I apologize if this question is in the wrong forum section, I did not find a section specifically for CMD problems...


    Thanks and have a great day!

    :)
     
    Vincent Cerowski, Oct 13, 2020
    #1

  2. .bat files

    when ever try to run a .bat file the program opens then closes straight away I need help with opening it.
     
    LukeChurch, Oct 13, 2020
    #2
  3. floundo Win User
    Scheduled Task Won't Launch Program with .bat File

    It's set to trigger the bat to open the program every morning at 2:20 a.m., and the one that closes it every night at 11:30 p.m.

    But I have been just trying to run the task manually from task scheduler to test it and it doesn't open the program, even though double clicking the bat to launch manually it does open.

    The action is to start a program "C:\Media Encoder BATS\ADOBE_ME_START.bat" and the other is "C:\Media Encoder BATS\ADOBE_ME_CLOSE.bat"

    Script of start bat is:

    @Echo off

    start "Adobe Media Encoder" "C:\Program Files\Adobe\Adobe Media Encoder CC 2018\Adobe Media Encoder.exe"
     
    floundo, Oct 13, 2020
    #3
  4. sc00VN Win User

    How can I make a .bat program close itself after it opens a file?

    .bat file

    A batch file (.bat extension) is basically a series of commands to be executed by the command-line interpreter. When you open the file, your system runs every command stored in the file from top to bottom, once the final command has been executed, it closes
    itself indicating it has finished its job. However, everything happens so fast you think it closes immediately and that's completely normal.

    If you want the command-line interpreter window to remains open once the last command has been executed, I suggest you do the following:

    - Right click on the .bat file and click on the 'edit' button.

    - It will open a notepad displaying a series of commands.

    - Create a new line by hitting enter after the final text and type in 'pause' without quotes.

    - Save the file and run it. This time the window will remain open.
     
    sc00VN, Oct 13, 2020
    #4
Thema:

How can I make a .bat program close itself after it opens a file?

Loading...
  1. How can I make a .bat program close itself after it opens a file? - Similar Threads - bat program close

  2. When trying to open program or game, it closes itself

    in Windows 10 Gaming
    When trying to open program or game, it closes itself: Hi, guys! From 4-5 days when I try to open any program or game p.e Visual Studio, IntelliJ or some game, it shows the starting window and then it closes itself and opens folders from the local disks? What could be wrong ? Could the problem be in the HDD ?...
  3. When trying to open program or game, it closes itself

    in Windows 10 Software and Apps
    When trying to open program or game, it closes itself: Hi, guys! From 4-5 days when I try to open any program or game p.e Visual Studio, IntelliJ or some game, it shows the starting window and then it closes itself and opens folders from the local disks? What could be wrong ? Could the problem be in the HDD ?...
  4. When trying to open program or game, it closes itself

    in Windows 10 BSOD Crashes and Debugging
    When trying to open program or game, it closes itself: Hi, guys! From 4-5 days when I try to open any program or game p.e Visual Studio, IntelliJ or some game, it shows the starting window and then it closes itself and opens folders from the local disks? What could be wrong ? Could the problem be in the HDD ?...
  5. How to make file open with no program.

    in Windows 10 Ask Insider
    How to make file open with no program.: A while back I accidentally set .viso (virtual iso) files to open with Internet Explorer, how do I change it so NO program opens viso files except VirtualBox or something? submitted by /u/WackyH [link] [comments]...
  6. A graphic file can be opened but it closes itself after a few seconds

    in Windows 10 BSOD Crashes and Debugging
    A graphic file can be opened but it closes itself after a few seconds: I run Windows 10 Pro, latest version. Long ago I moved the documents folder from where it sits by default to another drive: E:\OneDrive\Documents\. In the Documents folder are various sub-folders. So far there are no problems, but since a week one problem occurred: I use...
  7. Program opens then closes on taskbar by itself Virus?

    in AntiVirus, Firewalls and System Security
    Program opens then closes on taskbar by itself Virus?: There's a program that opens on my taskbar, then immediately closes, so fast that I can't tell which program it is. I've checked task manager and it doesn't show any programs open that I'm not using. When the program opens it kicks me out of full screen programs so I'd like...
  8. assigning a default program for opening .bat files

    in Windows 10 Network and Sharing
    assigning a default program for opening .bat files: see images folks. why can't I in win 10? I want notepad++. possible? [ATTACH] [ATTACH] https://answers.microsoft.com/en-us/windows/forum/all/assigning-a-default-program-for-opening-bat-files/1f5a9749-b1eb-405b-9c9a-3ec543112987
  9. How can I make a program open on the monitor I open it from.

    in Windows 10 Ask Insider
    How can I make a program open on the monitor I open it from.: For example both my monitors have the same taskbar. I want to open chrome on my first monitor then move my cursor to the second monitor and when I click chrome on the second monitor a new chrome instance of chrome opens on the second monitor rather than it opening on the...
  10. Bat file automatically close?

    in Windows 10 Support
    Bat file automatically close?: when i execute the bat file i get a window this window should be closed after 5 seconds if no interaction with the window was done Does anybody know how to do this? Bat Datei automatisch schließen?