Bat file is not working from a pc

Shabin Suresh 211 Reputation points
2023-05-24T13:45:52.2866667+00:00

Hi Team,

in one pc the bat file is not opening, the same file is working from another pcs. When double-clicking or running as administrator, just opens and suddenly disappears. Windows is reinstalled but the same issue persists. Kindly advise.

Thanks,

Shabin

Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} vote

Accepted answer
  1. Limitless Technology 44,751 Reputation points
    2023-05-25T11:41:13.4+00:00

    Hi,

    I'd be happy to help you out with your question. Sorry for the inconvenience caused.

    Here are a few possible reasons why your batch file might not be opening on one PC but is working on others:

    • The file might be corrupted. Try downloading the file again or copying it from another PC.
    • The file might not have the correct permissions. Right-click on the file and select "Properties". Click on the "Security" tab and make sure that the "Everyone" group has "Read" permission.
    • The file might be blocked by Windows Defender. Open Windows Defender and go to "Virus & threat protection settings". Click on "Manage settings" under "Virus & threat protection". Under "Exclusions", click on "Add or remove exclusions" and add your batch file to the list.
    • The file might be trying to access a resource that is not available on the PC. Check the commands in your batch file to make sure that they are referring to valid resources.

    If you've tried all of these things and your batch file still won't open, you can try the following:

    • Run the batch file from a command prompt. To do this, open a command prompt and navigate to the folder where the batch file is located. Type the name of the batch file and press Enter.
    • Run the batch file in Safe Mode. To do this, restart your PC and press F8 when you see the Windows logo. Select "Safe Mode with Networking" from the list of options and press Enter. Once your PC has booted into Safe Mode, try running the batch file again.

    In addition to the above, here are some other things you can try:

    • Make sure that the batch file is saved with a .bat extension.
    • Try running the batch file from a different user account.
    • Try creating a new batch file with the same commands as the original batch file and see if that works.

    If you have any other questions or need assistance with anything, please don't hesitate to let me know. I'm here to help.

    If the reply was helpful, please don’t forget to upvote or accept as answer, thank you.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.