Re: running batch files as admin

From: Doug Knox MS-MVP (dknox_at_mvps.org)
Date: 02/08/04


Date: Sat, 7 Feb 2004 22:59:48 -0500

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

-- 
Doug Knox, MS-MVP Windows XP/ Windows Smart Display
Win 95/98/Me/XP Tweaks and Fixes
http://www.dougknox.com
--------------------------------
Per user Group Policy Restrictions for XP Home and XP Pro
http://www.dougknox.com/xp/utils/xp_securityconsole.htm
--------------------------------
Please reply only to the newsgroup so all may benefit.
Unsolicited e-mail is not answered.
 
"Gary" <anonymous@discussions.microsoft.com> wrote in message news:cabb01c3edeb$d700b0b0$a501280a@phx.gbl...
> 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!


Relevant Pages

  • [TOOL] Windows Script Decoder
    ... Toronto-based Sunrays Technologies is now Beyond Security's representative in Canada. ... The Windows Script Encoder is a "Microsoft tool which can be ... ASP pages, so in case your server is compromised the hacker would be ...
    (Securiteam)
  • Re: How can I hide vbscript code
    ... Script Encoder is a simple command-line tool that enables script ... designers to encode their final script so that Web hosts and Web clients ... This email account is my spam trap so I ...
    (microsoft.public.scripting.vbscript)
  • Re: Protecting a script
    ... SCRIPT DOES NOT COMPILE. ... of those are truly compiled in their public form. ... Again, the script encoder is probably sufficient, ...
    (microsoft.public.scripting.wsh)
  • Re: Group Policy script protection
    ... trivial uuencoding of the script obsfucator. ... local administrator password with a vbscript using group policy. ... navigates to the policy script file and opens it and reads it? ... We have tried the MS script encoder to change the vbs file to vbe but ...
    (microsoft.public.security)
  • Re: Premature end of script headers: cgi-bin .bat file problem with apache 2.0 on Win XP
    ... I'm not familiar with running batch files as cgi scripts. ... Forgot to tell the script how to execute the code ... ... If java or batch files are cgi executables ... ...
    (comp.infosystems.www.authoring.cgi)