.bat files won’t run

jg39jm44

Member
Local time
3:17 PM
Posts
4
I created a few bat files in Windows 10 pro (latest edition) that when copied over to Windows 11(with all updates and on Insider edition) open but will not run. Administrator box is checked in properties.
The bat files are simple files to run some Dism commands and SFC /scannow etc.
 
Windows Build/Version
11 Insider latest edition

My Computer

System One

  • Operating System
    Windows 20 pro and Windows 11 pro Insider
    Computer type
    Laptop
    Manufacturer/Model
    HP Spectre 360 15 inch
    CPU
    I7 8550
    Memory
    16gb
    Graphics Card(s)
    Nvidia MX 150 internal
    Sound Card
    None
    Monitor(s) Displays
    N/a
    Screen Resolution
    Ultra 4k
    Hard Drives
    Samsung 360 pro ssd
    Internet Speed
    400 mps
    Browser
    Edge & Chrome
    Antivirus
    Windows Defender

hsehestedt

Well-known member
Member
VIP
Local time
3:17 PM
Posts
287
Location
Texas, USA
Welcome to ElevenForum!

Try modifying your batch file by adding a "pause" as the last line of the batch file. That will keep the window open so that you can see any error messages. My guess would be that the batch file is not finding the path to commands such as DISM.EXE, but hopefully this will help to confirm whether this is the case or not.
 

My Computers

System One System Two

  • Operating System
    Windows 11 21H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    300Mb down / 20Mb up
    Browser
    Chromium Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Windows 11 21H2
    Computer type
    Laptop
    Manufacturer/Model
    HP Spectre x360 15-BL012DX
    CPU
    Intel i7-7500U
    Memory
    32GB
    Graphics card(s)
    Dual Intel HD 620 and Nvidia GeForce 940MX
    Sound Card
    Built-in Realtek HD Audio
    Monitor(s) Displays
    4k 15-inch
    Screen Resolution
    4k (3840 x 2160)
    Hard Drives
    1TB Seagate FireCuda 510 NVMe SSD
    Internet Speed
    300Mb down / 20Mb up
    Browser
    Chromium Edge
    Antivirus
    Windows Defender
    Other Info
    RAM Upgraded from 16GB to 32GB WiFi Upgraded from WiFi 5 to WiFi 6 SSD upgraded from 512GB NVMe SSD to 1TB Seagate FireCuda 510 NVMe SSD

FreeBooter

Active member
Member
VIP
Local time
11:17 PM
Posts
195
Execute attached batch script if it works, then your scripts needs to be corrected as @hsehestedt mention use Pause command to view the error outputs.
 

Attachments

  • Sfc.bat
    811 bytes · Views: 4

My Computer

System One

  • Operating System
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Pavilion
    CPU
    AMD Ryzen 7 5700G
    Motherboard
    HP Pavilion Gaming Desktop TG01-2019nt
    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

jg39jm44

Member
Thread Starter
Local time
3:17 PM
Posts
4
Thanks FreeBooter for the SFC bat file. The file ran perfectly. Also thanks to @hsehestedt for his input.

I leaned a lot from you guys and I appreciate your quick input.
 

My Computer

System One

  • Operating System
    Windows 20 pro and Windows 11 pro Insider
    Computer type
    Laptop
    Manufacturer/Model
    HP Spectre 360 15 inch
    CPU
    I7 8550
    Memory
    16gb
    Graphics Card(s)
    Nvidia MX 150 internal
    Sound Card
    None
    Monitor(s) Displays
    N/a
    Screen Resolution
    Ultra 4k
    Hard Drives
    Samsung 360 pro ssd
    Internet Speed
    400 mps
    Browser
    Edge & Chrome
    Antivirus
    Windows Defender

FreeBooter

Active member
Member
VIP
Local time
11:17 PM
Posts
195
We are glad to hear your issue has been resolved, thank you for letting us know that all is now well!
 

My Computer

System One

  • Operating System
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Pavilion
    CPU
    AMD Ryzen 7 5700G
    Motherboard
    HP Pavilion Gaming Desktop TG01-2019nt
    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
Top Bottom