Monday 28 November 2011

House Keeping Update

Hope everyone is doing good. Sorry guys but I do keep getting a couple of Anonymous comments which keep on going into the spam folder of my comments in the dashboard so as off now only "Registered Users" can comment. I am a bit unsure about exactly who registered users are but according to the information in the setting section its only people with an OpenID which according to me should be anyone with an email address but I ain't entirely sure.

Thanks and hope you still keep reading this blog.

Sunday 27 November 2011

Environment Variables... So Thats How Its Gonna Be

OK. So I tired a couple of things that I thought might work and came across this way that I thought might actually work. You see anyone who has used Linux knows that there is such a thing as an ALIAS command. An Alias in computing is more or less the same as in normal language but if your interested this is what it means in English. So any way the theory behind it is that you take a huge command such as in my case.

> "C:\Program Files (x86)\Android\android-sdk\platform-tools\adb"

And assign a smaller easier to remember command to it like just calling

> adb

As it is I used to use ALIASes all the time when I just started off using Linux cause I couldn't remember ls and instead just kept of typing dir. Anyway I figured why not try and implement that on Windows so a quick Google search later I found this http://www.unix.com/windows-dos-issues-discussions/74664-what-dos-equivalent-alias-command.html.

So I quickly fired up the command prompt and tired the one with the "doskey" command cause frankly I don't have to patience or time to figure out how the registry editor in Windows works. I have used it a couple of times before and I would just stick to what I was told in the tutorials. So anyway this is what I type in on the command prompt.

> doskey adb="C:\Program Files (x86)\Android\android-sdk\platform-tools\adb" %1

Now this is what I undertand by this I have assigned the string "adb" the value of a program with the absolute path (which I aint repeating) after which one more argument that should be supplied to the program I just called. So after setting this up I try the "adb" command on its own which should produce the help screen for the command explaining all the various commands that should be followed. I cross my fingers and press the enter key and thats it, it worked... I can honestly say that at this point in time I slap myself on my forehead with excitement. I spent almost 2 days trying all sorts of clever ways to link up the commands to the command prompt and this worked!!!

OK now time to get some work done...

OK so if you got here you probably knew there was something wrong. Yeah so when I typed in "adb devices" which is to check which devices are connected to the computer in debug mode I still get the help screen. So, I think to myself huh maybe I have forgotten the command and it should be "adb device" but no its not that either so I try one that I am 100% sure works cause it is the one that visible on the help screen "adb version" and guess what, that don't work either. So after reasonable amount of testing I figured out that although the alias has worked but it doesn't seem to be sending any arguments to "adb" therefore, my search carries on :(. Sorry guys still now solution but if you guys have any suggestions please do share :).

--UPDATE--

Holly crap sorry guys I was being dump but after having a look at the help file for "DOSKEY" again I figured that it needs $1 instead of %1 so the command

> doskey adb="C:\Program Files (x86)\Android\android-sdk\platform-tools\adb" $1

works fine. Yes after enough testing it can be concluded that I have found my solution :D... Now time to make aliases for some other commands

--/UPDATE