Re: Registry Change to 6 services_denied

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Quickest that comes to mind is:

@echo off
REM Scripting RunAs Example.
echo Password > pwd.txt
runas /user:domain\username cmd.exe < pwd.txt
del pwd.txt
echo done

Having given the example, I strong suggest you find some alternative way to accomplish this. After re-reading, it looks like you are just trying to force certain services to a specific startup type. This is the kind of thing that Group Policies are made for. If you look under Computer Configuration > Windows Settings > Security Settings > System Services of a group policy, you'll see that you can configure any of the common system services to whatever state you want to. You avoid handing out admin credentials to everyone on your network and accomplish similar goals.

gaurhoth


"IT Jeff" <ITJeff@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:4EF4701A-DF49-434B-8141-0FBB3A25623E@xxxxxxxxxxxxxxxx
I tried to run the script at both startup and shutdown... but the change
doesn't seem to take effect. All I'm trying to do is import 6 registry
changes from a file-server... While I'm against embedding a
username/password - at this point I'm willing to do it just to get this
accomplished! I'd obviously come up with some ridiculously complicated
password just in case the script does run visible (which it doesn't), but I
can't get it to accept the embedded pswd... it wants to ask for one... please
keep in mind that I'm doing this as either a batch file or a .cmd file... can
you provide an example?

thanks.
"Gaurhoth" wrote:

To the best of my knowledge, Logon/Logoff scripts will run with the logged
on users' permission levels... short of 'scripting' a runas command which
would mean embedding the elevated accounts password (BAD)... I don't know of
any way to accomplish this with logon/logoff script.

Alternatives are 1) Remotely connect to the registry from a central server
using an account that has administrative rights on the workstations. 2)
Deploy a Startup/Shutdown script via Group Policy. These run at computer
boot and shutdown (not logon/logoff) and run under SYSTEM account which has
permission to make the registry changes you mention.

gaurhoth


"IT Jeff" <ITJeff@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:391A5EC8-7C9B-40D8-9291-0CECDB85E3EF@xxxxxxxxxxxxxxxx
> I've written a logoff script to import a few registry changes on every
> machine in our AD2000 network. Low-Level users are prohibited from > making
> these changes. Win2K gives errors, WinXP doesn't give errors, but it
> doesn't
> make the changes either. I am changing several services from "Manual" > or
> "Disabled" to "Automatic". Users with minimal permissions are getting
> errors
> (all 6 changes are failing). I have tried to utilize everything I can
> think
> of, but even RunAs requires the user to enter a password... I cannot > have
> this. I have been unable to get the script to autofill the password and
> accept. Any advice you can offer would be GREATLY appreciated.
>
> If possible, I would first like to determine if the parameters I want > to
> change NEED to be changed. If not, I would like to end the script.
>
> I would be using a .bat or.cmd script.
>
> Or if you can suggest another way to accomplish this I'd be greatful.
>
> Startup/Shutdown scripts won't work either.
>
> Thanks in advance!!
> Jeff
>



.



Relevant Pages

  • Re: crontab file: echo "test"
    ... echo "test" ... printed to my monitor. ... How do I accomplish this? ... Then you place the script in crontab like so: ...
    (alt.os.linux.suse)
  • Re: Is It possible to run a script as admin?
    ... > If the device is Win2K or WinXP, you can use RunAs, however Runas will ... > work with an exe and you'll also have to specify a password. ... I wrote a script that requires the user have ... If I could just allow admin access for the logon script I'd be ...
    (microsoft.public.scripting.vbscript)
  • Re: Im new to scripting a I working on a project that I need some help with.
    ... After that the script ... >> that the user account is not valid. ... > it to the Administrators group: ... If the user does not have it, maybe a RunAs solution ...
    (microsoft.public.scripting.vbscript)
  • Re: RunAs Alternatives
    ... Microsoft has a scripted version of Runas also called Runas+.exe. ... >> domain login script in our AD environment. ... >> install the missing updates. ... >> updates from a VBScript login as that local administrator while not ...
    (microsoft.public.scripting.vbscript)
  • "RunAs" utility
    ... I need to run a script using "runas" command since my logged on users are ... non administrators on the local machine. ... Is there any available tool "runas" that is considered secure enough to be ... .vbs script but obviously that is a very weak protection. ...
    (microsoft.public.win2000.security)