Introduction: 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.

Comments

author
Crazybeast1998 made it!(author)2016-01-20

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?

author
Zane+Studios made it!(author)2017-01-16

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.

author
Roman222222 made it!(author)2017-01-10

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

author
Nadeenragab made it!(author)2016-01-30

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

author
Roman222222 made it!(author)2017-01-10

me either need help

author
nadeenragabb made it!(author)2016-06-07

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

author
CatherineT33 made it!(author)2016-08-01

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.
author
BillM128 made it!(author)2016-06-15

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:

author
PIYUSHT7 made it!(author)2016-03-27

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

author
Super_Nerd made it!(author)2016-03-27

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.

author
LoveS10 made it!(author)2016-03-05

simply delete the double quotes " and write again, it will work.

Dim speaks, speech
speaks="Welcome to your PC, Username"
Set speech=CreateObject("sapi.spvoice")
speech.Speak speaks

author
sarah_sam made it!(author)2016-02-25

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.

author
JesswinM made it!(author)2016-02-11

is there a way to change the voice? help me here! thanks

author
Super_Nerd made it!(author)2016-02-11

It depends on your OS. If you have Windows 7, you're out of luck. As for the later versions of Windows, you can search for the Text to Speech control panel to change your computer's default voice.

author
Crazybeast1998 made it!(author)2016-01-20

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?

author
Crazybeast1998 made it!(author)2016-01-20

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?

author
Ajpaw1126 made it!(author)2015-12-20

Hi, I'm currently running windows 10 and I do not know how to pin the file to the start up menu. If anyone could help me it would be greatly appreciated, Thank you.

author
Crazybeast1998 made it!(author)2016-01-14

You need to go to the startup folder and put it in there rather than the start menu, you can find the startup menu here (just replace anything in brackets with what it says in the brackets): C:\(insert your username for your computer in these brackets and remove the brackets)\Admin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

author
Crazybeast1998 made it!(author)2016-01-14

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?

author
DrishtiS made it!(author)2015-07-17

Hello Dude, Can u help me out this??

Dim speaks, speech

speaks=”Welcome to hacvitism labs, Gaurav”

Set speech=CreateObject(“sapi.spvoice”)

speech.Speak speaks

This is what i have pasted on the startup folder, But when i restart the computer i get the compilation error. I know its not the same thing u have posted above but no one is helping me into this, not even the guy who have posted this on his blog, Plz help me what should i do to make my computer greet me,\

Thank you

author
Super_Nerd made it!(author)2015-07-17

That error was a fairly interesting one. Instead of it being in what was written, it was in how it was written. You see, the quotation marks you have there are different than regular ones. (Probably a Unicode character) Notice how before the word sapi on line 3 the character is pointing upwards. VBS only uses the regular quotation mark character as opposed to those special ones. They probably got added in on the text editor for your source's blog. Anyways, you can either replace the four quotation marks manually, (Just delete them and retype them and you should get the right kind) or you can copy this version of your code that I fixed myself. Best of luck!

Dim speaks, speech

speaks="Welcome to hacvitism labs, Gaurav"

Set speech=CreateObject("sapi.spvoice")

speech.Speak speaks

author
Rinku305. made it!(author)2015-10-30

Dim speaks,speech

speaks="Rinku,Welcome to your lappi"

Set speech=CreateObject("sapi.spvoice")

speech.Speak speaks

hii dear copy this and save this it will work properly

author
Rinku305. made it!(author)2015-10-30

hii dear pls copy this and change your name at the place of Rinku. then your computer will welcome of you guaranteed.

Dim speaks,speech

speaks="Rinku,Welcome to your lappi"

Set speech=CreateObject("sapi.spvoice")

speech.Speak speaks

author
alpe_97 made it!(author)2011-05-30

So what if you decide that you don't want that anymore. Would you go into startup folder and just delete it?

author
Super_Nerd made it!(author)2011-05-31

Precisely

author
050304 made it!(author)2015-10-13

hi im a begginer hacker and i was wondering if you could tell me some c tricks

author
Super_Nerd made it!(author)2015-10-13

I haven't ever really worked with C. The best thing I can tell you is to just search for a tutorial online. C's a pretty popular language so I can imagine very little difficulty in finding beginner information. Happy coding!

author
alpe_97 made it!(author)2015-10-13

Welcome to the NSA watchlist.

author
CharanC1 made it!(author)2015-06-18

excellent guys i am surprised

author
PeterC6 made it!(author)2015-05-14

Hey really good tutorial really helped and super useful. But I don't really know anything about coding but is their anyway you could make the code tell you the weather? I also want to know if you can play a playlist right from the script, so that in start up it starts playing playlist music in shuffled order.

author
Super_Nerd made it!(author)2015-05-17

While I'd imagine both are possible in some way through VBS. I would recommend searching on the internet for someone who knows the language better than I do. I haven't programmed using VBS in quite a while.

author
PeterC6 made it!(author)2015-05-17

Thanks for the recomendation :) and is the programming language just called VBS?

author
Super_Nerd made it!(author)2015-05-18

VBS stands for visual basic script. The language itself is visual basic, but that typically refers to the development software it's used in. Scripts are the programs you write to stand alone, which covers this case.

author
b.JakeLegend.d made it!(author)2015-05-05

any way to get it to tell you the weather using vbs?

author
Super_Nerd made it!(author)2015-05-05

Like I mentioned in your other comment. You can utilize the HTTP object demostrated in the link I previously provided, to get the data off of a weather web page of your choice, and then parse out the data that you need.

author
Sch3cter made it!(author)2012-02-15

Hi,

I was wondering if I could have some help with this? Everytime I try I get this error:

Script:
C:\Users\Sch3cter\AppData\Roaming\Microsoft\Windows\Start\Menu\Programs\Startup\Welcome.vbs
Line: 1
Char: 18
Error: Expected ')'
Code: 800A03EE
Source: Microsoft VBScript Compliation error

This is the script I'm using ( exactly as it appears in Notepad)

msgbox("Hi,0+64,"Computer")

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

dim str

if hour(time) < 12 then
Sapi.speak "Good Morning Schecter"
else
if hour(time) > 12 then
if hour(time) > 16 then
Sapi.speak "Good evening Schecter"
else
Sapi.speak "Good afternoon Schecter"
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


*** I'm probably just doing something really easy and stupid but I can't see anything.

Thanks,
Schecter

author
100step made it!(author)2014-10-27

Hello .. the thing u are doing wrong is that u r using msgbox("Hi,0+64,"Computer")

No, The was just as example ... Delete it from the code and your right on the way

author
Super_Nerd made it!(author)2012-02-15

You forgot to put another quotation mark around Hi.

author
Sch3cter made it!(author)2012-02-16

Hi,

Thanks, I doesn't work at all if I keep that first part "msgbox....." in even if it is typed properly. If I remove it completely it works but the voice is very choppy and stuttery.

Thanks,
Robbie

author
Super_Nerd made it!(author)2012-02-16

Sorry but the voice will still be choppy. (I ran into a text string limit) However the message box part now works. Here is the script.

a=msgbox ("Hi",0+64,"Computer")

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

dim str

if hour(time) < 12 then
Sapi.speak "Good Morning Schecter"
else
if hour(time) > 12 then
if hour(time) > 16 then
Sapi.speak "Good evening Schecter"
else
Sapi.speak "Good afternoon Schecter"
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

author
Super_Nerd made it!(author)2012-02-16

Well the voice being choppy I can rewrite the script to have a text string so it says it all in a sentence at the end. The message box, well, I'll just rewrite the script for you. I will post it soon.

author
NoahT1 made it!(author)2014-09-06

can you just copy and paste

author
Super_Nerd made it!(author)2014-09-07

Yes, but you still need to save it in your startup folder as a vbs script. The only modifications you need to make to the code are changing the word user to your name if you want.

author
shadowfalls made it!(author)2014-01-09

my computer takes forever before it says the greeting. could it be speed up???

author
Super_Nerd made it!(author)2014-01-09

I'm not sure, it may just be a consequence of having to load the script host to run the program at startup.

author
Weetile made it!(author)2013-01-06

It is the same for Windows XP too!
All Programs > Startup
Add XP too!

author
BigMikeDog made it!(author)2012-01-06

can i change the voice of the person because at 5 in the morning it kind of freaks me out

author
Super_Nerd made it!(author)2012-01-06

If you have windows vista or 7 your stuck with Anna but if you have XP you can download 2 voices off of the microsoft website. Search for microsoft mike and mary.

author
BigMikeDog made it!(author)2012-01-09

darn i have 7. Will 7 not let you download more voices or is it that it doesn't like the code in the voice file?

author
Super_Nerd made it!(author)2012-01-09

I think they did that to 7 because there could be viruses in it. Not completely Sure.

About This Instructable

58,038views

13favorites

License:

Bio: 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."
More by Super_Nerd:Make an assistant for your computer in 5 minutesTrack Computer Usage in 2.5 minutesHow to be a MAD Scientist! MU-AH HA HA HA!
Add instructable to: