Home > Windows Server Tips > > Scripting elevation in Windows Vista with JavaScript
Windows Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 


Scripting elevation in Windows Vista with JavaScript


Serdar Yegulalp, Contributor
07.09.2007
Rating: --- (out of 5)


Expert advice on Windows-based systems and hardware
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


Recently I've discussed several techniques to elevate a process to the Administrator level in Windows Vista. All these techniques (including the one I'm about to mention) require that the user approve the UAC dialog that appears when the process is elevated. This is just the way process elevation works in Windows Vista.

In this tip I will pass on a technique courtesy of one of the people I rely on the most to get the straight dope about privilege elevation and least-privilege issues in Windows: Aaron Margosis.

A member of Microsoft Consulting Services, Aaron created a utility called LUA Buglight. This tool helps administrators (as well as programmers) identify potential problems with applications that were due to the app not working right when it was run with a Limited User Account (LUA), as opposed to an admin user account.

Aaron has posted a scripting technique that allows you to elevate to admin any given process, from the command line or in a script. The trick involves creating a script—written in JavaScript—that can then be placed in your user's PATH (i.e., any directory mapped in the PATH variable) and invoke


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
Microsoft Windows Scripting Language
Create a script to check integrity of your server's drives
Use Ldifde.exe and Csvde.exe data export tools to create Active Directory objects
Scripting School: Replacing text with regular expressions
Scripting School: Writing a script for an office inventory system
Christa Anderson's Scripting School for Windows administrators
How to automate advanced Windows desktop tasks using scripts and macros
Just the FAQs guide to VB Scripting basics
Script reveals which port Terminal Services listens to for incoming connections
Scripting School: Find objects with Windows Script Host
Windows scripting for beginners

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


d from the command line like a regular command. Activate a command with this script, and the UAC prompt will appear as it would if you'd manually launched the program as admin.

One advantage to using Aaron's elevate.js script is that, because it's a script and not a compiled executable, you can make any modifications you want to it to fit a particular setting. And you can do this without the hassle of recompiling it; changes can be tested immediately.

About the author: Serdar Yegulalp is editor of the Windows Insight, (formerly the Windows Power Users Newsletter), a blog site devoted to hints, tips, tricks and news for users and administrators of Windows NT, Windows 2000, Windows XP, Windows Server 2003 and Vista. He has more than 12 years of Windows experience under his belt, and contributes regularly to SearchWinComputing.com and SearchSQLServer.com.

More information on this topic:

  • Tip: PowerToys simplify dealing with elevating privileges in Vista
  • Topics: Vista tools and utilities
  • Topics: Windows scripting
  • RSS: Sign up for our RSS feed to receive expert advice every day.

      Rate this Tip
      To rate tips, you must be a member of SearchWindowsServer.com.
      Register now to start rating these tips. Log in if you are already a member.




      DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Server Room Design - Planning, Cooling, Maintenance
HomeTopicsBlogsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2004 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts