Share via

Any batch file I open even if it is empty opens and closes instantly in a split second

Anonymous
2024-12-29T16:50:48+00:00

i recently have been catching attention to some youtube coding videos and decided to try something simple out for myself, before even righting anything in the file i attempted to open it and it gave me an error saying it wasnt compatible with my software, something about the publisher even though I had just created it, no tutorials I can find are helping and this PC is brand new, I am honestly just confused at this point.

Windows for home | Windows 11 | Files, folders, and storage

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

4 answers

Sort by: Most helpful
  1. Les Ferch 10,326 Reputation points Volunteer Moderator
    2024-12-29T20:14:52+00:00

    Thanks for posting the video! The only things I see, that may be of concern, is that OneDrive is involved and it's showing "low storage". Try making a folder that is not connected to OneDrive, such as C:\Scripts, and make your batch files there and see if that resolves the issue.

    0 comments No comments
  2. Anonymous
    2024-12-29T17:13:21+00:00

    Your title says there's a problem with batch files closing immediately, but your text implies that you're trying to run something else, so I'm not clear on your question. FWIW if the issue is a batch file closing try putting a Pause statement in it,

    0 comments No comments
  3. Anonymous
    2024-12-29T17:07:52+00:00

    I receive this error even when trying to open a batch file i just made 30 seconds ago with no code whatsover.

    Whenever I run it as administrator it just doesn't open period.

    This is a video of me creating and opening the file, showing the result https://streamable.com/9ckdo3

    0 comments No comments
  4. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more