How can I get child path from registry via comand line (batch file) -
i have registry path in variable %a%. , want child name of registry path , execute below command
msiexec.exe /qb /l* "%logdir%\myuninstaller.log" /x{guid}
example:
set %a%="hkey_local_machine\software\wow6432node\microsoft\windows\currentversion\uninstall\{c43a01f0-d4db-4ca3-9df6-7df629bbccd4}"
how can string "{c43a01f0-d4db-4ca3-9df6-7df629bbccd4}"
?
for /f "tokens=2 delims={" %%# in ("%a%") set "guid={%%#"
if length fixed (it should be) can use substring syntax:
set "guid=%a:~-38%"
Comments
Post a Comment