Home All Groups Group Topic Archive Search About

reg add failing - REALLY need help

Author
21 Mar 2005 8:27 PM
tjcooper
All I want to do is change this simple key. Thats all.. LOL

I thought using reg add would work the quickest, and I would work on other
methods later. However, its failing. It says "too many command line
paramters". Please help

reg add HKCU\Software\Microsoft\Windows\CurrtVersion\Internet Settings\Url
History /v DaysToKeep /t REG_DWORD /d 00000024

Author
21 Mar 2005 9:44 PM
Galen
In news:EA7B53CF-55FB-4FDC-9A9D-B352B83BA1CC@microsoft.com,
tjcooper <tjcoo***@discussions.microsoft.com> had this to say:

My reply is at the bottom of your sent message:

> All I want to do is change this simple key. Thats all.. LOL
>
> I thought using reg add would work the quickest, and I would work on
> other methods later. However, its failing. It says "too many command
> line paramters". Please help
>
> reg add HKCU\Software\Microsoft\Windows\CurrtVersion\Internet
> Settings\Url History /v DaysToKeep /t REG_DWORD /d 00000024

I think this should do it:


Copy below this:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet
Settings\Url History]
"DaysToKeep"=dword:00000018

Don't copy this...

Save it to a text document, rename it anything.reg or what ever, then right
click > merge...

It should work...

Galen
--
Signature changed for a moment of silence.
Rest well Alex and we'll see you on the other side.
Author
21 Mar 2005 10:35 PM
MikeVa [MSFT]
It looks like you have several spaces in the registry path.
"Internet Settings" and "Url History" for example.
You must enclose the entire registry path in double-quotes, otherwise the
reg.exe command will treat each whitespace as the beginning of a new
argument.

This should work...
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet
Settings\Url History" /v DaysToKeep /t REG_DWORD /d 00000024

You might also want to add the /f argument at the end to force an overwrite
of the value if it is already defined.

--
MikeVa [MSFT]

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
--
Please do not send e-mail directly to this alias.
This alias is for newsgroup purposes only.
--
Show quoteHide quote
"tjcooper" <tjcoo***@discussions.microsoft.com> wrote in message
news:EA7B53CF-55FB-4FDC-9A9D-B352B83BA1CC@microsoft.com...
> All I want to do is change this simple key. Thats all.. LOL
>
> I thought using reg add would work the quickest, and I would work on other
> methods later. However, its failing. It says "too many command line
> paramters". Please help
>
> reg add HKCU\Software\Microsoft\Windows\CurrtVersion\Internet Settings\Url
> History /v DaysToKeep /t REG_DWORD /d 00000024
Author
21 Mar 2005 11:21 PM
tjcooper
Thank you. You are correct. I figured it out about 10 minutes after I posted
(after wrestling with it for 2 hours).

The double quotes work great. I will use this method until I have the time
to create a .adm file.

Show quoteHide quote
"MikeVa [MSFT]" wrote:

> It looks like you have several spaces in the registry path.
> "Internet Settings" and "Url History" for example.
> You must enclose the entire registry path in double-quotes, otherwise the
> reg.exe command will treat each whitespace as the beginning of a new
> argument.
>
> This should work...
> reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet
> Settings\Url History" /v DaysToKeep /t REG_DWORD /d 00000024
>
> You might also want to add the /f argument at the end to force an overwrite
> of the value if it is already defined.
>
> --
> MikeVa [MSFT]
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of any included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> --
> Please do not send e-mail directly to this alias.
> This alias is for newsgroup purposes only.
> --
> "tjcooper" <tjcoo***@discussions.microsoft.com> wrote in message
> news:EA7B53CF-55FB-4FDC-9A9D-B352B83BA1CC@microsoft.com...
> > All I want to do is change this simple key. Thats all.. LOL
> >
> > I thought using reg add would work the quickest, and I would work on other
> > methods later. However, its failing. It says "too many command line
> > paramters". Please help
> >
> > reg add HKCU\Software\Microsoft\Windows\CurrtVersion\Internet Settings\Url
> > History /v DaysToKeep /t REG_DWORD /d 00000024
>
>
>
Author
22 Mar 2005 4:41 PM
tjcooper
What is the best way to apply this at login?

