if %OS% == Windows_NT goto WNT
if exist c:\Windows\*.* goto W3
if exist c:\win95\*.* goto W95
if exist c:\win98\*.* goto W98
<STRONG>REM</STRONG> 사용할 다른 디렉토리를 추가할 수도 있다.
goto end
:WNT
cd %SystemRoot%
goto end
:W3
cd c:\Windows
if exist c:\Windows\lmscript.$$$ goto end
goto lms
:W95
cd c:\win95
if exist c:\win95\lmscript.$$$ goto end
goto lms
:W98
cd c:\win98
if exist c:\win98\lmscript.$$$ goto end
:lms
echo <STRONG>.</STRONG> lmscript.$$$
:end
exit