My RUN.bat files won't open!


BqnditX

New member
Local time
9:27 PM
Posts
8
OS
Windows 11
Hi, I need some help. I want to open a RUN.bat file, but every time I try to open it my computer gives a message saying "This app can't run on your pc".
 
Windows Build/Version
Windows 11

My Computer

System One

  • OS
    Windows 11

FreeBooter

Well-known member
Power User
VIP
Local time
5:27 AM
Posts
735
OS
Windows 11
Register .bat file extension with attached registry file.
 

Attachments

  • bat_fix.zip
    1.1 KB · Views: 27

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Pavilion
    CPU
    AMD Ryzen 7 5700G
    Motherboard
    Erica6
    Memory
    Micron Technology DDR4-3200 16GB
    Graphics Card(s)
    NVIDIA GeForce RTX 3060
    Sound Card
    Realtek ALC671
    Monitor(s) Displays
    Samsung SyncMaster U28E590
    Screen Resolution
    3840 x 2160
    Hard Drives
    SAMSUNG MZVLQ1T0HALB-000H1

Berton

Well-known member
Member
VIP
Local time
8:27 PM
Posts
673
Location
Wyoming
OS
Win11 Pro RTM x64
Your RUN.bat is a command, perhaps what you typed in it is the problem. Typing run.bat in Search open the dialog box for typing something just the same as pressing the WinKey + R opens it.
 

My Computers

System One System Two

  • OS
    Win11 Pro RTM x64
    Computer type
    Laptop
    Manufacturer/Model
    Dell Vostro 3400
    CPU
    Intel Core i5
    Memory
    8GB
    Hard Drives
    256GB SSD NVMe
  • Operating System
    Windows 11 Pro RTM x64
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Vostro 5890
    CPU
    Intel Core i5
    Memory
    16GB
    Graphics card(s)
    Onboard, no VGA using DisplayPort-to-VGA adapter
    Monitor(s) Displays
    21"
    Hard Drives
    512GB SSD NVMe, 2TB WDC HDD
    Browser
    Firefox, Edge
    Antivirus
    Windows Defender/Microsoft Security

FreeBooter

Well-known member
Power User
VIP
Local time
5:27 AM
Posts
735
OS
Windows 11

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Pavilion
    CPU
    AMD Ryzen 7 5700G
    Motherboard
    Erica6
    Memory
    Micron Technology DDR4-3200 16GB
    Graphics Card(s)
    NVIDIA GeForce RTX 3060
    Sound Card
    Realtek ALC671
    Monitor(s) Displays
    Samsung SyncMaster U28E590
    Screen Resolution
    3840 x 2160
    Hard Drives
    SAMSUNG MZVLQ1T0HALB-000H1

FreeBooter

Well-known member
Power User
VIP
Local time
5:27 AM
Posts
735
OS
Windows 11

Attachments

  • ProgressBar.bat
    621 bytes · Views: 9

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Pavilion
    CPU
    AMD Ryzen 7 5700G
    Motherboard
    Erica6
    Memory
    Micron Technology DDR4-3200 16GB
    Graphics Card(s)
    NVIDIA GeForce RTX 3060
    Sound Card
    Realtek ALC671
    Monitor(s) Displays
    Samsung SyncMaster U28E590
    Screen Resolution
    3840 x 2160
    Hard Drives
    SAMSUNG MZVLQ1T0HALB-000H1

BqnditX

New member
Thread Starter
Local time
9:27 PM
Posts
8
OS
Windows 11
@FreeBooter Thank you for all your help, when I open the ProgressBar.Bat file it has a bar that goes to 100% and then does nothing. if I try to write in it, it immediately closes. Am I doing something wrong?
 

My Computer

System One

  • OS
    Windows 11

FreeBooter

Well-known member
Power User
VIP
Local time
5:27 AM
Posts
735
OS
Windows 11
The batch script is use for displaying progress bar which works on your system that means Run.bat won't execute because it's empty.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Pavilion
    CPU
    AMD Ryzen 7 5700G
    Motherboard
    Erica6
    Memory
    Micron Technology DDR4-3200 16GB
    Graphics Card(s)
    NVIDIA GeForce RTX 3060
    Sound Card
    Realtek ALC671
    Monitor(s) Displays
    Samsung SyncMaster U28E590
    Screen Resolution
    3840 x 2160
    Hard Drives
    SAMSUNG MZVLQ1T0HALB-000H1

