Page 1 of 2 12 LastLast
  1.    25 Aug 2017 #1
    Join Date : May 2017
    Posts : 76
    Windows 10 Home, 64bit

    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.    25 Aug 2017 #2
    Join Date : Oct 2013
    NW Florida
    Posts : 9,486
    Windows 10 Enterprise and Pro/Windows 7 Enterprise/Linux Mint

    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.    25 Aug 2017 #3
    Join Date : Aug 2016
    S/E England
    Posts : 4,517
    10 Home x64 (1709) (10 Pro on 2nd pc)

    Right-click on the .bat file, select Properties, on the Shortcut tab select Run: Minimised.
      My ComputersSystem Spec
  4.    25 Aug 2017 #4
    Join Date : May 2017
    Posts : 76
    Windows 10 Home, 64bit
    Thread Starter

    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.    25 Aug 2017 #5
    Join Date : Aug 2016
    S/E England
    Posts : 4,517
    10 Home x64 (1709) (10 Pro on 2nd pc)

    Quote Originally Posted by Enter 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.    25 Aug 2017 #6
    Join Date : May 2017
    Posts : 76
    Windows 10 Home, 64bit
    Thread Starter

    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.    25 Aug 2017 #7
    Join Date : Oct 2014
    Arnold, MD
    Posts : 29,031
    Triple boot - Win 10 Pro, Win 10 Pro Insider (2) - (and a sprinkling of VMs)

    Quote Originally Posted by Enter 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.    25 Aug 2017 #8
    Join Date : Aug 2016
    S/E England
    Posts : 4,517
    10 Home x64 (1709) (10 Pro on 2nd pc)

    Quote Originally Posted by Enter 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...
    Quote Originally Posted by Enter 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.    25 Aug 2017 #9
    Join Date : May 2017
    Posts : 76
    Windows 10 Home, 64bit
    Thread Starter

    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.    25 Aug 2017 #10
    Join Date : Aug 2016
    S/E England
    Posts : 4,517
    10 Home x64 (1709) (10 Pro on 2nd pc)

      My ComputersSystem Spec

 
Page 1 of 2 12 LastLast


Similar Threads
Thread Forum
Solved how do i stop W10 from showing me options when i fit a window...
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
General Support
Solved Difference between clean USB boot & executing setup.exe file?
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...
Installation and Upgrade
Solved Windows 10 not showing second partition in defrag window
It seems that only one partition +system reserved are showed. Any idea why?
Performance & Maintenance
File browse dialog showing limited results compared to Explorer window
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...
General Support
Solved Deleted backgrounds still showing in personalisation window..
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...
Customization
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 17:22.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums