Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

/F command in batch file not working

178 views
Skip to first unread message

DT

unread,
Jan 26, 2004, 1:38:06 AM1/26/04
to
I am using Reg.exe version 1.00

I can't get the "/f" command to work so it will execute the command lines
without stopping to ask: "ARE YOU SURE YOU WANT TO...."

Is it my Reg.exe version that is the issue? If so, what version do I need?

Michael Bednarek

unread,
Jan 26, 2004, 3:45:25 AM1/26/04
to
On Sun, 25 Jan 2004 22:38:06 -0800, "DT" <noe...@noemail.xxx> wrote
in alt.msdos.batch.nt:

Which OS version? Under NT5.0, the REG.EXE version is 2.0, under
NT5.1, it's 3.0, under NT5.2 it's 5.2.3790.0 (same as OS). I suspect
version 1.0 came with NT4 Support Tools?

What do you /F expect to do? Have you tried "REG /?"? According to
<http://www.infotech.jyu.fi/software/utils/freeware/registry%20batch%20control/reg/reg.htm>,
there is no "/f" option in V-1.

--
Michael Bednarek http://mbednarek.com/ "POST NO BILLS"

Matthias Tacke

unread,
Jan 26, 2004, 4:38:07 AM1/26/04
to
"DT" wrote:

Reg.exe (ver 3.0) from XP also works under W2K. So if you've 1.0 what
os do you use?
The reskit for w2k contains ver 1.1, you may download it here:
http://www.dynawell.com/reskit/microsoft/win2000/reg.zip

There is version 2.0 contained in the W2K SP3 Support Tools (10MB file)
dowloadable at Microsoft:
http://download.microsoft.com/download/win2000platform/Tool/SP3/NT5/EN-US/SP3SupportTools.exe

So the most recent version 3.0 should be easily extracted from the xp cd
expand [CD:]\i386\reg.ex_ reg.exe

HTH
--
Greetings
Matthias________________________________________
For help on nt commands enter in a cmd window:
W2K>HH windows.chm::ntcmds.htm XP>HH ntcmds.chm

Matthias Tacke

unread,
Jan 26, 2004, 5:06:57 AM1/26/04
to

To add to this information, version 1.1 from the w2k reskit also hasn't
the switch /F. w2k itself has no reg.exe. Version 3.0 from xp runs on
w2k, if it does on nt4 has to be tested.
The w2k3 (nt5.2) version runs on xp _not_ on w2k.

DT

unread,
Jan 27, 2004, 1:28:06 AM1/27/04
to
This batch actually will be used on NT4 as well as Win2k.
The batch works fine with both operating systems.
Just the /f command not working.

I will follow your links etc. and see what I can come up with for a resolve.

Thanks....


"Matthias Tacke" <Matt...@Tacke.de> wrote in message
news:bv2n5v$ric$00$1...@news.t-online.com...

Michael Bednarek

unread,
Jan 28, 2004, 7:04:42 AM1/28/04
to
On Mon, 26 Jan 2004 22:28:06 -0800, "DT" <noe...@noemail.xxx> wrote
in alt.msdos.batch.nt:

>This batch actually will be used on NT4 as well as Win2k.


>The batch works fine with both operating systems.
>Just the /f command not working.

[snip]

What do you expect /f to do? Have you tried "REG /?"?

DT

unread,
Jan 31, 2004, 2:35:31 AM1/31/04
to
What do I expect /f to do?

It allows for what I posted originally. It will follow each command in the
batch without stopping for each to ask the question" Are you sure you want
to do this Y OR N"

Yes, I read the reg ? and it says nothing more than use /f for my need. But
again, back to square one. Why won't it work?

I've finally got a hold of reg.exe in version 2. I am going to try this
first week of Feb. and see if that version can exectute the /f command.

I'll post results soon..........


"Michael Bednarek" <mb at mbednarek dot com> wrote in message
news:389f10husl2eaalj9...@4ax.com...

Al Dunbar

unread,
Jan 31, 2004, 2:30:37 PM1/31/04
to

"DT" <noe...@noemail.com> wrote in message
news:101mmm3...@corp.supernews.com...

> What do I expect /f to do?
>
> It allows for what I posted originally. It will follow each command in the
> batch without stopping for each to ask the question" Are you sure you want
> to do this Y OR N"
>
> Yes, I read the reg ? and it says nothing more than use /f for my need.
But
> again, back to square one. Why won't it work?

