Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: flashing banner + user input in batch or vbs  (Read 7665 times)

0 Members and 1 Guest are viewing this topic.

scriptsean

  • Guest
flashing banner + user input in batch or vbs
« on: May 26, 2010, 12:37:15 PM »
Hello Guru,
Is it possible to do this in batch or vbs on win2003:
When users execute the file, it will show a flashing welcome banner until users press any key, it then will go to the menu

Below is my sample code, but i got stock hope someone helps me

@echo off
:BANNER
cls
color c
echo Welcome!
sleep 1
cls
color e
echo Welcome!
sleep 1
goto :BANNER

:MENU
something.....





Sid



    Apprentice
  • Thanked: 8
    • Experience: Experienced
    • OS: Windows XP
    Re: flashing banner + user input in batch or vbs
    « Reply #1 on: June 04, 2010, 05:48:14 AM »
    Hello Guru,
    Is it possible to do this in batch or vbs on win2003:
    When users execute the file, it will show a flashing welcome banner until users press any key, it then will go to the menu

    Below is my sample code, but i got stock hope someone helps me

    @echo off
    :BANNER
    cls
    color c
    echo Welcome!
    sleep 1
    cls
    color e
    echo Welcome!
    sleep 1
    goto :BANNER

    :MENU
    something.....


    Sleep doesn't work in batch.

    Anyway, why do you want to do this?  What purpose will it serve?

    You might be able to do it using the "ping sleep work-around", but again, I don't really understand why you'd want to do this...

    An explaination of the "ping sleep work-around":

    Useing the ping command in the following way can effectively mimic the desired output of a "sleep" command

    ping 1.1.1.1 -n 1 -w 1000

    NOTES:
    1.1.1.1 MUST BE AN INVALID IP ON YOUR NETWORK
    The number following "-w" is the number of milliseconds to "wait", therefore 1000 = 1 second, 5000 = 5 seconds.
    The "pinging 1.1.1.1 with ..." dialog still displays

    Fleexy



      Intermediate

    • OW NEXT TIME I SHOULD TURN IT OFF BEFORE SERVICING
    • Thanked: 2
      • Yes
      • Yes
    • Experience: Experienced
    • OS: Windows XP
    Re: flashing banner + user input in batch or vbs
    « Reply #2 on: June 04, 2010, 05:24:51 PM »
    ping 1.1.1.1 -n 1 -w 1000 > nul

    will not display the "pinging 1.1.1.1 with..." part.
    I love .NET!