Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Running as Administrator

Nov
1
0
Running TCC/LE on a Vista-based system, when I start TCC in "run as administrator" mode, is there any way to visually identify that 'admin' window as different from other 'standard' mode TCC windows?

I usually have several TCC/LE command prompt windows open and from time-to-time need to start one as Administrator. Because it doesn't have any visual indicator that it is running in an elevated privileges mode, I can't later identify which of the many windows is in Admin mode.

Thanks!
 
One way to do this is below. It will put administrator: in the title bar -
It assumes that you can create a file in windows directory only if you are running the program as admin.

set fname=%@unique[c:\windows]
if not [%fname%]==[] (
Title Administrator: ...
del %fname%
)

The script works, but then when you are not running as administrator, %@unique will flash some error messages on the screen saying access denied. Just ignore them. I could not figure out how to suppress that.
Anyone else can help with that?
 
JP Software Forums" <[email protected]>; "holla wrote:
| One way to do this is below. It will put administrator: in the title
| bar -
| It assumes that you can create a file in windows directory only if
| you are running the program as admin.
|
| set fname=%@unique[c:\windows]
| if not [%fname%]==[] (
| Title Administrator: ...
| del %fname%
| )
|
| The script works, but then when you are not running as administrator,
| %@unique will flash some error messages on the screen saying access
| denied. Just ignore them. I could not figure out how to suppress
| that. Anyone else can help with that?

Try ON ERROR:

setlocal
on error goto NORMAL
set fname=%@unique[c:\windows]
Title Administrator: ...
del %fname
:NORMAL

Note: in the regular version of TCC (not in LE) the internal variable _ADMIN
has value 1 if running as administrator. One of the plug-ins available for
LE also has a similar feature.
--
HTH, Steve
 
Back
Top
[FOX] Ultimate Translator
Translate