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.
64 Comments
3 years ago
Thanks it worked perfectly for me
3 years ago
Can you pls tell me how to do it on macbook Pro?
Question 4 years 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
5 years ago
is there anyway to change the voice?
7 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?
Reply 5 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.
7 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.
Reply 5 years ago
Make sure the ending is ".vbs" and not ".txt"
6 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:
Reply 5 years ago
You will need administrative privileges or permission to copy it to each user's startup folder.
7 years ago
i tried searching the startup program but i can't find it on the pc?
Reply 6 years ago
me either need help
Reply 5 years ago
press Win+R, type in Shell:Startup and copy/move/save the script in that folder
Reply 5 years ago
press Win+R, type in Shell:Startup and copy/move/save the script in that folder
6 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
Reply 5 years ago
When you press Win+R, type in Shell:Startup and copy/move/save the script in that folder.
5 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?
7 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?
Reply 6 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.
6 years ago
i'm trying this on a windows 10 and i can't find the Startup app anywhere, please help?