Skip to main content

Allowing users to run Apps as Administrator and Elevating in ...

Popularity Report

Total Popularity Score: 0

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Rank

URL Tag Cloud

Bookmark History

Saved by 2 people (0 private), first by anonymouse user on 2009-02-26


Public Sticky notes

In my last post I introduced Steel Run As, a free tool that allows you to give standard users the right to run specific programs that require administrator privileges.

Highlighted by netvolution

We have to make sure that the batch script is executed at an elevated UAC privilege level. It is not possible to configure the privilege level for batch files like for binary executables. But we can elevate commands within batch scripts. For this we need the free Script Elevation PowerToys. You can get them from the Technet Magazines June 2008 downloads.

Highlighted by netvolution

@echo off
set /P IP=IP address:
set /P Gateway=Gateway IP address:
elevate netsh interface ip set address name=”Local Area Connection” static %IP% 255.255.255.0 %Gateway% 1

Highlighted by netvolution

The user will have to confirm the corresponding UAC prompt, but there is no administrator credential required. For some reason batch scripts won’t execute lines that come after the elevate command. That’s why we need another batch script for configuring the DNS server:

@echo off
set /P DNS=DNS server IP address:
elevate netsh interface ip set dns “Local Area Connection” static %DNS%

Highlighted by netvolution

PowerShell.

Highlighted by netvolution