• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Invalid root in registry key

W

WBB_lan

#1
Hi,

I have a windows script host error that is bugging me (no pun intended).

I have sucessfully deployed on a domain a legal notice script. It works.
But for anyone NOT having administrator rights, an error pops up after the
logon.

Here is the error:
Script:
//domain.local\sysvol\domain.local\policies\{(some
stuff)}\user\scripts\logon\legalnotice.vbs

line: 36
char: 1
Error: Invalid root in registry key
"HKLM\Software\Microsoft\Windows\CrurentVersion\Policies\system\legalnoticecaption".

Code: 80070005
Source: WshShell.RegWrite

Question: Why would this not appear for administrators, but others?

Can anyone help me figure this out?

Thanks in advance...
 

My Computer

V

Vadims Podans [MVP]

#2
mm..this is Powershell newsgroup :)
--
WBR, Vadims Podans
MVP: PowerShell
PowerShell blog - www.sysadmins.lv

"WBB_lan" <WBB_lan@xxxxxx> rakstÄ«ja ziņojumÄ
"news:1CF45E90-3BE7-4F99-A117-6CF56C6CD7ED@xxxxxx"...

> Hi,
>
> I have a windows script host error that is bugging me (no pun intended).
>
> I have sucessfully deployed on a domain a legal notice script. It works.
> But for anyone NOT having administrator rights, an error pops up after the
> logon.
>
> Here is the error:
> Script:
> //domain.local\sysvol\domain.local\policies\{(some
> stuff)}\user\scripts\logon\legalnotice.vbs
>
> line: 36
> char: 1
> Error: Invalid root in registry key
> "HKLM\Software\Microsoft\Windows\CrurentVersion\Policies\system\legalnoticecaption".
>
> Code: 80070005
> Source: WshShell.RegWrite
>
> Question: Why would this not appear for administrators, but others?
>
> Can anyone help me figure this out?
>
> Thanks in advance...
>
 

My Computer

W

WBB_lan

#3
Hi Vadims,

You helped me with a wake on lan issue. I forgot with forum I was posting
this question to. I think it should be the group policy...

Sorry.

"Vadims Podans [MVP]" wrote:

> mm..this is Powershell newsgroup :)
> --
> WBR, Vadims Podans
> MVP: PowerShell
> PowerShell blog - www.sysadmins.lv
>
> "WBB_lan" <WBB_lan@xxxxxx> rakstÄ«ja ziņojumÄ
> "news:1CF45E90-3BE7-4F99-A117-6CF56C6CD7ED@xxxxxx"...

> > Hi,
> >
> > I have a windows script host error that is bugging me (no pun intended).
> >
> > I have sucessfully deployed on a domain a legal notice script. It works.
> > But for anyone NOT having administrator rights, an error pops up after the
> > logon.
> >
> > Here is the error:
> > Script:
> > //domain.local\sysvol\domain.local\policies\{(some
> > stuff)}\user\scripts\logon\legalnotice.vbs
> >
> > line: 36
> > char: 1
> > Error: Invalid root in registry key
> > "HKLM\Software\Microsoft\Windows\CrurentVersion\Policies\system\legalnoticecaption".
> >
> > Code: 80070005
> > Source: WshShell.RegWrite
> >
> > Question: Why would this not appear for administrators, but others?
> >
> > Can anyone help me figure this out?
> >
> > Thanks in advance...
> >
>
 

My Computer

V

Vadims Podans [MVP]

#4
I don't know VBS language, however I know why your script fails:
All scripts that change files in system directory or HKLM registry hive must
be placed in Computer Configuration. In this case script will be launched
under LocalSystem account. If you place script in User Configuration
section - script will unable to change HKLM hive or system folders due
insufficient rights. Or you must explicity assign Write rights to users.

And remember this error code: 80070005 - this means Access Denied.
--
WBR, Vadims Podans
MVP: PowerShell
PowerShell blog - www.sysadmins.lv

"WBB_lan" <WBBlan@xxxxxx> rakstÄ«ja ziņojumÄ
"news:2042B2FE-2F28-458B-86F9-6E16AF05B656@xxxxxx"...

> Hi Vadims,
>
> You helped me with a wake on lan issue. I forgot with forum I was posting
> this question to. I think it should be the group policy...
>
> Sorry.
>
> "Vadims Podans [MVP]" wrote:
>

>> mm..this is Powershell newsgroup :)
>> --
>> WBR, Vadims Podans
>> MVP: PowerShell
>> PowerShell blog - www.sysadmins.lv
>>
>> "WBB_lan" <WBB_lan@xxxxxx> rakstÄ«ja ziņojumÄ
>> "news:1CF45E90-3BE7-4F99-A117-6CF56C6CD7ED@xxxxxx"...

>> > Hi,
>> >
>> > I have a windows script host error that is bugging me (no pun
>> > intended).
>> >
>> > I have sucessfully deployed on a domain a legal notice script. It
>> > works.
>> > But for anyone NOT having administrator rights, an error pops up after
>> > the
>> > logon.
>> >
>> > Here is the error:
>> > Script:
>> > //domain.local\sysvol\domain.local\policies\{(some
>> > stuff)}\user\scripts\logon\legalnotice.vbs
>> >
>> > line: 36
>> > char: 1
>> > Error: Invalid root in registry key
>> > "HKLM\Software\Microsoft\Windows\CrurentVersion\Policies\system\legalnoticecaption".
>> >
>> > Code: 80070005
>> > Source: WshShell.RegWrite
>> >
>> > Question: Why would this not appear for administrators, but others?
>> >
>> > Can anyone help me figure this out?
>> >
>> > Thanks in advance...
>> >
>>
 

My Computer

Users Who Are Viewing This Thread (Users: 1, Guests: 0)