DEV Community

Indian Tech Hunter
Indian Tech Hunter

Posted on • Updated on

Make Your Windows PC Greet You According to Current Time

Make your PC Greet youAs I have written the previous post on a very interesting topic that was about to Make your Computer Greet you but that was very first and basic Script to do that. Now it’s time to do something new, hilarious and awesome.

So this script will make your computer greet you with the current time of your PC. Example: Good Morning user, the current time is 8:30 AM. Yes, you heard it Right this script will detect the Current time and Greet you Accordingly. Like an intelligent Programme. Good morning in the morning Before 12′ o Clock and after that Good Afternoon and Good Evening and Midnight.

If you want a simple “Hello READERS! Welcome to indiantechhunter.in” greeting at the startup of your window PC then do check our old previous post on how to make your computer welcome you.

1st Step To Make your PC greet you according to Time:

Open any Text Editor that you are comfortable with or you like as I have told you that we are going to do some simple Copy+Paste and Change some text in it. So we simply Use Notepad that is already available on your PC.

To open the notepad, You can press the Win Logo Button+R to open the RUN dialogue box and type ‘notepad’ in the search box and hit ENTER.

OR

Press on the Windows Home button and type notepad to search it.

2nd Step to make your computer Greet you according to the current Time:

Copy the Code given Below and Paste it in the Text Editor. You have to change some words or some of them should replace according to you.

For example, let’s Suppose your name is Prashant/Priyanka, then You should replace the text ‘User’ with Prashant/Priyanka. in the following code.

Copy this code And Paste it into the Text editor

Set Sapi = Wscript.CreateObject("SAPI.SpVoice") 
dim zira
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
Enter fullscreen mode Exit fullscreen mode

Caution: Don’t Change anything other than USER. Replace User with your Good Name to call your name by Your Narrator. If you change any other part of the script/Code, then Script may break and may not Work. Do it at your own risk.

3rd step to Save the Code/Script:

This is the most important step and here you should be more Careful. Because we are not Going to save this file as (.TXT) or (.PDF) or (.DOCX) and anything like that. You must save this Script with [.vbs]. To save it press ctrl+s and you can rename it like [welcome.vbs] as we have shown you in the following picture.
Saving welcome file

Step 4th the Final Most Important Step:

Well! Will your computer started Greeting you? Are you Done? Not at all because you haven’t done the most important step. The final step is to move the created welcome.vbs file to the startup folder.

For that, you just Press Windows Logo key+R to open the “Run” Dialogue box or just press the Window logo key and type Run which will search the Run box.

Then in the open: box, type, “shell:startup” and hit Enter.

Now it will open a new window in the File Explorer. Further, just Drag and drop the welcome.vbs in that folder which you were saved on your desktop.

That’s it. Now, whenever you start your Windows device it will greet you.

Ease for You as a Bonus

Maybe you are reading it on your smartphone or for any reasons you may not be unable to copy-paste the script above. So here I have done half of your work, just download and paste the Welcome.vbs file to the location mentioned above.

What you want in the next Post from my end? Feel free to suggest to me any tricks, tips or anything related to technology.

Comment below the topic you want to be covered in this blog, I will definitely cover that topic.

For Now, share this post with your Friends and Family if you think you have Learnt anything from this post.

For contacting me you can reach me on
Youtube,
Quora,
Instagram,
Twitter.

Top comments (0)