This link has been bookmarked by 3 people . It was first bookmarked on 26 Feb 2009, by Net Volution.
-
24 Aug 09
-
08 Apr 09
-
26 Feb 09
-
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.
-
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.
-
@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 -
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% -
PowerShell.
-
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.