running batch files as admin

  • Thread starter Thread starter Gary
  • Start date Start date
G

Gary

I would like to run batch files to change system settings
like tcp/ip settings. These changes required admin rights
but I would like it to run them with the admin password
included in the batch file. I do not want to have to login
as admin and also would like to have these batch files
available without having to give out the admin password.
Any ideas? Thanks!
 
As long as you're using the RUNAS command, you will have to ensure that you use the ECHO OFF command as the first parameter of any BAT file, to prevent the user from seeing the password. You will also need to make sure that the user (or their group) does not have read access to the folder the BAT file is located in.

You may be able to launch the BAT file from a VB Script. Scripts can be encoded using the VB Script Encoder. Documentation for the scripting language and downloads for the VB Script Encoder can be found at:

http://msdn.microsoft.com/scripting
 
Gary said:
I would like to run batch files to change system settings
like tcp/ip settings. These changes required admin rights
but I would like it to run them with the admin password
included in the batch file. I do not want to have to login
as admin and also would like to have these batch files
available without having to give out the admin password.
Any ideas? Thanks!

Hi

You might get something to work using a Runas wrapper utility or similar,
take a look here:

http://groups.google.com/[email protected]


Also, if you give the user(s) the Network Configuration Operator rights,
they can change the tcp/ip settings without being an local administrator.

Here is a nice post of what a Network Configuration Operator can and
can't do:

http://groups.google.com/[email protected]
 
Back
Top