automatically close out the command prompt window


  1. Posts : 105
    Windows 10 20H1 v2004
       #1

    automatically close out the command prompt window


    Hello,

    I managed to create an Elevated cmd thing for my HideDropbox.bat file and got it to run at startup. It works fine, but it doesn't automatically close out the command prompt window when it's done applying the changes. Is there a way to make it do so. And if not, is there a way to make it run in the background so I won't have to keep manually closing the command prompt window?

    I'm not sure if this is the right thread to ask this in tbh. I asked here because it deals with a HideDropbox.bat file that I managed to get to run at startup via an Elevated Command Prompt window.
    Last edited by Brink; 11 Jul 2017 at 21:30. Reason: Moved to new thread
      My Computer


  2. Posts : 1,471
    Win10 Home x64 - 1809
       #2

    Try adding exit to end of you bat file.
      My Computers


  3. Posts : 105
    Windows 10 20H1 v2004
    Thread Starter
       #3

    Eagle51 said:
    Try adding exit to end of you bat file.
    That worked when running the .bat file but the .bat file is being run via an elevated command prompt and it doesn't close the command prompt window unfortunately.

    ---EDIT---

    Scratch that, got it to work that way. I just had to edit the task in task scheduler to run the .bat file directly instead of through cmd.exe and it still kept the elevated permissions. So the having exit at the end of the line in the .bat file works perfectly now. Thanks.
      My Computer


 

  Related Discussions
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:24.
Find Us




Windows 10 Forums