1.    11 Jul 2017 #1
    Join Date : Aug 2015
    Coolidge
    Posts : 86
    Windows 10 1703 Creators Update

    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 ComputerSystem Spec
  2.    11 Jul 2017 #2
    Join Date : Oct 2016
    Charlotte, NC
    Posts : 437
    Win10 Home x64 - 1709

    Try adding exit to end of you bat file.
      My ComputersSystem Spec
  3.    12 Jul 2017 #3
    Join Date : Aug 2015
    Coolidge
    Posts : 86
    Windows 10 1703 Creators Update
    Thread Starter

    Quote Originally Posted by Eagle51 View Post
    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 ComputerSystem Spec

 


Similar Threads
Thread Forum
Solved How can I find out what is causing a Cmd Prompt to open and close?
I was on vacation for about 10 days, so I'm not sure exactly when an app/windows was updated but this problem definitely started in the last 2 weeks. I will be typing away in my editor or playing a game and I will see a Command Prompt open and...
General Support
Command Prompt Window Keeps Flashing
I have two computers of mine that keep running "system32\schtasks.exe" in a command prompt. It will appear but go away in a fraction of a second; only by capturing the frame at the right time was I able to get a screenshot of it. It launches that...
General Support
Automatically close app window on startup / desktop
The software of my Keyboard (Logitech G510s) opens a window upon startup that has to be closed (sent to taskbar) manually. Every other app such as mouse software, soundcard and others are kind enough not to bother their users. Can I add a script...
Software and Apps
How to show Command Prompt Window when running task in Task Scheduler?
Is there a way to make the "Command Prompt" window show when I have a task running in Windows task Scheduler? I would like to be able to view the progress of the task. For example, I have a program called "Zap2xml" that collects TV EPG data. It...
General Support
Command Prompt Won't Close
Ok, so on my Dell Latitude E6520 laptop, I can open command prompt (Normal and Admin), but can not close any of the CMD windows I open unless I go through the Task Manager and shut them down. I do not have that issue on my desktop, which is also...
General Support
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 07:31.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums