Reputation: 1142
I am trying to understand a Windows batch file with the following statements:
:GetVSCommonToolsDirHelper32
@for /F "tokens=1,2*" %%i in ('reg query "%1\SOFTWARE\Microsoft\VisualStudio\SxS\VS7" /v "10.0"') DO (
@if "%%i"=="10.0" (
@SET "VS100COMNTOOLS=%%k"
)
)
I understand the %1 parameters, but what does %%i
and %%k
specify?
FYI, the statement is called using a label with this statement:
call :GetVSCommonToolsDirHelper32 HKCU > nul 2>&1
Any additional information about this code would be very useful too
Upvotes: 1
Views: 7926
Reputation: 379
Looks like its just the way you format modifiable variables in the FOR see http://www.computerhope.com/forhlp.htm From that page, it seems the %%k is taken from the tokens part.
Upvotes: 1