https://stackoverflow.com/questions/672693/windows-batch-file-starting-directory-when-run-as-admin Better than cd is pushd which will change drive letter if starting from D:\... assign a drive letter if on a UNC network path So pushd %~dp0 is good. G