loading
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.
<p>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 &quot;the current time is...&quot; and then the time, it could say (presuming the time is 4:00PM and it is the first of January) &quot;the current time is 4:00PM on the first of January&quot;, also is it possible to have it say after the date &quot;I have noticed it is your birthday today Sir, happy birthday I am so sorry but I forgot to get you a present again&quot; 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?</p>
<p>All you do is change the &quot;hour(time)&quot; etc. functions to &quot;day(date)&quot; or </p><p>&quot;month(date)&quot; or &quot;year(date)&quot; function like this: </p><p>-------------------------------------------------------------------------</p><p>Set Sapi = Wscript.CreateObject(&quot;SAPI.SpVoice&quot;)</p><p> dim str</p><p> if day(date) = 16 then</p><p> if month(date) = 1 then</p><p> if year(date) = 2017 then</p><p> Sapi.speak &quot;Happy day user!&quot;</p><p> else</p><p> Sapi.speak &quot;Good day sir.&quot;</p><p> end if</p><p> end if</p><p> end if</p><p>-----------------------------------------------------------------------------</p><p>Then change the &quot;(date)&quot; functions to whatever date you want and then customize the greeting set for it.</p>
<p>I dont get it. i can do the windows button + r and there is no startup thing, ps i have a windows 10</p>
<p>i tried searching the startup program but i can't find it on the pc?</p>
<p>me either need help</p>
<p>i'm trying this on a windows 10 and i can't find the Startup app anywhere, please help?</p>
<p>To find your start up folder in Windows 10 ect:</p><ol><br><li>Hold down the Windows key, and type R.<li>Type: shell:startup.<li>Click OK.</ol>
<p>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. </p><p>File will need to be put in each user's startup folder:</p><p>C:\Users\<strong><em>{Put_</em></strong><em><strong>UserName_Here}</strong></em>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup</p><p>Here is the code:</p><p>==============</p><p>Set Sapi = Wscript.CreateObject(&quot;SAPI.SpVoice&quot;)</p><p>Set wshShell = CreateObject( &quot;WScript.Shell&quot; )</p><p>'Get User's Log-in Name</p><p>GreetName = wshShell.ExpandEnvironmentStrings( &quot;%USERNAME%&quot; )</p><p>dim str</p><p>Dim Greeting, Time_H, Time_M1, Time_M2, Time_AP</p><p>'Determine Time of Day for appropriate greeting</p><p>if hour(time) &lt; 12 then</p><p> Greeting = &quot;Good Morning. &quot;</p><p>else</p><p>if hour(time) &gt; 12 then</p><p>if hour(time) &gt; 16 then</p><p> Greeting = &quot;Good Evening &quot;</p><p>else</p><p> Greeting = &quot;Good Afternoon &quot;</p><p>end if</p><p>end if</p><p>end if</p><p>Sapi.speak Greeting &amp; GreetName</p><p>'Set Hour - for some reason it did not like using an un-fixed variable for the hour</p><p>Time_H = Fix(Hour(time))</p><p>'Set Minute variables</p><p>if minute(time) &lt; 10 then</p><p>Time_M1 = &quot;o&quot;</p><p>if minute(time) &lt; 1 then</p><p>Time_M1 = &quot;oclock&quot;</p><p>else</p><p>Time_M2 = minute(time)</p><p>end if</p><p>else</p><p>Time_M1 = minute(time)</p><p>Time_M2 = &quot; &quot;</p><p>end if</p><p>'Set AM/PM</p><p>if Time_H &gt; 12 then</p><p> Time_AP = &quot;P&quot;</p><p> else</p><p> if Time_H = 0 then</p><p> if minute(time) = 0 then</p><p> Time_AP = &quot;Midnight&quot;</p><p> else</p><p> Time_AP = &quot;AE&quot;</p><p> end if</p><p> else</p><p> if Time_H = 12 then</p><p> if minute(time) = 0 then</p><p> Time_AP = &quot;Noon&quot;</p><p> else</p><p> Time_AP = &quot;P&quot;</p><p> end if</p><p> else</p><p> Time_AP = &quot;AE&quot;</p><p> end if</p><p> end if</p><p>end if</p><p>'Adjust to 12-hour clock</p><p>if Time_H &gt; 12 then</p><p>Time_H = Time_H-12</p><p>end if</p><p>Sapi.speak &quot;The current time is &quot; &amp; Time_H &amp; &quot; &quot; &amp; Time_M1 &amp; &quot; &quot; &amp; Time_M2 &amp; &quot; &quot; &amp; Time_AP &amp; &quot; &quot; &amp; &quot;M&quot;</p><p>Here is the code:</p>
<p>I usually make my computer sleep!!<br>Can you give the code that welcomes me when the pc wake up's after sleep.</p>
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.
<p>simply delete the double quotes &quot; and write again, it will work.</p><p>Dim speaks, speech<br>speaks=&quot;Welcome to your PC, Username&quot;<br>Set speech=CreateObject(&quot;sapi.spvoice&quot;)<br>speech.Speak speaks</p>
<p>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.</p>
<p>is there a way to change the voice? help me here! thanks</p>
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.
<p>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 &quot;the current time is...&quot; and then the time, it could say (presuming the time is 4:00PM and it is the first of January) &quot;the current time is 4:00PM on the first of January&quot;, also is it possible to have it say after the date &quot;I have noticed it is your birthday today Sir, happy birthday I am so sorry but I forgot to get you a present again&quot; 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?</p>
<p>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 &quot;the current time is...&quot; and then the time, it could say (presuming the time is 4:00PM and it is the first of January) &quot;the current time is 4:00PM on the first of January&quot;, also is it possible to have it say after the date &quot;I have noticed it is your birthday today Sir, happy birthday I am so sorry but I forgot to get you a present again&quot; 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?</p>
<p>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.</p>
<p>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</p>
<p>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?</p>
<p>Hello Dude, Can u help me out this??</p><p>Dim speaks, speech</p><p>speaks=&rdquo;Welcome to hacvitism labs, Gaurav&rdquo;</p><p>Set speech=CreateObject(&ldquo;sapi.spvoice&rdquo;)</p><p>speech.Speak speaks</p><p>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,\</p><p>Thank you</p>
<p>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!</p><p>Dim speaks, speech</p><p>speaks=&quot;Welcome to hacvitism labs, Gaurav&quot;</p><p>Set speech=CreateObject(&quot;sapi.spvoice&quot;)</p><p>speech.Speak speaks</p>
<p>Dim speaks,speech</p><p>speaks=&quot;Rinku,Welcome to your lappi&quot;</p><p>Set speech=CreateObject(&quot;sapi.spvoice&quot;)</p><p>speech.Speak speaks</p><p>hii dear copy this and save this it will work properly</p>
<p>hii dear pls copy this and change your name at the place of Rinku. then your computer will welcome of you guaranteed.</p><p>Dim speaks,speech</p><p>speaks=&quot;Rinku,Welcome to your lappi&quot;</p><p>Set speech=CreateObject(&quot;sapi.spvoice&quot;)</p><p>speech.Speak speaks</p>
So what if you decide that you don't want that anymore. Would you go into startup folder and just delete it?
Precisely
<p>hi im a begginer hacker and i was wondering if you could tell me some c tricks</p>
<p>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!</p>
<p>Welcome to the NSA watchlist.</p>
<p>excellent guys i am surprised</p>
<p>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.</p>
<p>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.</p>
<p>Thanks for the recomendation :) and is the programming language just called VBS?</p>
<p>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.</p>
<p>any way to get it to tell you the weather using vbs?</p>
<p>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.</p>
Hi, <br><br>I was wondering if I could have some help with this? Everytime I try I get this error:<br><br>Script:<br>C:\Users\Sch3cter\AppData\Roaming\Microsoft\Windows\Start\Menu\Programs\Startup\Welcome.vbs<br>Line: 1<br>Char: 18<br>Error: Expected ')' <br>Code: 800A03EE<br>Source: Microsoft VBScript Compliation error<br><br>This is the script I'm using ( exactly as it appears in Notepad) <br><br>msgbox(&quot;Hi,0+64,&quot;Computer&quot;)<br> <br>Set Sapi = Wscript.CreateObject(&quot;SAPI.SpVoice&quot;)<br> <br>dim str<br> <br>if hour(time) &lt; 12 then<br>Sapi.speak &quot;Good Morning Schecter&quot;<br>else<br>if hour(time) &gt; 12 then<br>if hour(time) &gt; 16 then<br>Sapi.speak &quot;Good evening Schecter&quot;<br>else<br>Sapi.speak &quot;Good afternoon Schecter&quot;<br>end if<br>end if<br>end if<br> <br>Sapi.speak &quot;The current time is &quot;<br> <br>if hour(time) &gt; 12 then<br>Sapi.speak hour(time)-12<br>else<br>if hour(time) = 0 then<br>Sapi.speak &quot;12&quot;<br>else<br>Sapi.speak hour(time)<br>end if<br>end if<br> <br> <br>if minute(time) &lt; 10 then<br>Sapi.speak &quot;o&quot;<br>if minute(time) &lt; 1 then<br>Sapi.speak &quot;clock&quot;<br>else<br>Sapi.speak minute(time)<br>end if<br>else<br>Sapi.speak minute(time)<br>end if<br> <br>if hour(time) &gt; 12 then<br>Sapi.speak &quot;P.M.&quot;<br>else<br>if hour(time) = 0 then<br>if minute(time) = 0 then<br>Sapi.speak &quot;Midnight&quot;<br>else<br>Sapi.speak &quot;A.M.&quot;<br>end if<br>else<br>if hour(time) = 12 then<br>if minute(time) = 0 then<br>Sapi.speak &quot;Noon&quot;<br>else<br>Sapi.speak &quot;P.M.&quot;<br>end if<br>else<br>Sapi.speak &quot;A.M.&quot;<br>end if<br>end if<br>end if<br><br><br>*** I'm probably just doing something really easy and stupid but I can't see anything. <br><br>Thanks,<br>Schecter
<p>Hello .. the thing u are doing wrong is that u r using msgbox(&quot;Hi,0+64,&quot;Computer&quot;)</p><p>No, The was just as example ... Delete it from the code and your right on the way</p>
You forgot to put another quotation mark around Hi.<br><br>
Hi,<br><br>Thanks, I doesn't work at all if I keep that first part &quot;msgbox.....&quot; in even if it is typed properly. If I remove it completely it works but the voice is very choppy and stuttery. <br><br>Thanks,<br>Robbie
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.<br><br>a=msgbox (&quot;Hi&quot;,0+64,&quot;Computer&quot;)<br><br>Set Sapi = Wscript.CreateObject(&quot;SAPI.SpVoice&quot;)<br><br>dim str<br><br>if hour(time) &lt; 12 then<br>Sapi.speak &quot;Good Morning Schecter&quot;<br>else<br>if hour(time) &gt; 12 then<br>if hour(time) &gt; 16 then<br>Sapi.speak &quot;Good evening Schecter&quot;<br>else<br>Sapi.speak &quot;Good afternoon Schecter&quot;<br>end if<br>end if<br>end if<br><br>Sapi.speak &quot;The current time is &quot;<br><br>if hour(time) &gt; 12 then<br>Sapi.speak hour(time)-12<br>else<br>if hour(time) = 0 then<br>Sapi.speak &quot;12&quot;<br>else<br>Sapi.speak hour(time)<br>end if<br>end if<br><br><br>if minute(time) &lt; 10 then<br>Sapi.speak &quot;o&quot;<br>if minute(time) &lt; 1 then<br>Sapi.speak &quot;clock&quot;<br>else<br>Sapi.speak minute(time)<br>end if<br>else<br>Sapi.speak minute(time)<br>end if<br><br>if hour(time) &gt; 12 then<br>Sapi.speak &quot;P.M.&quot;<br>else<br>if hour(time) = 0 then<br>if minute(time) = 0 then<br>Sapi.speak &quot;Midnight&quot;<br>else<br>Sapi.speak &quot;A.M.&quot;<br>end if<br>else<br>if hour(time) = 12 then<br>if minute(time) = 0 then<br>Sapi.speak &quot;Noon&quot;<br>else<br>Sapi.speak &quot;P.M.&quot;<br>end if<br>else<br>Sapi.speak &quot;A.M.&quot;<br>end if<br>end if<br>end if<br>
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.
<p>can you just copy and paste</p>
<p>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.</p>
my computer takes forever before it says the greeting. could it be speed up??? <br>
<p>I'm not sure, it may just be a consequence of having to load the script host to run the program at startup.</p>
It is the same for Windows XP too! <br>All Programs &gt; Startup <br>Add XP too!
can i change the voice of the person because at 5 in the morning it kind of freaks me out
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.
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?
I think they did that to 7 because there could be viruses in it. Not completely Sure.

About This Instructable

56,458views

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 minutes Track Computer Usage in 2.5 minutes How to be a MAD Scientist! MU-AH HA HA HA! 
Add instructable to: