Learn About Computers

Would you like to react to this message? Create an account in a few clicks or log in to continue.
Learn About Computers

Teaching about Computers


    20. Writing Bat Files Part 4

    avatar
    Aof
    Admin


    Posts : 97
    Join date : 2018-03-24

    20. Writing Bat Files Part 4 Empty 20. Writing Bat Files Part 4

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


    20. Writing Bat Files Part 4, Startup File
    ----
    20. Writing Bat Files Part 4 Before10
    ----
    Contents of startupq.bat
    =*=

    Code:
    @echo off
    title Startup Question

    :BEGIN
    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
    :WEB
    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
    exit
    :NONE
    shutdown /a
    echo You have selected None.
    timeout /t 05 > nul
    :EMPTY
    exit

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

      Current date/time is Mon May 06, 2024 11:53 am