Running as Administrator?

We welcome any suggestions for new features or improvements in Altap Salamander. Please post one suggestion per report.
User avatar
mdruiter
Posts: 260
Joined: 22 Feb 2006, 15:33
Location: Amsterdam, The Netherlands
Contact:

Running as Administrator?

Post by mdruiter »

Is there a way to show, for example in the window caption, that a Salamander instance is running "as Administrator" (in Vista)?
Groente, Michel.
User avatar
MartinS
Posts: 107
Joined: 04 May 2006, 19:48
Location: Brno, Moravia

Re: Running as Administrator?

Post by MartinS »

You can use command line parameters when starting AS (ie. prepare shortcuts for nonadmin and admin):

SALAMAND.EXE [-L directory] [-R directory] [-A directory] [-C reg_file] [-I icon_index] [-T title_prefix] [-O] [-P panel_index]

-I icon_index Specifies the icon color that will be used for main window. 0 means DEFAULT icon, 1 means RED icon, 2 means GREEN icon, and 3 means BLUE icon. You can also change the icon color in configuration of main window.
-T title_prefix Specifies the text prefix displayed in the title bar of main window. To suppress text prefix use the "" parameter. You can also change the prefix in configuration of main window.
User avatar
zarevak
Plugin Developer
Plugin Developer
Posts: 789
Joined: 04 Feb 2006, 16:49
Location: Prague, Czech Republic

Re: Running as Administrator?

Post by zarevak »

Salamanader doesn't do this automatically, but you can use command prompt parameters to add the prefix yourself or even change the icon color.

If you create two shortcuts - one normal and one admin (with "Run as admin" checkbox checked in the shortcut properties) with these prefixes, it will work for you.

Code: Select all

Usage:
  SALAMAND.EXE [-L path-to-left-panel] [-R path-to-right-panel] [-A path-to-active-panel] [-C use-configuration-file] [-I icon-index] [-T title-prefix] [-O only-one-instance] [-P panel-index]
So you can use:
Salamand.exe -I 1 -T Admin
to run your Salamander with red icon and Admin prefix in the window title.

EDIT: MartinS was a bit faster ;)
Post Reply