Solved Batch syntax


borgus

New member
Local time
7:15 AM
Posts
12
OS
Windows 11 Pro
Tapping into the expertise of DOS fans, please relate the syntax for inserting an auto-complete four-second pause into the middle of this bat file. Efforts here have failed.

net stop cryptsvc
shutdown /r /t 0

Thanks
 

My Computer

System One

  • OS
    Windows 11 Pro

Archigos

Well-known member
Power User
Local time
10:15 AM
Posts
375
Location
Upstate New York
OS
Windows 11 Pro β
I re-read your question, you want one of the following:
Batch:
net stop cryptsvc
timeout /t 4 /nobreak >nul
shutdown /r /t 0
or
Batch:
net stop cryptsvc
ping 127.0.0.1 -n 4 > nul
shutdown /r /t 0
 

My Computers

System One System Two

  • OS
    Windows 11 Pro β
    Computer type
    Laptop
    Manufacturer/Model
    HP Pavilion Laptop 15-eg0070wm
    CPU
    Intel® Core™ i7-1165G7
    Memory
    16 GB DDR4-3200 SDRAM
    Graphics Card(s)
    Intel® Iris® Xᵉ Graphics
    Screen Resolution
    1920x1080
    Hard Drives
    512 GB PCIe® NVMe™ M.2 SSD
  • Operating System
    macOS Big Sur
    Computer type
    PC/Desktop
    Manufacturer/Model
    Apple iMac 27" 5K (2017)
    CPU
    3.4 GHz Quad-Core Intel Core i5
    Memory
    40 GB 2400 MHz DDR4
    Graphics card(s)
    Radeon Pro 570 4 GB
    Monitor(s) Displays
    27" 5K, 34" UW
    Screen Resolution
    Mon 1: 5120 × 2880 Mon 2: 2560 x 1080
    Hard Drives
    32GB NVME, 1TB SSD

Archigos

Well-known member
Power User
Local time
10:15 AM
Posts
375
Location
Upstate New York
OS
Windows 11 Pro β
timeout may not work on some systems, but ping will work on all of them
 

My Computers

System One System Two

  • OS
    Windows 11 Pro β
    Computer type
    Laptop
    Manufacturer/Model
    HP Pavilion Laptop 15-eg0070wm
    CPU
    Intel® Core™ i7-1165G7
    Memory
    16 GB DDR4-3200 SDRAM
    Graphics Card(s)
    Intel® Iris® Xᵉ Graphics
    Screen Resolution
    1920x1080
    Hard Drives
    512 GB PCIe® NVMe™ M.2 SSD
  • Operating System
    macOS Big Sur
    Computer type
    PC/Desktop
    Manufacturer/Model
    Apple iMac 27" 5K (2017)
    CPU
    3.4 GHz Quad-Core Intel Core i5
    Memory
    40 GB 2400 MHz DDR4
    Graphics card(s)
    Radeon Pro 570 4 GB
    Monitor(s) Displays
    27" 5K, 34" UW
    Screen Resolution
    Mon 1: 5120 × 2880 Mon 2: 2560 x 1080
    Hard Drives
    32GB NVME, 1TB SSD

borgus

New member
Thread Starter
Local time
7:15 AM
Posts
12
OS
Windows 11 Pro
Gracias. Appreciate the response. Either approach results in "error #5". When > nul is used, the response also contains "access denied."

No errors if the 'delay' line isn't included.
 
Last edited:

My Computer

System One

  • OS
    Windows 11 Pro
Top Bottom