I used Windows 7 TC755b3, maybe the same is true for Windows Vista. I think this is an old bug.
Repro:
1. Create a .bat file with the following content:
Code: Select all
@echo off
cd
pause
Code: Select all
X:\Path\to\batch\file
Press any key to continue . . .
3.a Shift+Long right Click on the batch file (shift needed to show "Run as different user...")
3.b Click on Run as different user...
3.c Enter username of a not logged in user (if you don't know any, create a password protected one); it needs to have password!
3.d The output what you will see:
Code: Select all
C:\Windows\system32
Press any key to continue . . .
4.a Open the folder containing the batch file
4.b Shift+Right click the batch file
4.c Click on Run as different user...
4.d Enter the same user name as above
4.e The output now will be the same as in 2.
Note: On Windows XP TC755b1 did not show "Run as user..." in context menu (tried with any magic key combos), but explorer did with a single right click.