View Full Version : Reg Add - Where am I going wrong??


Brian Graham
10-25-2005, 03:32 PM
I'm trying to add a key to the (Windows XP SP2) registry to disable Netware file caching. Its for all database users, ultimately in a batch file called from the login script.

REG ADD HKLM\SYSTEM\CurrentControlSet\Services\NetWareWorkstation\Parameters /v "File Caching" /t REG_DWORD /d 00000000 /f


Instead of adding the key, the batch file just loops the command over and over..

If someone can offer some insight, it would be appreciated. Meanwhile I'll go bang my head against the wall some more.

Thanks.
--
Brian

Brian Graham
10-25-2005, 04:34 PM
Found the problem. The batch file being invoked was called reg.bat . Bad naming choice. It was calling itself again, rather than using the reg command.
--
Brian

>>> Brian Graham<GrahamB@psac-afpc.com> October 25, 2005 10:32:01 am >>>
I'm trying to add a key to the (Windows XP SP2) registry to disable Netware file caching. Its for all database users, ultimately in a batch file called from the login script.

REG ADD HKLM\SYSTEM\CurrentControlSet\Services\NetWareWorkstation\Parameters /v "File Caching" /t REG_DWORD /d 00000000 /f


Instead of adding the key, the batch file just loops the command over and over..

If someone can offer some insight, it would be appreciated. Meanwhile I'll go bang my head against the wall some more.

Thanks.
--
Brian

Dave Patrick
10-25-2005, 05:28 PM
Hey good one. The things we do to ourselves.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Brian Graham" wrote:
> Found the problem. The batch file being invoked was called reg.bat . Bad
> naming choice. It was calling itself again, rather than using the reg
> command.
> --
> Brian
>
>>>> Brian Graham<GrahamB@psac-afpc.com> October 25, 2005 10:32:01 am >>>
> I'm trying to add a key to the (Windows XP SP2) registry to disable
> Netware file caching. Its for all database users, ultimately in a batch
> file called from the login script.
>
> REG ADD
> HKLM\SYSTEM\CurrentControlSet\Services\NetWareWorkstation\Parameters /v
> "File Caching" /t REG_DWORD /d 00000000 /f
>
>
> Instead of adding the key, the batch file just loops the command over and
> over..
>
> If someone can offer some insight, it would be appreciated. Meanwhile I'll
> go bang my head against the wall some more.
>
> Thanks.
> --
> Brian
>
>

Mark V
10-30-2005, 05:12 PM
In microsoft.public.win2000.registry Brian Graham wrote:

> Found the problem. The batch file being invoked was called
> reg.bat . Bad naming choice. It was calling itself again, rather
> than using the reg command. --
> Brian
>
>>>> Brian Graham<GrahamB@psac-afpc.com> October 25, 2005 10:32:01
>>>> am >>>
> I'm trying to add a key to the (Windows XP SP2) registry to
> disable Netware file caching. Its for all database users,
> ultimately in a batch file called from the login script.
>
> REG ADD
> HKLM\SYSTEM\CurrentControlSet\Services\NetWareWorkstation\Paramet
> ers /v "File Caching" /t REG_DWORD /d 00000000 /f
>
>
> Instead of adding the key, the batch file just loops the command
> over and over..

Seen that before <VBG> Glad it is sorted now.
One additional suggestion is to always use fully qualified paths
(including the extension) in batch files.
e.g <FQP>\REG.EXE ADD ...

And another is that quoting the registry path always never hurts
and can help a lot on occasion. <G>