Administrator Command Prompt for Vista UAC

Sample buttons and complete toolbars.

Administrator Command Prompt for Vista UAC

Postby leo » 27 Apr 2007, 03:24

This button launches an Administrator Command Prompt on Windows Vista, using the new @admin feature in Directory Opus 9.

The prompt opens in the current directory and with a red background.

Of course, this is only useful for people running Vista with UAC enabled.

Image

Code: Select all
<?xml version="1.0"?>
<button backcol="none" display="both" icon_size="large" label_pos="right" textcol="none">
   <label>Admin</label>
   <icon1>#cliadmin</icon1>
   <function type="normal">
      <instruction>cd {sourcepath}</instruction>
      <instruction>@admin: cmd.exe /T:47</instruction>
   </function>
</button>

To add the button to your toolbar:
  • Copy the text above to your clipboard.
  • Select Settings -> Customize.
  • Right-click an empty space on your toolbar and select Paste.

To open a non-admin prompt you can use the usual CLI DOSPROMPT command.

Opus 9 has built-in, matching icons for normal and admin prompts which you can see in the screenshot above. The button uses the built-in icon. I've also included, below, an alternative icon which matches the Vista's DOS prompt icon.
Attachments
DOSPromptAdmin_32x32x32.png
DOSPromptAdmin_32x32x32.png (3.24 KB) Viewed 3536 times
User avatar
leo
Admin
 
Posts: 14654
Joined: 07 Nov 2004, 01:30
Location: London, UK
OS: Windows 7 64-bit
Opus: Illuminati

Return to Buttons & Toolbars