Make Your Computer Greet You When You Use It

73,331

15

63

Introduction: Make Your Computer Greet You When You Use It

About: I find a quote from Bill Gates makes a very good description. "Be nice to nerds. Chances are you'll end up working for one."

I noticed one day how rude my computer was to me. When I turned it on all it did was show the boot screen and then made me log in. When I logged in, expecting a welcome I just heard a logon sound. Well it isn't that impolite since the computer never knew I wanted it to do that but I still I would like it to have some manners. 

You will need.

A Windows 98 (or higher) Computer
Notepad (The program not the real thing)
5 minutes (unless your computer runs at a snail's pace)

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Open Notepad

First we need to open notepad to write the script.

Click Start>All Programs>Notepad

Step 2: The Code

Now copy this into notepad...
Where it says user you can put your name.

Set Sapi = Wscript.CreateObject("SAPI.SpVoice")

dim str

if hour(time) < 12 then
Sapi.speak "Good Morning User"
else
if hour(time) > 12 then
if hour(time) > 16 then
Sapi.speak "Good evening User"
else
Sapi.speak "Good afternoon User"
end if
end if
end if

Sapi.speak "The current time is "

if hour(time) > 12 then
Sapi.speak hour(time)-12
else
if hour(time) = 0 then
Sapi.speak "12"
else
Sapi.speak hour(time)
end if
end if


if minute(time) < 10 then
Sapi.speak "o"
if minute(time) < 1 then
Sapi.speak "clock"
else
Sapi.speak minute(time)
end if
else
Sapi.speak minute(time)
end if

if hour(time) > 12 then
Sapi.speak "P.M."
else
if hour(time) = 0 then
if minute(time) = 0 then
Sapi.speak "Midnight"
else
Sapi.speak "A.M."
end if
else
if hour(time) = 12 then
if minute(time) = 0 then
Sapi.speak "Noon"
else
Sapi.speak "P.M."
end if
else
Sapi.speak "A.M."
end if
end if
end if

Step 3: Save Me!

This step is important. Make sure that you follow this carefully.

Name it something like welcome.vbs .

It can be named anything as long as you give it the .vbs file extension. 

Step 4: Where It Goes

Now click start and go to 

All Programs>Startup

Then drag the file to the startup folder.

Note: In Windows Vista and 7 (Not sure about others) This will only run in your user, unless you do the same thing on all users. 

Step 5: You're Done!

Now restart your computer...

It should say good morning, evening, or afternoon and then the time.

Like always report any problems this program has to me.

Be the First to Share

    Recommendations

    • LED Strip Speed Challenge

      LED Strip Speed Challenge
    • Sculpting Challenge

      Sculpting Challenge
    • Clocks Contest

      Clocks Contest

    63 Discussions

    0
    DilNaz
    DilNaz

    3 months ago

    Can you pls tell me how to do it on macbook Pro?

    0
    BenL198
    BenL198

    Question 1 year ago on Introduction

    Thank you very much for this. Works perfectly. Only thing I'd like to change is the voice used. Currently reads in a default US but I'd like to change it to microsoft susan and I'm having trouble trying to find the string to do that

    0
    AnaW11
    AnaW11

    2 years ago

    is there anyway to change the voice?

    0
    Crazybeast1998
    Crazybeast1998

    4 years ago

    If one was to want to play some specific music at startup, could they not put a shortcut to a browser in the startup folder, and then have it set so that it brings up a specific youtube URL on startup, which happens to be the first song in the shuffled playlist, that you happen to have on your youtube account?

    0
    ChildOfYahweh
    ChildOfYahweh

    Reply 2 years ago

    You can do that easily. Go to the startup folder (press Win+R, type in Shell:Startup and copy/move/save the script in that folder) and right-click in the folder. Click on New and then Shortcut. Paste the URL of the playlist in there and then name the shortcut whatever you want. This will cause it to open the link in your default browser. YouTube will by default play that playlist as soon as it loads.

    0
    sarah_sam
    sarah_sam

    4 years ago

    so here's what happens with me. When I restart, it only opens up the vbs note I wrote the script in! I don't hear a voice whatsoever. It just keeps opening the notepad upon every startup.

    0
    ChildOfYahweh
    ChildOfYahweh

    Reply 2 years ago

    Make sure the ending is ".vbs" and not ".txt"

    0
    BillM128
    BillM128

    3 years ago

    I managed to get this to work for any user without the jerkiness. It still has to go in the user's startup folder, but it does not need to be modified to insert their name. Now if I can just figure out how to have it load for all users without having to have multiple copies.

    File will need to be put in each user's startup folder:

    C:\Users\{Put_UserName_Here}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

    Here is the code:

    ==============

    Set Sapi = Wscript.CreateObject("SAPI.SpVoice")

    Set wshShell = CreateObject( "WScript.Shell" )

    'Get User's Log-in Name

    GreetName = wshShell.ExpandEnvironmentStrings( "%USERNAME%" )

    dim str

    Dim Greeting, Time_H, Time_M1, Time_M2, Time_AP

    'Determine Time of Day for appropriate greeting

    if hour(time) < 12 then

    Greeting = "Good Morning. "

    else

    if hour(time) > 12 then

    if hour(time) > 16 then

    Greeting = "Good Evening "

    else

    Greeting = "Good Afternoon "

    end if

    end if

    end if

    Sapi.speak Greeting & GreetName

    'Set Hour - for some reason it did not like using an un-fixed variable for the hour

    Time_H = Fix(Hour(time))

    'Set Minute variables

    if minute(time) < 10 then

    Time_M1 = "o"

    if minute(time) < 1 then

    Time_M1 = "oclock"

    else

    Time_M2 = minute(time)

    end if

    else

    Time_M1 = minute(time)

    Time_M2 = " "

    end if

    'Set AM/PM

    if Time_H > 12 then

    Time_AP = "P"

    else

    if Time_H = 0 then

    if minute(time) = 0 then

    Time_AP = "Midnight"

    else

    Time_AP = "AE"

    end if

    else

    if Time_H = 12 then

    if minute(time) = 0 then

    Time_AP = "Noon"

    else

    Time_AP = "P"

    end if

    else

    Time_AP = "AE"

    end if

    end if

    end if

    'Adjust to 12-hour clock

    if Time_H > 12 then

    Time_H = Time_H-12

    end if

    Sapi.speak "The current time is " & Time_H & " " & Time_M1 & " " & Time_M2 & " " & Time_AP & " " & "M"

    Here is the code:

    0
    ChildOfYahweh
    ChildOfYahweh

    Reply 2 years ago

    You will need administrative privileges or permission to copy it to each user's startup folder.

    0
    Nadeenragab
    Nadeenragab

    4 years ago

    i tried searching the startup program but i can't find it on the pc?

    0
    Roman222222
    Roman222222

    Reply 3 years ago

    me either need help

    0
    ChildOfYahweh
    ChildOfYahweh

    Reply 2 years ago

    press Win+R, type in Shell:Startup and copy/move/save the script in that folder

    0
    ChildOfYahweh
    ChildOfYahweh

    Reply 2 years ago

    press Win+R, type in Shell:Startup and copy/move/save the script in that folder

    0
    Roman222222
    Roman222222

    3 years ago

    I dont get it. i can do the windows button + r and there is no startup thing, ps i have a windows 10

    0
    ChildOfYahweh
    ChildOfYahweh

    Reply 2 years ago

    When you press Win+R, type in Shell:Startup and copy/move/save the script in that folder.

    0
    Sudeep1
    Sudeep1

    2 years ago

    Set Sapi = Wscript.CreateObject("SAPI.SpVoice")

    dim str

    if hour(time) < 12 then

    Sapi.speak "Good Morning orchid"

    else

    if hour(time) > 12 then

    if hour(time) > 16 then

    Sapi.speak "Good evening orchid"

    else

    Sapi.speak "Good afternoon orchid"

    end if

    end if

    end if

    Sapi.speak "The current time is "

    if hour(time) > 12 then

    Sapi.speak hour(time)-12

    else

    if hour(time) = 0 then

    Sapi.speak "12"

    else

    Sapi.speak hour(time)

    end if

    end if

    if minute(time) < 10 then

    Sapi.speak "o"

    if minute(time) < 1 then

    Sapi.speak "clock"

    else

    Sapi.speak minute(time)

    end if

    else

    Sapi.speak minute(time)

    end if

    if hour(time) > 12 then

    Sapi.speak "P.M."

    else

    if hour(time) = 0 then

    if minute(time) = 0 then

    Sapi.speak "Midnight"

    else

    Sapi.speak "A.M."

    end if

    else

    if hour(time) = 12 then

    if minute(time) = 0 then

    Sapi.speak "Noon"

    else

    Sapi.speak "P.M."

    end if

    else

    Sapi.speak "A.M."

    end if

    end if

    end if

    this is how exactly it is on my notepad!! After starting, it does not greet goodmorning. It only speaks the time. any solutions please?

    0
    Crazybeast1998
    Crazybeast1998

    4 years ago

    If I was to want to make it so that this program spoke the date as well as the time, how would I go about doing that? For instance rather than having the computer just say "the current time is..." and then the time, it could say (presuming the time is 4:00PM and it is the first of January) "the current time is 4:00PM on the first of January", also is it possible to have it say after the date "I have noticed it is your birthday today Sir, happy birthday I am so sorry but I forgot to get you a present again" but only on your actual birthday, and then set it so that on other important days it says something else like if it is Christmas it could say Merry Christmas instead of good morning or something like that?

    0
    Zane Studios
    Zane Studios

    Reply 3 years ago

    All you do is change the "hour(time)" etc. functions to "day(date)" or

    "month(date)" or "year(date)" function like this:

    -------------------------------------------------------------------------

    Set Sapi = Wscript.CreateObject("SAPI.SpVoice")

    dim str

    if day(date) = 16 then

    if month(date) = 1 then

    if year(date) = 2017 then

    Sapi.speak "Happy day user!"

    else

    Sapi.speak "Good day sir."

    end if

    end if

    end if

    -----------------------------------------------------------------------------

    Then change the "(date)" functions to whatever date you want and then customize the greeting set for it.

    0
    nadeenragabb
    nadeenragabb

    3 years ago

    i'm trying this on a windows 10 and i can't find the Startup app anywhere, please help?

    0
    CatherineT33
    CatherineT33

    Reply 3 years ago

    To find your start up folder in Windows 10 ect:


    1. Hold down the Windows key, and type R.
    2. Type: shell:startup.
    3. Click OK.