Go Back   Windows Vista Forum | Vista Babble > Windows Vista > Vista Tips

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 05-27-2007, 07:32 PM
Snuffy's Avatar
Elite Members
 
Join Date: Nov 2006
Location: S.W. Kansas
Posts: 2,841
Snuffy is on a distinguished road
Send a message via MSN to Snuffy
Smile SUPER POWERTOYS for VISTA

Quote:
Among the many features Windows Vista introduced to address security concerns, User Account Control (UAC) is one of the most significant. With User Account Control, even users who are administrators run most applications with standard privilege, but have "elevation potential" for specific administrative tasks and application functions.
http://www.microsoft.com/technet/tec...litySpotlight/

Elevate Command PowerToy

Elevate Command PowerToy
Quote:
After using Windows Vista™ for many months, elevating a task or application as necessary has become second nature. However, I also encountered a number of shortcomings when trying to elevate some types of tasks in Windows Vista, and that became frustrating.

So in the spirit of the old Windows® PowerToys, I’ve created a few Script Elevation PowerToys to overcome these limitations. You can find all of the PowerToys I’m about to discuss in the code download at technetmagazine .com/code07.aspx. And you can read about how UAC works in the November 2006 article "Achieve the Non-Admin Dream with User Account Control" by Alex Heaton (see the "Additional Resources" sidebar).
A MUST READ article ... absolute great..
__________________
The only Stupid Question is the one you failed to Ask!
Beta Tester since Pre Win 95.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Sponsored Links
  #2  
Old 05-27-2007, 08:49 PM
dazzlin's Avatar
Super Moderator
 
Join Date: Dec 2005
Posts: 709
dazzlin is on a distinguished road

I guess the article isn't available to everyone, but I get redirected to http://www.microsoft.com/technet/tec...aspx?year=2007

This page lists the downloadable powertoy at http://download.microsoft.com/downlo...ity2007_06.exe
__________________
You'll never shine if you don't glow
Join our Windows Vista forum or check out Vista Software.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3  
Old 05-27-2007, 10:35 PM
Snuffy's Avatar
Elite Members
 
Join Date: Nov 2006
Location: S.W. Kansas
Posts: 2,841
Snuffy is on a distinguished road
Send a message via MSN to Snuffy

http://www.microsoft.com/technet/tec...aspx?year=2007

OK, seems he changed the link to: maybe I can find the original in my cache and c/p here...

here is my cache page:
Quote:
Script Elevation PowerToys for Windows Vista
section: windows, for your questions: IT forum, 24.5.2007

Among the many features Windows Vista introduced to address security concerns, User Account Control (UAC) is one of the most significant. With User Account Control, even users who are administrators run most applications with standard privilege, but have "elevation potential" for specific administrative tasks and application functions.

After using Windows Vista™ for many months, elevating a task or application as necessary has become second nature. However, I also encountered a number of shortcomings when trying to elevate some types of tasks in Windows Vista, and that became frustrating.

So in the spirit of the old Windows® PowerToys, I’ve created a few Script Elevation PowerToys to overcome these limitations. You can find all of the PowerToys I’m about to discuss in the code download at technetmagazine .com/code07.aspx. And you can read about how UAC works in the November 2006 article "Achieve the Non-Admin Dream with User Account Control" by Alex Heaton (see the "Additional Resources" sidebar).

Elevate Command PowerToy
The first annoyance was that there was no method to elevate an application from the command line or from the Run dialog box. So after asking around within Microsoft, I came across a sample script from John Stephens (a Software Design Engineer at Microsoft) that provided the information I needed. It turns out that if you pass the verb "runas" to either the ShellExecute API or to its COM equivalent, the ShellExecute method of Shell.Application, the application launched will prompt for elevation (see the sidebar for details). This allowed me to create the first Elevation PowerToy—the Elevate Command PowerToy.

This tool (which consists of the files ElevateCommand.inf, elevate.cmd, and elevate.vbs) adds an elevate command to your system. This lets you launch applications that prompt for elevation from the command line, a script, or the Run dialog. For example, the following command opens Win.ini with Notepad (after prompting for elevation):

elevate notepad c:\Windows\Win.ini

When using the elevate command with Windows Script Host (WSH), Windows PowerShell™ or other scripts, you need to specify the script host executable (such as wscript, cscript, or powershell) as the application. To run a vbs, for example, you’d use this:

elevate wscript “C:\windows\system32\
slmgr.vbs” –dli

The help text explains this. Use elevate with -? or with no parameters to see the help text.


Run as Administrator for Scripts
The next irritant was that there was no "Run as Administrator" context menu option (when you right-click on the file in Explorer) for most Windows script types. The one exception was for command-shell scripts (those with .bat and .cmd file extensions). So I set out to investigate this. Many of the context menu options for file types are controlled through command keys for the "object" type in the HKEY_CLASSES_ROOT section of the Registry (see Verbs and File Associations in the sidebar for details). It turns out that if that command key is named runas, the command invoked will prompt for elevation. This allowed me to create the following PowerToys:
* Elevate HTML Application PowerToy (ElevateHTA.inf)
* Elevate Windows PowerShell Script PowerToy(ElevatePowerShellScript.inf)
* Elevate WSH Script PowerToy (ElevateWSHScript.inf, elevate.cmd, elevate.vbs)

source: microsoft.com/technet
download the code here: http://download.microsoft.com/downlo...ity2007_06.exe

There are 12 Vista Toys all to gether....
__________________
The only Stupid Question is the one you failed to Ask!
Beta Tester since Pre Win 95.

Last edited by Snuffy : 05-27-2007 at 10:43 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:32 AM.



Page generated in 0.30635 seconds with 11 queries

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23