@echo off
for /f "tokens=4" %%i in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.2" /v "Base Directory"') do (
set pgPath=%%i
)
@echo %pgPath%
@echo off
for /f "tokens=4" %%i in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations\postgresql-x64-9.2" /v "Base Directory"') do (
set pgPath=%%i
)
@echo %pgPath%
转载于:https://www.cnblogs.com/yangxiong/p/6699580.html