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. cmd/terminal opens and closes instantly 3times ,,,, is this a virus ?

    in Windows 10 Gaming
    cmd/terminal opens and closes instantly 3times ,,,, is this a virus ?: hey i have reset my pc yesterday , and today i saw that terminal/cmd opens and closes instantly 3 times , and it makes my pc slow , i even downloaded a game , after playing it for 10 mins it starts lagging and my whole pc starts lagging , even it is a small game and my pc is...
  3. cmd/terminal opens and closes instantly 3times ,,,, is this a virus ?

    in Windows 10 Software and Apps
    cmd/terminal opens and closes instantly 3times ,,,, is this a virus ?: hey i have reset my pc yesterday , and today i saw that terminal/cmd opens and closes instantly 3 times , and it makes my pc slow , i even downloaded a game , after playing it for 10 mins it starts lagging and my whole pc starts lagging , even it is a small game and my pc is...
  4. Cmd starting and closing instantly

    in Windows 10 Gaming
    Cmd starting and closing instantly: Every couple of minutes Cmd starts up and immediately closes again. I've looked for this issue and it's not exactly unique. Unfortunately the window closes so quickly that I can't see the name. Screengrabs or recordings are also too slow. Other users have used succesfully...
  5. Cmd starting and closing instantly

    in Windows 10 Software and Apps
    Cmd starting and closing instantly: Every couple of minutes Cmd starts up and immediately closes again. I've looked for this issue and it's not exactly unique. Unfortunately the window closes so quickly that I can't see the name. Screengrabs or recordings are also too slow. Other users have used succesfully...
  6. CMD opens up randomly and closes instantly, is it a virus?

    in Windows 10 Gaming
    CMD opens up randomly and closes instantly, is it a virus?: CMD keeps opening and closing recently, i scanned my laptop with Malwarebytes and it did not detect anything, i also scanned it with Rkill and it said Performing miscellaneous checks: * Reparse Point/Junctions Found These may be legitimate! *...
  7. CMD opens up randomly and closes instantly, is it a virus?

    in Windows 10 Software and Apps
    CMD opens up randomly and closes instantly, is it a virus?: CMD keeps opening and closing recently, i scanned my laptop with Malwarebytes and it did not detect anything, i also scanned it with Rkill and it said Performing miscellaneous checks: * Reparse Point/Junctions Found These may be legitimate! *...
  8. 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?...
  9. 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?...
  10. 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?...