Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / batch

Batch file caveat when running as administrator

0.00/5 (No votes)
1 Mar 2011CPOL 9.9K  
First command of the file should be:PUSHD directory_you_want_to_be_inThat solves it always. No testing for anything. No need to error out, because your expected file's gonna be in the expected directory.
First command of the file should be:

PUSHD directory_you_want_to_be_in

That solves it always. No testing for anything. No need to error out, because your expected file's gonna be in the expected directory.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)