(disclaimer: using XP) When I type 'reg /?' (not 'reg ?') it says absolutely
nothing about any /f switch. From your description it sounds more like a
switch applied to the command processor. I seem to recall some facility in
an earlier version that would display each command in a batch file being
processed and ask if you wanted it to execute. Again in XP, neither 'cmd /?'
nor 'command /?' indicate the availability of a /F switch such as you
describe. CMD has /F:ON and /F:OFF, but this has more to do with interactive
use of the command processor.

/Al

Phil Robyn

unread,
Jan 31, 2004, 2:35:11 PM1/31/04
to
Al Dunbar wrote:

> "DT" <noe...@noemail.com> wrote in message
> news:101mmm3...@corp.supernews.com...
>
>>What do I expect /f to do?
>>
>>It allows for what I posted originally. It will follow each command in the
>>batch without stopping for each to ask the question" Are you sure you want
>>to do this Y OR N"
>>
>>Yes, I read the reg ? and it says nothing more than use /f for my need.
>
> But
>
>>again, back to square one. Why won't it work?
>
>
> (disclaimer: using XP) When I type 'reg /?' (not 'reg ?') it says absolutely
> nothing about any /f switch. From your description it sounds more like a
> switch applied to the command processor. I seem to recall some facility in
> an earlier version that would display each command in a batch file being
> processed and ask if you wanted it to execute. Again in XP, neither 'cmd /?'
> nor 'command /?' indicate the availability of a /F switch such as you
> describe. CMD has /F:ON and /F:OFF, but this has more to do with interactive
> use of the command processor.
>
> /Al
>

Hi, Al, see '<<<<-----' below:

<Win2000> c:\cmd>reg add /?

Registry Console Tool For Windows 2000 - version 2.0
Copyright (C) Microsoft Corp. 1981-1999. All rights reserved

REG ADD KeyName [/v ValueName | /ve] [/t Type] [/s Separator] [/d Data] [/f] <<<<-----

KeyName [\\Machine\]FullKey
Machine Name of remote machine - omitting defaults to the current machine
Only HKLM and HKU are available on remote machines
FullKey ROOTKEY\SubKey
ROOTKEY [ HKLM | HKCU | HKCR | HKU | HKCC ]
SubKey The full name of a registry key under the selected ROOTKEY
ValueName The value name, under the selected Key, to add
/ve add the empty value name <no name>
Type [ REG_SZ | REG_MULTI_SZ | REG_DWORD_BIG_ENDIAN |
REG_DWORD | REG_BINARY | REG_DWORD_LITTLE_ENDIAN |
REG_NONE | REG_EXPAND_SZ ]
If omitted, REG_SZ is assumed
Separator Specify one charactor that you use as the separator in your data
string for REG_MULTI_SZ. If omitted, use "\0" as the separator
Data The data to assign to the registry ValueName being added
/f Force overwriting the existing registry entry without prompt <<<<-----

Examples:

REG ADD \\ABC\HKLM\Software\MyCo
Adds a key HKLM\Software\MyCo on remote machine ABC

REG ADD HKLM\Software\MyCo /v Data /t REG_BINARY /d fe340ead
Adds a value (name: Data, type: REG_BINARY, data: fe340ead)

REG ADD HKLM\Software\MyCo /v MRU /t REG_MULTI_SZ /d fax\0mail
Adds a value (name: MRU, type: REG_MUTLI_SZ, data: fax\0mail\0\0)

