Update April 5th 2011: since the latest Android SDK, the adb tool has been moved to the platform-tools folder. I updated the script to point to the correct directory.
If you want to be able to just drag and drop your APK file onto a CMD file, and let it be installed on the connected device automatically, use something like this (simply copy this to your *.cmd file):
New:
:: Just some debug output:
echo Attempting to install file: %1
:: Enter drive letter:
d:
:: Enter path to adb here:
cd D:\android_sdk on 10.17.1.205\platform-tools
:: Install file:
adb install -r %1
PAUSE
Old:
:: Just some debug output:
echo Attempting to install file: %1
:: Enter drive letter:
d:
:: Enter path to adb here:
cd D:\androidsdk\tools
:: Install file:
adb install -r %1
PAUSE
PS: Of course one could use set varNAme=__PATH__ instead of the cd-ing, but my path has some spaces and that leads to troubles.