When you run a batch file as administrator under windows vista and 7 the current directory gets set to C:\windows\system32. This can prevent your scripts from working correctly if you use relative paths.
To fix this problem, include these two lines at the top of your .bat script:
@setlocal enableextensions
@cd /d "%~dp0"
This will change the current directory to the location of the .bat file.
댓글 없음:
댓글 쓰기