Windows 10: Executing the bat file without showing the cmd window?

Page 1 of 2 12 LastLast

  1. Posts : 76
    Windows 10 Home, 64bit
       25 Aug 2017 #1

    Executing the bat file without showing the cmd window?


    I have a bat file closing a program - Digital Clock close.bat - containing:

    Code:
    taskkill /F /IM digital_clock.exe
    How could I avoid this window to be opened when executing the bat file:
      My ComputerSystem Spec


  2. Posts : 10,977
    Windows 10 Pro and Windows 10 Pro Insider
       25 Aug 2017 #2

    In the first line of your batch file, try @echo off like this

    Code:
    @echo off
    taskkill /F /IM digital_clock.exe
      My ComputersSystem Spec


  3. Posts : 8,067
    10 Home x64 (1803) (10 Pro on 2nd pc)
       25 Aug 2017 #3

    Right-click on the .bat file, select Properties, on the Shortcut tab select Run: Minimised.
      My ComputersSystem Spec


  4. Posts : 76
    Windows 10 Home, 64bit
    Thread Starter
       25 Aug 2017 #4

    Thank you very much!

    @echo offtaskkill /F /IM digital_clock.exe
    Unfortunately that does not work, the window pops up, though (without message inside):


    Right-click on the .bat file, select Properties, on the Shortcut tab select Run: Minimised.
    Sorry, I cannot find anything like a shortcut tab or "Run: Minimised:
      My ComputerSystem Spec


  5. Posts : 8,067
    10 Home x64 (1803) (10 Pro on 2nd pc)
       25 Aug 2017 #5

    Enter said: View Post
    Sorry, I cannot find anything like a shortcut tab or "Run: Minimised:
    Sorry, I tried it out on my machine, but I've just realised I was working on a shortcut to my .bat file, not the .bat file itself.

    Make a shortcut to run the bat file, then you can set the shortcut to run it minimised.
      My ComputersSystem Spec


  6. Posts : 76
    Windows 10 Home, 64bit
    Thread Starter
       25 Aug 2017 #6

    Yes, I had tried even that without access. So I guesse the code is wrong in the bat file:

    Code:
    taskkill /F /IM C:\Programme\Digital Clock 4\Digital Clock close.bat - Verknüpfung.lnk
      My ComputerSystem Spec


  7. Posts : 35,291
    Triple boot - Win 10 Pro, Win 10 Pro Insider (2) - (and a sprinkling of VMs)
       25 Aug 2017 #7

    Enter said: View Post
    Yes, I had tried even that without access. So I guesse the code is wrong in the bat file:

    Code:
    taskkill /F /IM C:\Programme\Digital Clock 4\Digital Clock close.bat - Verknüpfung.lnk
    What Bree posted does work, all you will see is a brief flicker in the taskbar, no cmd window. When you say "without access", do you mean no permission to run it? Also set the shortcut to run as Admin. Example:

    Click image for larger version. 

Name:	2017-08-25_13h13_31.png 
Views:	5 
Size:	618.9 KB 
ID:	150406
      My ComputersSystem Spec


  8. Posts : 8,067
    10 Home x64 (1803) (10 Pro on 2nd pc)
       25 Aug 2017 #8

    Enter said: View Post
    Yes, I had tried even that without access. So I guesse the code is wrong in the bat file:

    Code:
    taskkill /F /IM C:\Programme\Digital Clock 4\Digital Clock close.bat - Verknüpfung.lnk
    What is ' Verknüpfung.lnk' (Shortcut.lnk) doing at the end of that code you posted? Your originally said the code was...
    Enter said: View Post
    I have a bat file closing a program - Digital Clock close.bat - containing:

    Code:
    taskkill /F /IM digital_clock.exe
    Right-click on the original .bat file, select 'Send to > Desktop (create shortcut)' then set the shortcut on the desktop to run it minimised. That's how I did it.
      My ComputersSystem Spec


  9. Posts : 76
    Windows 10 Home, 64bit
    Thread Starter
       25 Aug 2017 #9

    Ah yes, great, now it works, I made a ridiculous / stupid mistake, the wrong file was executed.

    Many thanks for the screenshot, I now have the same settings.
      My ComputerSystem Spec


  10. Posts : 8,067
    10 Home x64 (1803) (10 Pro on 2nd pc)
       25 Aug 2017 #10

      My ComputersSystem Spec


 
Page 1 of 2 12 LastLast

Related Threads
https://i.gyazo.com/00ca1dde668dfd34968f3e4f98367d83.png i have no idea what its actually called im hoping u can tell what im talking about from the picture
I have a Lenovo Yoga 3 ultrabook. I have made a bootable Windows 8.1 USB flash drive. I would like to know what is the difference between an installation from the 'setup.exe' file in the USB drive's folder, & a regular clean boot from the flash...
It seems that only one partition +system reserved are showed. Any idea why?
Hi all, I don't know if this is related to Win10, or an issue that existed with my Win8.1 before. I just noticed it after upgrading yesterday. So, my firewall just prompted me about an outbound connection attempt by a file (named...
I downloaded and tried out some different pictures for my desktop background. After deciding on one of them I deleted the others from my pictures folder but the deleted pictures are still showing in the personalisation window and can even still be...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 03:41.
Find Us