REG ADD HKLM\Software\MyCo /v Path /t REG_EXPAND_SZ /d %"systemroot"%
Adds a value (name: Path, type: REG_EXPAND_SZ, data: %systemroot%)
Notice: Put the double quote ( " ) inside the expand string

>
>>I've finally got a hold of reg.exe in version 2. I am going to try this
>>first week of Feb. and see if that version can exectute the /f command.
>>
>>I'll post results soon..........
>>
>>
>>"Michael Bednarek" <mb at mbednarek dot com> wrote in message
>>news:389f10husl2eaalj9...@4ax.com...
>>
>>>On Mon, 26 Jan 2004 22:28:06 -0800, "DT" <noe...@noemail.xxx> wrote
>>>in alt.msdos.batch.nt:
>>>
>>>
>>>>This batch actually will be used on NT4 as well as Win2k.
>>>>The batch works fine with both operating systems.
>>>>Just the /f command not working.
>>>
>>>[snip]
>>>
>>>What do you expect /f to do? Have you tried "REG /?"?
>>>
>>>--
>>>Michael Bednarek http://mbednarek.com/ "POST NO BILLS"
>>
>>
>
>


--
Phil Robyn
Univ. of California, Berkeley

u n z i p m y a d d r e s s t o s e n d e - m a i l

Al Dunbar

unread,
Jan 31, 2004, 3:03:24 PM1/31/04
to

"Phil Robyn" <zipp...@berkeley.edu> wrote in message
news:bvh01i$sfrui$1...@ID-55492.news.uni-berlin.de...

> Al Dunbar wrote:
>
> > "DT" <noe...@noemail.com> wrote in message
> > news:101mmm3...@corp.supernews.com...
> >
> >>What do I expect /f to do?

<snip>

> > (disclaimer: using XP) When I type 'reg /?' (not 'reg ?') it says
absolutely
> > nothing about any /f switch. From your description it sounds more like a
> > switch applied to the command processor. I seem to recall some facility
in
> > an earlier version that would display each command in a batch file being
> > processed and ask if you wanted it to execute. Again in XP, neither 'cmd
/?'
> > nor 'command /?' indicate the availability of a /F switch such as you
> > describe. CMD has /F:ON and /F:OFF, but this has more to do with
interactive
> > use of the command processor.
> >
> > /Al
> >
>
> Hi, Al, see '<<<<-----' below:

Thanks for putting me straight on this, Phil, and also for doing so via
private message instead of replying to all in the newsgroup. I would be so
embarrassed if this gaff were widely known publicly.

BTW, why does your e-mail address show up as I reply from OE as
"alt.msdos.batch.nt"? It's almost as if... WAIT A MINUTE, this isn't a
private conversation!

Geez, why isn't there a recall button when you really need it! Now I'll have
to send the Men in Black after everyone to zap their memories! ;-)


/Al


TJP

unread,
Feb 26, 2004, 12:00:12 PM2/26/04
to
REG DELETE KeyName [/v ValueName | /ve | /va] [/f]

KeyName [\\Machine\]FullKey
Machine Name of remote machine - omitting defaults to the current
machine
Only HKLM and HKU are available on remote machines
FullKey ROOTKEY\SubKey
ROOTKEY [ HKLM | HKCU | HKCR | HKU | HKCC ]
SubKey The full name of a registry key under the selected
ROOTKEY

ValueName The value name, under the selected Key, to delete
When omitted, all subkeys and values under the Key are
deleted
/ve delete the value of empty value name <no name>
/va delete all values under this key
/f Forces the deletion without propmt

This is the XP reg.exe help.

THE /f switch DOES NOT WORK. DOES ANYONE KNOW WHY? 10 POSTS AND THEY
ARE AS MUCH USE AS A SNOOZE BUTTON ON A SMOKE ALARM.

Matthias Tacke

unread,
Feb 26, 2004, 12:36:17 PM2/26/04
to
TJP wrote:

<snip>


>THE /f switch DOES NOT WORK. DOES ANYONE KNOW WHY? 10 POSTS AND THEY
>ARE AS MUCH USE AS A SNOOZE BUTTON ON A SMOKE ALARM.

Neither repition of a help text, nor writing in uppercase (which is
equivalent to shouting) will give us a hint what exactly doesn't work.

On my notebook the old thread has gone and with that behaviour I don't
feel the need to use google to reread the original thread.

BTW is TJP the same poster as DT ? Real name or at least a unique pseudo
would help us to distinguish.

Marco Maier Said

unread,
Feb 26, 2004, 3:27:12 PM2/26/04
to

> THE /f switch DOES NOT WORK. DOES ANYONE KNOW WHY?

No

Ted Davis

unread,
Feb 26, 2004, 4:50:17 PM2/26/04
to

Use a different registry editor program, such as the reg.exe from NT.

I have found it advisable to avoid XP and its utilities for
administrative tasks: the failure rates are just too high.

T.E.D. (tda...@gearbox.maem.umr.edu)
SPAM filter: Messages to this address *must* contain "T.E.D."
somewhere in the body or they will be automatically rejected.

0 new messages