Saturday, February 25, 2012

Path Variables in Windows



What is a path Variable and how is it useful!!!
PATH is an environment variable available on several platforms that specifies a set of directories where the executable programs are located.
It helps the programs to load easier and faster via Command prompt compared to GUI.
This can be a temporary change or permanent change.

How to Update this Variable
My Computer -> (Rightclick) Properties -> Advanced(Tab) -> Environment Varaibles (Button)
You will see a Dialog Box divided as
User Variables
System Variables

You would find the PATH variable in both User and System Varaibles. But i would suggest you to work with User vaiables only.
Double Click the Path Variable and APPEND the path of the folder to its value.
Remember, every Directory names we specify should be separated by semi colon.

In Windows 7
Select Computer from the Start menu
Choose System Properties from the context menu
Click Advanced system settings > Advanced tab
Click on Environment Variables, under System Variables, find PATH, and click on it.
In the Edit windows, modify PATH by appending the location to the value for PATH. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location as the value.

You can set temporary path variables using SET Command that will be active until the command prompt is closed.

How it Works?
When a command is entered in a command prompt or a system call is made by a program to execute a program, the system first searches the current working directory and then searches the PATH, examining each directory specified in the value of the Path Variable from left to right, looking for an executable filename that matches the command name given.
Once a matching file is found, the system initiates a new process in which to run it.
If the system doesn't know the type of the file specified, it shows us an Open With Dialog as expected.

A simple example..At what instance this would be more useful..

Say, you save each of your daily activities in a separate Notepad (ddmmyy.txt format) and you would have to fetch previous files of some date frequently, Instead of going into the folder and searching for the file every time, you can use the above concept of PATH Variable.
You can list the path of the folder that contains these files in PATH variable..and now you can straight away give the filename (ddmmyy.txt) in RUN Dialog or Command Prompt to access any file in that folder.

This is also useful to run java programs via command prompt.

Thursday, February 2, 2012

Online Notepad


Even the technology is improving day by day, Corporate companies were not not allowing their associates to bring their own gadgets and work on it. So people were made to work on Client machines which would have a limited access or access restrictions.

Many a times, Associates work on their personal Data in Office and wish to get that data to their home Desktop, and Management may not allow them to transfer the data from work mail to personal mail as it is a security Voilation. There comes the concept of Online Notepad.

Take a Look at www.Shrib.com

You can notice a string (like l9tbjooz) is produced and a notepad is presented. What ever we save it here,can be accessed anywhere through Internet using below link
http://www.shrib.com/l9tbjooz
Further you can lock these notes from being visited/edited by others.

Go ahead..You might like it..

Blogger Tip to Categorize your Posts


Blogger tip:

If you wish to categorize your posts and get them in different pages, you can achieve it using the below procedure.

While scripting a new post, before publishing, on the right hand side, we can find an Options Panel-> Labels.
Put your post under a specific label(so called Category) and publish your post.

Now to create a new Page for this Category, Go to Pages section in Dashboard->
You will have an option to link a web address to access the new Page
Specify your Category link there and publish the page.

Example: If you have posts with Category as QUICK FIX
URL u specify for the page would be: https://your blogname.blogspot.com/search/label/QUICK%20FIX

Now view your Blog.You will have all the posts under specific category in that Page.

Windows Command:TASKKILL


I have read about a windows CMD Command called Taskkill. This command helps us to kill/end one or more processes that is running in your local machine as well as the remote machine.
Basic Syntax:
TASKKILL [/S system [/U username [/P [password]]]]
         { [/FI filter] [/PID processid | /IM imagename] } [/F] [/T]
/S can be used if we wish to end a process in a remote machine. If it is a local machine it is not necessary to code it.
/U is used to specify the username who initiated that process.
/P is used to specify the password for the specified Username. If this is omitted, It will prompt for it while execution.
/FI is used to filter the request criteria to its finest
/PID is used to kill the process by its process ID
/IM is used to kill the process by its process Imagename
/T is an option which is similar to Kill Process Tree in Task Manager

General Example:

taskkill /IM iexplore.exe -> will kill internet explorer in loacl machine
taskkill /s wrkstn01 /IM vlc.exe -> will kill VLC player on the machine "wrkstn01"
taskkill /s l01wkst01 /u "IT Dept" /im process.exe /f /t
will kill the whole process tree of given process.exe initiated under IT Dept user of 101wkst01 machine.

You can get info regarding Filters of this command in your machine with the command TASKKILL /? in CMD.

Ways to login to Facebook


    Facebook had created 3 ways lo login to the facebook account. This is only for the characters in the password. since the case is not applicable to the numerals

1). Password is not Case sensitive. You can enter your password even with a CAPSLOCK on.
2). Facebook will accept the purely Mirror case of the Password
Example: if the password is FAcebooK..then faCEBOOk also will work
3). When you login through Mobile, Facebook will accept password with First letter CAPS and the other characters can be lower case

This is intentionally coded because

Most of the times we will enter the password with caps lock on.
Also when the Caps lock is on, we will type Uppercase letters using SHIFT key.
When we login through mobile, by default first Character will take Caps and the remaining goes on with lower case.
Try it Out.....