Windows 10: CMD promt opens and closes instantly.

Discus and support CMD promt opens and closes instantly. in Windows 10 BSOD Crashes and Debugging to solve the problem; I tried SFC and Anti-virus scans, both of these failed to fix it. I managed to capture the CMD screen using ShadowPlay... Discussion in 'Windows 10 BSOD Crashes and Debugging' started by SpookyRaptor40, Sep 13, 2021.

  1. CMD promt opens and closes instantly.


    I tried SFC and Anti-virus scans, both of these failed to fix it. I managed to capture the CMD screen using ShadowPlay

    :)
     
    SpookyRaptor40, Sep 13, 2021
    #1

  2. Cmd instantly closes

    So my cmd instantly closes.

    That is because you have an Autoruns key in there which is starting explorer and then exiting.

    That key seems to be there because something else is broken and explorer is not starting when you log on.

    Note that the key is not required for normal operation of Windows.

    You need to fix explorer first and then remove the Autoruns key.

    To fix explorer:

    • Run regedt32
    • Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon.
    • On the right side, there should be a value called Shell.
    • In the right hand side pane, make sure that the default string value of Shell is explorer.exe.
    • Save any changes
    • Log off and log on again.

    Source Windows explorer.exe does not start or open at startup
     
    DavidPostill, Sep 13, 2021
    #2
  3. PolloVN Win User
    When I add the extension >nul in my batch file, CMD opens and closes instantly.

    So I was gonna do a batch program, I basically needed to add like a little delay so I did

    ping 127.0.0.1>nul

    But when I tried opening the batch program, it instantly closes.

    So I triend running the command in CMD (not in a batch file)

    Then it says this:

    C:\Users\(name)>ping 127.0.0.1>nul

    The system cannot find the file specified.

    The Windows version i have is Windows 8.1 Pro.
     
    PolloVN, Sep 13, 2021
    #3
  4. Dddsasul Win User

    CMD promt opens and closes instantly.

    Cmd instantly closes

    So my cmd instantly closes, I tried following this: CMD.exe closes immediately after calling (Win7 64) this kind of solves the problem but it introduces a new one, when my pc starts, windows explorer doesn't start (and probably some other processes). I can manually run the explorer process from task manager every time I start windows but that's annoying.

    What I currently have in that registry is

    I was wondering what can I do to fix this (Keep in mind that I am an inexperienced user, I do not understand what's inside that registry, it was already there)
     
    Dddsasul, Sep 13, 2021
    #4
Thema:

CMD promt opens and closes instantly.

Loading...
  1. CMD promt opens and closes instantly. - Similar Threads - CMD promt opens

  2. A random CMD promt window keeps on opening

    in Windows 10 Network and Sharing
    A random CMD promt window keeps on opening: I reinstalled windows 10 and after that I keeps on getting a random CMD window pop up and it stays for a milisecond and then gone and I dont know what is it or what is happening can anyone please help...
  3. A random CMD promt window keeps on opening

    in Windows 10 Gaming
    A random CMD promt window keeps on opening: I reinstalled windows 10 and after that I keeps on getting a random CMD window pop up and it stays for a milisecond and then gone and I dont know what is it or what is happening can anyone please help...
  4. A random CMD promt window keeps on opening

    in Windows 10 Software and Apps
    A random CMD promt window keeps on opening: I reinstalled windows 10 and after that I keeps on getting a random CMD window pop up and it stays for a milisecond and then gone and I dont know what is it or what is happening can anyone please help...
  5. CMD and Powershell instantly closes after opening it.

    in Windows 10 BSOD Crashes and Debugging
    CMD and Powershell instantly closes after opening it.: For I think a few years now, whenever I open CMD, Powershell or something similar, it is there for a few seconds and I can use it but then it just randomly closes.I have been looking for fixes for so long can someone please help me?...
  6. CMD and Powershell instantly closes after opening it.

    in Windows 10 Gaming
    CMD and Powershell instantly closes after opening it.: For I think a few years now, whenever I open CMD, Powershell or something similar, it is there for a few seconds and I can use it but then it just randomly closes.I have been looking for fixes for so long can someone please help me?...
  7. CMD and Powershell instantly closes after opening it.

    in Windows 10 Software and Apps
    CMD and Powershell instantly closes after opening it.: For I think a few years now, whenever I open CMD, Powershell or something similar, it is there for a few seconds and I can use it but then it just randomly closes.I have been looking for fixes for so long can someone please help me?...
  8. Command promt opens and closes on startup

    in Windows 10 Drivers and Hardware
    Command promt opens and closes on startup: On startup command promt opens automatically and quickly closes in the flash of an eyeThis started happening randomly one day what should I do? https://answers.microsoft.com/en-us/windows/forum/all/command-promt-opens-and-closes-on-startup/befe3220-9f5b-449c-9e31-53fead51179c
  9. Cmd promt help!!!!

    in Windows 10 Ask Insider
    Cmd promt help!!!!: I was trying to move c:\windows\system32\utilman.exe And accidentally pressed enter before c:\windows\system32\utilman.exe.bak Where did it go? Plz help submitted by /u/cream4stailn [link] [comments] https://www.reddit.com/r/Windows10/comments/lab7ec/cmd_promt_help/
  10. CMD becomes smaller and instantly closes: Can't use CMD

    in Windows 10 BSOD Crashes and Debugging
    CMD becomes smaller and instantly closes: Can't use CMD: Hello. I've been having trouble using the command prompt recently. Whenever I open it, by any means, it quickly shrinks and closes, without me being able to use it. I've already tried opening it as administrator, and executing it with the "/k" suffix. Extra info 1: When I...