Make Your Computer Greet You When You Use It

I find a quote from Bill Gates makes a very good description. "Be nice to nerds. Chances are you...

Intro: Make Your Computer Greet You When You Use It

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)

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.

Share

    Recommendations

    • Furniture Contest 2018

      Furniture Contest 2018
    • Metalworking Contest

      Metalworking Contest
    • Tiny Home Contest

      Tiny Home Contest

    61 Discussions

    0
    None
    AnaW11

    7 months ago

    is there anyway to change the voice?

    0
    None
    Crazybeast1998

    2 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?

    1 reply
    0
    None
    ChildOfYahwehCrazybeast1998

    Reply 11 months 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
    None
    sarah_sam

    2 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.

    1 reply
    0
    None
    BillM128

    2 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:

    1 reply
    0
    None
    ChildOfYahwehBillM128

    Reply 11 months ago

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

    0
    None
    Nadeenragab

    2 years ago

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

    3 replies
    0
    None
    ChildOfYahwehRoman222222

    Reply 11 months ago

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

    0
    None
    ChildOfYahwehNadeenragab

    Reply 11 months ago

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

    0
    None
    Roman222222

    1 year ago

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

    1 reply
    0
    None
    ChildOfYahwehRoman222222

    Reply 11 months ago

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

    0
    None
    Sudeep1

    1 year 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
    None
    Crazybeast1998

    2 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?

    1 reply
    0
    None
    Zane StudiosCrazybeast1998

    Reply 1 year 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
    None
    nadeenragabb

    2 years ago

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

    1 reply
    0
    None
    CatherineT33nadeenragabb

    Reply 2 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.
    0
    None
    PIYUSHT7

    2 years ago

    I usually make my computer sleep!!
    Can you give the code that welcomes me when the pc wake up's after sleep.

    1 reply
    0
    None
    Super_NerdPIYUSHT7

    Reply 2 years ago

    Most likely, not easily. The way this code runs on startup is from being placed in the startup folder. There may be a setting in Windows to run the startup folder when waking from sleep, but there isn't an easy fix in the code. Sorry.