BqnditX

New member
Thread Starter
Local time
9:27 PM
Posts
8
OS
Windows 11
Than how do I open the RUN.bat file? Do I have to wait until the batch script is done?
 

My Computer

System One

  • OS
    Windows 11

FreeBooter

Well-known member
Power User
VIP
Local time
5:27 AM
Posts
735
OS
Windows 11
Batch scripts are stored in simple text files containing lines with commands that get executed in sequence, one after the other. These files have the special extension BAT or CMD. Files of this type are recognized and executed through an interface (sometimes called a shell) provided by a system file called the command interpreter. In Windows XP and later versions of Windows the command interpreter is the file cmd.exe. The large assortment of versatile commands available in Windows XP and later versions of Windows, makes batch files a powerful tool.

Because scripts contain standard text characters, you can create and edit scripts using a standard text editor, such as Notepad. When you enter commands, be sure to place each command or group of commands that should be executed together on a new line. This ensures proper execution of the commands. When you have finished creating a batch script, save the script file using the .bat or .cmd extension. Both extensions work with batch scripts in the same way.

Running a batch script file is a simple matter of just double-clicking on it. Batch files can also be run in a Command Prompt. In such case, the full path name must be used unless the file's path is in the path environment.

To become an effective Windows batch script programmer, you must become intimately familiar with the Windows Command Prompt. The Windows Command Prompt is a text-based interface to the Windows operating system as opposed to the Windows desktop, which is a GUI-based interface.

The Windows Command Prompt accepts user commands and translates them into a format that can be processed by the operating system. It then displays any output returned by the operating system back in the Windows Command Prompt console.

mFI0d5U.png


Open the Command Prompt by clicking Start Menu --> All Programs --> Accessories. In Windows Vista and later versions of Window operating systems type cmd.exe into Start Screen or Start Menu.

To execute a command at Command Prompt, type it in at the Command Prompt and press the Enter key. For example, to display the contents of the current working directory, type DIR and press Enter key.

FOcubFr.png
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Pavilion
    CPU
    AMD Ryzen 7 5700G
    Motherboard
    Erica6
    Memory
    Micron Technology DDR4-3200 16GB
    Graphics Card(s)
    NVIDIA GeForce RTX 3060
    Sound Card
    Realtek ALC671
    Monitor(s) Displays
    Samsung SyncMaster U28E590
    Screen Resolution
    3840 x 2160
    Hard Drives
    SAMSUNG MZVLQ1T0HALB-000H1

BqnditX

New member
Thread Starter
Local time
9:27 PM
Posts
8
OS
Windows 11
@FreeBooter I'm trying to open a Minecraft .jar file, I typed "java -jar" and behind -jar I put the full file name. It said that it was unable to acces the .jar file.
 

My Computer

System One

  • OS
    Windows 11

FreeBooter

Well-known member
Power User
VIP
Local time
5:27 AM
Posts
735
OS
Windows 11
@FreeBooter I'm trying to open a Minecraft .jar file, I typed "java -jar" and behind -jar I put the full file name. It said that it was unable to acces the .jar file.
I have no idea i don't know anything about Minecraft.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Pavilion
    CPU
    AMD Ryzen 7 5700G
    Motherboard
    Erica6
    Memory
    Micron Technology DDR4-3200 16GB
    Graphics Card(s)
    NVIDIA GeForce RTX 3060
    Sound Card
    Realtek ALC671
    Monitor(s) Displays
    Samsung SyncMaster U28E590
    Screen Resolution
    3840 x 2160
    Hard Drives
    SAMSUNG MZVLQ1T0HALB-000H1

BqnditX

New member
Thread Starter
Local time
9:27 PM
Posts
8
OS
Windows 11
That's alright. Do you have or know any other methods I can use to try to open an empty RUN.bat file?
 

My Computer

System One

  • OS
    Windows 11

FreeBooter

Well-known member
Power User
VIP
Local time
5:27 AM
Posts
735
OS
Windows 11
That's alright. Do you have or know any other methods I can use to try to open an empty RUN.bat file?
Do you want to modify the Run.bat file or execute it?
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Pavilion
    CPU
    AMD Ryzen 7 5700G
    Motherboard
    Erica6
    Memory
    Micron Technology DDR4-3200 16GB
    Graphics Card(s)
    NVIDIA GeForce RTX 3060
    Sound Card
    Realtek ALC671
    Monitor(s) Displays
    Samsung SyncMaster U28E590
    Screen Resolution
    3840 x 2160
    Hard Drives
    SAMSUNG MZVLQ1T0HALB-000H1

