Solved Batch syntax


borgus

Active member
Local time
1:51 AM
Posts
15
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
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
    32 GB DDR4-3200 SDRAM
    Graphics Card(s)
    Intel® Iris® Xᵉ Graphics
    Screen Resolution
    1920x1080
    Hard Drives
    2TB PCIe® NVMe™ M.2 SSD
  • Operating System
    macOS Ventura
    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
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
    32 GB DDR4-3200 SDRAM
    Graphics Card(s)
    Intel® Iris® Xᵉ Graphics
    Screen Resolution
    1920x1080
    Hard Drives
    2TB PCIe® NVMe™ M.2 SSD
  • Operating System
    macOS Ventura
    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
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

Latest Support Threads

Back
Top Bottom