If I use a GPO login, can I modify the HKCU remotely, or does the .bat file
have to be located on the local machine (vs. the server)?

How do I do the same thing via VBS?

Show quoteHide quote
"MikeVa [MSFT]" wrote:

> It looks like you have several spaces in the registry path.
> "Internet Settings" and "Url History" for example.
> You must enclose the entire registry path in double-quotes, otherwise the
> reg.exe command will treat each whitespace as the beginning of a new
> argument.
>
> This should work...
> reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet
> Settings\Url History" /v DaysToKeep /t REG_DWORD /d 00000024
>
> You might also want to add the /f argument at the end to force an overwrite
> of the value if it is already defined.
>
> --
> MikeVa [MSFT]
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of any included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> --
> Please do not send e-mail directly to this alias.
> This alias is for newsgroup purposes only.
> --
> "tjcooper" <tjcoo***@discussions.microsoft.com> wrote in message
> news:EA7B53CF-55FB-4FDC-9A9D-B352B83BA1CC@microsoft.com...
> > All I want to do is change this simple key. Thats all.. LOL
> >
> > I thought using reg add would work the quickest, and I would work on other
> > methods later. However, its failing. It says "too many command line
> > paramters". Please help
> >
> > reg add HKCU\Software\Microsoft\Windows\CurrtVersion\Internet Settings\Url
> > History /v DaysToKeep /t REG_DWORD /d 00000024
>
>
>
Author
23 Mar 2005 1:42 AM
MikeVa [MSFT]
Reg.exe will let you modify the registry of a remote machine.
You will need to have the necessary rights on the remote box of course.

Just add the \\RemoteMachine\ to the front of the registry path...

reg add
"\\RemoteMachine\HKCU\Software\Microsoft\Windows\CurrentVersion\Internet
Settings\Url History" /v DaysToKeep /t REG_DWORD /d 00000024

--
MikeVa [MSFT]

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
--
Please do not send e-mail directly to this alias.
This alias is for newsgroup purposes only.
--
Show quoteHide quote
"tjcooper" <tjcoo***@discussions.microsoft.com> wrote in message
news:F29C415B-FA51-47DF-8D38-68892D7478D2@microsoft.com...
> What is the best way to apply this at login?
>
> If I use a GPO login, can I modify the HKCU remotely, or does the .bat
file
> have to be located on the local machine (vs. the server)?
>
> How do I do the same thing via VBS?
>
> "MikeVa [MSFT]" wrote:
>
> > It looks like you have several spaces in the registry path.
> > "Internet Settings" and "Url History" for example.
> > You must enclose the entire registry path in double-quotes, otherwise
the
> > reg.exe command will treat each whitespace as the beginning of a new
> > argument.
> >
> > This should work...
> > reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet
> > Settings\Url History" /v DaysToKeep /t REG_DWORD /d 00000024
> >
> > You might also want to add the /f argument at the end to force an
overwrite
> > of the value if it is already defined.
> >
> > --
> > MikeVa [MSFT]
> >
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> > Use of any included script samples are subject to the terms specified at
> > http://www.microsoft.com/info/cpyright.htm
> > --
> > Please do not send e-mail directly to this alias.
> > This alias is for newsgroup purposes only.
> > --
> > "tjcooper" <tjcoo***@discussions.microsoft.com> wrote in message
> > news:EA7B53CF-55FB-4FDC-9A9D-B352B83BA1CC@microsoft.com...
> > > All I want to do is change this simple key. Thats all.. LOL
> > >
> > > I thought using reg add would work the quickest, and I would work on
other
> > > methods later. However, its failing. It says "too many command line
> > > paramters". Please help
> > >
> > > reg add HKCU\Software\Microsoft\Windows\CurrtVersion\Internet
Settings\Url
> > > History /v DaysToKeep /t REG_DWORD /d 00000024
> >
> >
> >