Re: Run script with elevated privileges



Assuming windows XP, run gpedit.msc, navigate to "computer configuration" -
"windows settings" - "scripts (startup/shutdown)" and double-click on
"startup" in the right pane. The "show files" button will show you where to
put the file, and the add button will allow you to browse to that file to
add it as a startup script.

/Al

"Vince" <Vince@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:2A9CBDA4-675A-4346-AD9F-BEA524360C33@xxxxxxxxxxxxxxxx
Thanks Al. Where would I put it to make it run as a "startup" script with
system privileges? Are you talking about just putting it in the startup
group? I didn't try that becaause I assumed it would run with the user's
rights.

No problem about running it local. We are not using Active Directory
(Novell
shop) so local is really our only option.

"Al Dunbar" wrote:


"Vince" <Vince@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:7E2A6DA4-71A6-4C52-A415-9BB660C80ED1@xxxxxxxxxxxxxxxx
I am trying to develop a vbscript to run after an image is deployed to a
workstation. The script reads the serial number from the system BIOS
and
changes the computer name to match. I have a functional script, and the
logical place to run it from is either HKLM\...\RunOnce of
HKLM\...\Run,
but
it will not run when logging on as a member of the Users group. I
assume
the
problem is rights, so I'm wondering if there is a way to make a script
run
with elevated privileges (Administrator, or even better,SYSTEM)?

Sorry if this is a dumb question - I'm pretty new to sripting and
pretty
much figuring it out as I go...

I think you will need to run the script as a startup script, in which
case I
believe that it runs as SYSTEM. Given that you are changing the
workstation's name, I assume this will have to be a "local" startup
script
as opposed to one imposed through group policy. Group policy will only
apply
once the computer is joined to the domain, something that should not be
attempted with a common image computername.

/Al





.


Loading