i want to store the output of the below command in a variable in batch file -


i want store output of below command in variable in batch file

wmic product name="%input%" call uninstall

after whether output matches no instance(s) available. want display input wrong please check input

if condition fails want display product selected uninstalled

is looking for?

for /f "delims=" %%i in ('wmic product name="%input%" call uninstall') set output=%%i if "%output%"=="no instance(s) available." (  echo input incorrect  goto :skip ) echo product selected uninstalled :skip pause 

havn't tested it, i'm not @ computer.


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -