I keep getting the error "process exited with code 1" when trying to run a cmd script

Anonymous
2025-04-08T09:44:51+00:00

I downloaded a CMD script for a game, but everytime i run it (with administrator), the Command prompt flashes for half a second and instantly closes. I managed to capture what it says before closing, and it simply says this at the end and closes

[process exited with code 1 (0x00000001)]

You can now close this terminal with Ctrl+D, or press Enter to restart.

I tried a common fix for this found online that involves the powershell command:

C:\Windows\System32\reg.exe DELETE "HKCU\Software\Microsoft\Command Processor" /v AutoRun /fAnd the CMD command (with administrator): sfc /scannow

Neither of those helped at all. the problem still persisted.

One thing to note, my "Command Prompt" key is completely missing from my Registry editor. it should normally be in Computer\HKEY_CURRENT_USER\Software\Microsoft\Command Processor

But its not there at all. I'm running on Windows 11 pro 24H2, OS build 26100.3476
I assume I'm up to date.

Please let me know if you can help

PS. I also tried running the same command from a new profile on my device, also didn't work.

Windows for home | Windows 11 | Performance and system failures

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} vote

7 answers

Sort by: Most helpful
  1. Anonymous
    2025-04-08T09:48:27+00:00

    I downloaded a CMD script for a game, but everytime i run it, the Command prompt flashes for half a second and instantly closes. I managed to capture what it says before closing, and it simply says this at the end and closes

    [process exited with code 1 (0x00000001)]

    You can now close this terminal with Ctrl+D, or press Enter to restart.

    I tried a common fix for this found online that involves the powershell command:

    C:\Windows\System32\reg.exe DELETE "HKCU\Software\Microsoft\Command Processor" /v AutoRun /fAnd the CMD command (with administrator): sfc /scannow

    Neither of those helped at all. the problem still persisted.

    One thing to note, my "Command Prompt" key is completely missing from my Registry editor. it should normally be in Computer\HKEY_CURRENT_USER\Software\Microsoft\Command Processor

    But its not there at all. I'm running on Windows 11 pro 24H2, OS build 26100.3476
    I assume I'm up to date.

    Please let me know if you can help

    Please Right Click on CMD and select RUN AS ADMINISTRATOR.

    Cheer.

    0 comments No comments
  2. Anonymous
    2025-04-08T09:49:25+00:00

    Thank you for your reply frank, but sadly this did not work. I tried multiple times

    0 comments No comments
  3. Ramesh Srinivasan 69,010 Reputation points Independent Advisor
    2025-04-08T10:17:11+00:00

    Hi Mohammad,

    The error code is not related to the Autorun registry value.

    A line in the batch file or script you ran caused that error. Please share the file on OneDrive or GoFile.io and post the link here if possible.

    Note: The following key doesn't exist by default. It's okay if it doesn't exist.

    HKEY_CURRENT_USER\Software\Microsoft\Command Processor

    0 comments No comments
  4. Anonymous
    2025-04-08T10:23:47+00:00

    Hello Ramesh,

    Thanks for clarifying that. Of course, here is the link:

    mhgu-mhxx-hp-overlay-for-switch-emulator-v111.zip

    So the main file that im trying to run in that zip folder is
    MHGU-MHXX-HP-Overlay.exe

    I gave you the whole folder because I don't think it would work without the other files extracted.
    Let me know what happens, thank you.

    0 comments No comments
  5. Ramesh Srinivasan 69,010 Reputation points Independent Advisor
    2025-04-08T10:26:51+00:00

    Hi Mohammad,

    It's an executable, so I don't know what it's trying to run. I thought you were trying to run a script or a batch file.

    Your best option is to contact the program developer to see what generates the error code 1.

    0 comments No comments