C:\Windows;
C:\Windows\system32;
And loads of other places. In the Linux/Unix/Mac side of things one of the directories include.
\usr\bin;
\usr\local\bin;
And loads some other places that usually depends on your flavor of the operating system.If you are interest in finding out your path variable in the command prompt/terminal type this for Windows users:
echo %PATH% (Windows will accept everything in small letters)
On the Linux/Unix/Mac side of things type in:
echo $PATH (Depending on the shell and the Linux variant you are running it may accept things in small letters but to be safe use caps).
Now since I have been using Ubuntu 11.10 for about a month or so exclusively I have become used to how you can add software packages and commands to the list of commands that are built into Linux. This process can probably also be called softlinking applications. This therefore, allows me to stay in the terminal and when I want I can open the program that I want with a simple command. If you are interested in seeing how to soft link applications in Linux please refer to this article not written by me.
On the Windows side of things it is a bit different instead of creating a link to the application you want to be available in the command line you simply add the path to the folder to the Environmental variable by following the following simple steps.
- Right-click on the "My Computer" icon on the desktop or press Windows + Pause/Break (another shortcut that I need to add to the previous post).
- Click on "Advanced system settings".
- Then click on "Environment Variables...".
- Look for a variable called "PATH" and double-click it or select it and click on "Edit".
- In the "Variable value:" textbox at the end of the string that already exists add a semi-colon if its not already there and paste the path to the folder that your interested in. Note the path has to be the absolute path.
The goal for this exercise is to have the adb tool available to me in the command line so I don't have to be in the Android-SDK folder and in the Platform-Tools folder to be able to access it. For those who don't know adb is a command line utility that is part of the Android SDK for developing applications and connecting to your device through the terminal and accessing things that even Eclipse with ADT installed will not let you.
Attempt 1
So, since I am so used to the Linux way of doing things I thought making a shortcut of the executable file and placing that in the C:\Windows directory would do the trick. So after I made a shortcut to the adb executable and placed it in the Windows folder and tired to run in the command line this was the result.
OK so maybe I should have renamed the shortcut so the name is just "adb.exe". So I did the renaming and still same result :(. Needless to say I was just a bit annoyed at this point in time. Although guess what, even though I have extensions turned on and I had explicitly named the file how I wanted it to be named when I did a "dir" command guess what I notice.
Yup... Windows will add the lnk extension even though I had renamed it. OK no problem so the lnk extension is still there I decided to rename the file in the command prompt itself so that it doesn't have the lnk extension.
So I have reached a deadend. I know that the program can be executed on the command prompt but thats only if I am in the folder that contains the file or if the path variable has been set.
So I leave you guys at a bit of a sad ending. I am continuing my pursuit or finding a way to solve this problem. Unfortunately making a symbollic link to the application doesn't solve the problem either. If anyone has any ideas please let me know as well.
2 comments:
I really appreciate your post and you explain each and every point very well.Thanks for sharing this information.And I’ll love to read your next post too.
Thanks mate. You might want to leave your name next time cause all anonymous comments go to spam by default :)...
Post a Comment