Well a bit easier as you only need %WINDIR% which will tell where the WINDOWS/WINNT folder is located.

@DOS 5.0 for 2000 and @DOS 5.1 for XP

And here is a UDF to check the path.

Dim $Path
$Path=RemoteWinDir('some computer')
If $Path
'Remote Windows directory is: ' + $Path
Else
'Error getting remote path ' + @ERROR + ' - ' + @SERROR ?
EndIf

Function RemoteWinDir(optional $sComputer)
Dim $sComputer,$WinDir
$sComputer=IIf(Not $sComputer,'','\\'+Join(Split($sComputer,'\'),'',3)+'\')
If $sComputer
$WinDir = $sComputer+Join(Split(ReadValue($sComputer+'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion','SystemRoot'),':'),'$')
Else
$WinDir = ReadValue($sComputer+'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion','SystemRoot')
EndIf
If @ERROR
Exit @ERROR
Else
$RemoteWinDir = $WinDir
EndIf
Exit 0
EndFunction