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

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -