Is there any programmatic way within a BATch file of determining whether it has been started from an elevated command prompt (run as Administrator) or a normal command prompt?
I note the difference between the Current Directory at start of the BATch file, but wonder if there is a better way.
When in elevated mode I don't get a UAC prompt when using DISKPART.
The UAC prompt only happens when running it in a normal command prompt window.
Are you aware of any command which simultaneously would
I note the difference between the Current Directory at start of the BATch file, but wonder if there is a better way.
When in elevated mode I don't get a UAC prompt when using DISKPART.
The UAC prompt only happens when running it in a normal command prompt window.
Are you aware of any command which simultaneously would
- give a different errorlevel when executed in an elevated command prompt than in a normal command prompt, and
- not produce a UAC prompt in normal mode?
Last edited by a moderator:
My Computer
At a glance
Windows 7 Pro 64-bit
- OS
- Windows 7 Pro 64-bit