Learn About Computers

Teaching about Computers

    20. Writing Bat Files Part 4



    Posts : 95
    Join date : 2018-03-24

    20. Writing Bat Files Part 4

    Post by Aof on Mon May 07, 2018 2:41 am

    20. Writing Bat Files Part 4, Startup File

    Contents of startupq.bat

    @echo off
    title Startup Question

    shutdown /s /t 60 /c "System Shutdown in 60 Seconds"
    echo System Shutdown in 60 seconds.
    set /p input=What do you want to do?
    if /i "%input%"=="web" goto WEB
    if /i "%input%"=="web" goto NONE
    if /i "%input%"=="n" goto EMPTY
    shutdown /a
    timeout /t 01
    start "" "C:\Windows\System32\notepad.exe"
    timeout /t 01
    start "" "C:\Users\User1\Desktop\Folder the 2nd one\IMAGE01.JPG"
    timeout /t 01
    start "" "http://www.youtube.com"
    timeout /t 02
    shutdown /a
    echo You have selected None.
    timeout /t 05 > nul

    Also I explain a short-cut is just a link to the file itself, rather than the actual executable file.

      Current date/time is Sun Dec 16, 2018 10:36 pm