This shouldn't be tough, but my knowledge is very limited.
I would like to get the values returned by the following adb commands:
adb shell getprop ro.product.brand
adb shell getprop ro.product.model
adb shell getprop ro.build.version.release
and assign the values to variables which are passed into a vbscript.
I have tried without success:
set adb shell getprop ro.product.brand=deviceBrand
echo %deviceBrand&
This is really two issues (1. assign variable, 2. pass to vbscript). I am just looking for help on step 1. here.
EDIT
Thanks to Aacini I now have the adb commands as variable using For /F. Below is my current code:
for /F "delims=" %%a in ('adb devices') do set devices=%%a
rem get the values returned by the following adb commands into variables:
for /F "delims=" %%a in ('adb shell getprop ro.product.manufacturer') do set mfg=%%a
for /F "delims=" %%a in ('adb shell getprop ro.product.brand') do set brand=%%a
for /F "delims=" %%a in ('adb shell getprop ro.build.PDA') do set pda=%%a
for /F "delims=" %%a in ('adb shell getprop ro.product.model') do set model=%%a
for /F "delims=" %%a in ('adb shell getprop ro.build.version.release') do set os=%%a
for /F "delims=" %%a in ('adb shell getprop ro.product.locale.language') do set language=%%a
for /F "delims=" %%a in ('adb shell getprop ro.product.locale.region') do set region=%%a
for /F "delims=" %%a in ('adb shell getprop ro.build.target_country') do set country=%%a
for /F "delims=" %%a in ('adb shell getprop ro.build.target_operator') do set operator=%%a
for /F "tokens=1 delims=" %%a in ('adb shell dumpsys package com.my.package1^|find "version"') do set package1=%%a
for /F "tokens=1 delims=" %%a in ('adb shell dumpsys package com.my.package2^|find "version"') do set package2=%%a
However, I am still getting lost passing it to vbscript. With the code Aacini provided, I expected to see a file created called "theScript.vbs", but I don't.