How to make your computer welcome you on every startup part- 2

Hi guys, have you ever wondered how cool it would be if your computer starts to talking to you and starts to greet you every time when you turn on your system. This isn’t something that can’t happen.

Today we are going to make our dream come true. That’s right today I’m going to show you guys how we can build a simple program to greet you on every startup and open few basic applications. We have already done an article on how to make your computer welcome you everytime it starts but this is an advanced version of that. Cool part is that you don’t have to run this program, it will automatically run on every startup.

Do you remember that in my last post I discussed on how we can create a simple text to speech program that is the basic concept used in here. We will use the same language (Vbscript) to build this program.

And as usual you don’t need any IDKs or compilers to run this program. All that you need is an text editor (Notepad).

Okay let’s start with a simple process :

  1. This program is built in such a way that on every startup it will open your default browser and loads some predefined URLs, so make sure your computer is always connected to the internet.
  2. Open the notepad in your system and start writing the below code.
     
    Dim sapi,objShell,URL,URL1,URL2 
    URL = "www.google.com" 
    URL1 = "https://www.facebook.com/" 
    URL2 = "https://web.whatsapp.com/" 
    Set objShell = Wscript.CreateObject("WScript.Shell") 
    Set sapi=CreateObject("sapi.spvoice") 
    sapi.Speak ("Its good to see you again sir.") 
    WScript.Sleep 400 
    sapi.Speak ("Coding geek system initiated") 
    sapi.Speak ("connecting to world wide web, global IP obtained") 
    sapi.Speak (" System is fully operational") 
    sapi.Speak ("initiating basic programs") 
    objShell.Run "explorer.exe" 
    objShell.Run(URL1) 
    objShell.Run(URL2) 
    objShell.Run(URL) 
    sapi.Speak ("Have a nice day sir") 
    Set objShell = Nothing
      
    
  3. And now save it by pressing ctrl+S and select .vbs as file extension.
  4. Now this is the important step, copy the file to the following location to execute this program on every startup.
  5. Press windows key+r to open the run window. Type %appdata% and hit enter.
  6. An new windows opens from there go to this location : Microsoft -> Windows -> Start Menu -> Programs -> Startup and paste your .vbs file.
  7. From now on when your system booted this program will be executed.

Let’s just not copy and paste rather try to type the whole code by yourself, trust me you will get some ideas while typing it.


And now GEEK section:

This program has lots of cool features and fully customizable, but you should know to do that!! Geeks prefer to know more that any other normal users right ? That’s why we are called geeks! Lets see what we need to now about this code to fully customize it :

  1. First we declare several variables using the DIM. (line no. 1)
  2. Then we assign some website URLs to the variables like ‘URL1′,’URL2’ (line no. 2-4)
  3. Then we create two objects sapi and objShell, where sapi is the voice object and the objShell is the object shell to run commands.
  4. Then we use ‘Speak’ function with sapi to make the computer talk.
  5. And ‘Run’ function with ‘objShell’ to run the programs (to open applications).
  6. In line no. 8 , ‘Wscript.Sleep’ is the function used to pause the program for the given milliseconds.
  7. Finally objShell is set to nothing.
  8. That’s it, this simple code can greet you when every you turn on your PC.

That’s it guys hope you liked it. You can give your suggestions and ask queries below. Stay tuned from more cool stuffs!!

Do Share and Subscribe.

Keep Coding!! Happy coding!! :)

  • akash sinku

    mister om prakash this is an operating os
    i think so, but the way it look for me is to build an page or porgram.

  • kamal joshi

    Good article I ll try it out for sure

  • Kit Krishna

    Superb om