这样写的话错误,哪位大虾可以帮忙改改,感谢!
@echo off
for /f "tokens=2,*" %%i in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "CSDVersion"') do (
Set ttt=%%j||goto error)
for /f "tokens=5,*" %%i in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "CurrentVersion"') do (
Set xxx=%%i||goto error)
set jjj=%xxx%%ttt%
reg add "HKLM\SOFTWARE\USoft\5.0" /f /v "OSVersion" /t REG_SZ /d "%jjj%"