IanMosley

Active member
Member
Local time
3:27 AM
Posts
185
Location
Notts, UK
OS
Windows 11 Pro v 22H2 (Build 22621.105)
Hi, I need some help. I want to open a RUN.bat file, but every time I try to open it my computer gives a message saying "This app can't run on your pc".
In Properties, you need to check the 'Unblock' box and then press 'OK'

A.png

I would suggest that you run this .bat file 'Run as Administrator'.
 

My Computer

System One

  • OS
    Windows 11 Pro v 22H2 (Build 22621.105)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Inspiron 3670
    CPU
    Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz 2.81 GHz
    Motherboard
    64-bit operating system, x64-based processor
    Memory
    8.00 GB
    Graphics Card(s)
    Intel(R) UHD Grahics 630; NVIDIA Geforce GT 1030
    Monitor(s) Displays
    Dell P2714H Monitor
    Screen Resolution
    1920 x 1080
    Hard Drives
    1 x 1TB WDC WD10EZEX-75WN4A0 Internal HDD
    1 x 1TB Seagate STGX4000400 External HDD
    1 x 2TB Seagate STGX4000400 External HDD
    1 x 4TB Seagate STGX4000400 External HDD
    Keyboard
    Microsoft Wired Keyboard 600
    Mouse
    Microfoft USB Basic Optical Mouse v2.0
    Browser
    Firefox
    Antivirus
    Windows Defender + Malwarebytes

FreeBooter

Well-known member
Power User
VIP
Local time
5:27 AM
Posts
735
OS
Windows 11
In Properties, you need to check the 'Unblock' box and then press 'OK'

View attachment 17180

I would suggest that you run this .bat file 'Run as Administrator'.
Its empty batch script which is created by OP which does not need to be unblocked also cannot be executed because its empty file.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Pavilion
    CPU
    AMD Ryzen 7 5700G
    Motherboard
    Erica6
    Memory
    Micron Technology DDR4-3200 16GB
    Graphics Card(s)
    NVIDIA GeForce RTX 3060
    Sound Card
    Realtek ALC671
    Monitor(s) Displays
    Samsung SyncMaster U28E590
    Screen Resolution
    3840 x 2160
    Hard Drives
    SAMSUNG MZVLQ1T0HALB-000H1

FreeBooter

Well-known member
Power User
VIP
Local time
5:27 AM
Posts
735
OS
Windows 11

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Pavilion
    CPU
    AMD Ryzen 7 5700G
    Motherboard
    Erica6
    Memory
    Micron Technology DDR4-3200 16GB
    Graphics Card(s)
    NVIDIA GeForce RTX 3060
    Sound Card
    Realtek ALC671
    Monitor(s) Displays
    Samsung SyncMaster U28E590
    Screen Resolution
    3840 x 2160
    Hard Drives
    SAMSUNG MZVLQ1T0HALB-000H1

Berton

Well-known member
Member
VIP
Local time
8:27 PM
Posts
673
Location
Wyoming
OS
Win11 Pro RTM x64
I ran the ProgressBar.bat file and appears it does what it's supposed, display the progress bar. A .bat [batch] file is a command that does whatever is in it which has to be a valid command. A definition of a batch/.bat file from a Quick Reference Guide for MS-DOS 6 by Karl Schwartz [a bit old but mostly still valid]:
Batch file
An ASCII file containing MS-DOS commands and programs to be run.
There's still a number of DOS commands in Windows that can be run in the Command Prompt and/or in PowerShell or the new Terminal in Win11.
 

My Computers

System One System Two

  • OS
    Win11 Pro RTM x64
    Computer type
    Laptop
    Manufacturer/Model
    Dell Vostro 3400
    CPU
    Intel Core i5
    Memory
    8GB
    Hard Drives
    256GB SSD NVMe
  • Operating System
    Windows 11 Pro RTM x64
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Vostro 5890
    CPU
    Intel Core i5
    Memory
    16GB
    Graphics card(s)
    Onboard, no VGA using DisplayPort-to-VGA adapter
    Monitor(s) Displays
    21"
    Hard Drives
    512GB SSD NVMe, 2TB WDC HDD
    Browser
    Firefox, Edge
    Antivirus
    Windows Defender/Microsoft Security
Top Bottom