Re: Using RegWrite fails in Vista with RunAs Command
- From: "Paul Baker [MVP, Windows - SDK]" <paulb@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 13 Apr 2007 16:04:43 -0400
I am not sure where the conclusion that most setup programs don't work on
Windows Vista. It will detect a setup program by looking for words like
"install" and "setup" in the VERSIONINFO and run it with elevated
privileges. Most installations do not need to run other processes.
Paul
"Michael" <m.hlavinkamsdn@xxxxxxx> wrote in message
news:A56DC7D6-8E1E-40EF-B96B-42ADE2BD6F4F@xxxxxxxxxxxxxxxx
Someone should still know what is different between the runas command and
the
context menu "Run as administrator"...
"Richard Mueller [MVP]" wrote:
The only way I've been able to get scripts to modify the registry on
Vista
is to run them in a console window with elevated privileges. Running the
script with Administrator credentials is not enough.
I believe the solution is to use an xml manifest file. I have not learned
how to do this, or found good documentation. I think it partially
explains
why most setup programs fail on Vista.
--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--
"Michael" <m.hlavinkamsdn@xxxxxxx> wrote in message
news:12D645B4-DD77-4B0B-8FD0-1BEE0DCD1B4E@xxxxxxxxxxxxxxxx
I'm not clear on what you are implying. Obviously, something must be
different about the right click and executing the command interpreter
with
the "Run as administrator" context menu item than using the runas
command
directly. It's possible that I'm missing some command line arguement
for
runas but I've tried all combinations of /profile and /env.
"asdf" wrote:
If in the context of "current machine state" a right context click is
accepted,
most likely a command line prefix of along "runas" to the script's
executable
should be accepted as well.
You and me think.
"Michael" <m.hlavinkamsdn@xxxxxxx> wrote in message
news:62C5B269-3181-47D8-8923-52C5370011B4@xxxxxxxxxxxxxxxx
If you start cmd.exe in Vista (Ultimate/domain member system) using
Runas
such as:
runas /user:someadminuseraccount cmd.exe
and within the created command prompt start a VBScript program that
modifies
the registry using RegWrite of WScript.Shell, the call fails with
error
code
800A0046 and an error of Permission denied. However, if I right
click
the
command prompt in the Start menu and use "Runas Administrator", this
command
prompt does not fail.
Does someone have an explanation for this and a way to get it to
work?
I've
tried all combinations of /profile /env switches on Runas.
.
- Follow-Ups:
- Re: Using RegWrite fails in Vista with RunAs Command
- From: Michael
- Re: Using RegWrite fails in Vista with RunAs Command
- References:
- Re: Using RegWrite fails in Vista with RunAs Command
- From: asdf
- Re: Using RegWrite fails in Vista with RunAs Command
- From: Richard Mueller [MVP]
- Re: Using RegWrite fails in Vista with RunAs Command
- From: Michael
- Re: Using RegWrite fails in Vista with RunAs Command
- Prev by Date: Re: Using RegWrite fails in Vista with RunAs Command
- Next by Date: Re: vbs output to txt file
- Previous by thread: Re: Using RegWrite fails in Vista with RunAs Command
- Next by thread: Re: Using RegWrite fails in Vista with RunAs Command
- Index(es):
Relevant Pages
|