批次檔讀出機碼
發表於 : 2011-12-26 20:15:27
代碼: 選擇全部
setlocal
@rem 取得機碼的路徑
if "%pdaPartnersID%" == "" (
for /F "usebackq delims=\ tokens=5*" %%i in (`reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows CE Services\Partners" `) Do (
set pdaPartnersID=%%j
))
echo "%pdaPartnersID%"
@rem 取得機碼值
if "%pdasyncpath%" == "" (
for /F "usebackq tokens=3*" %%i in (`reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows CE Services\Partners\%pdaPartnersID%\Services\Synchronization" /v "Briefcase Path"`) Do (
set pdasyncpath=%%j
))
echo "%pdasyncpath%"