> ----- Original Message ----- 
> From: "Marcin Hoppe" <[EMAIL PROTECTED]>
> To: "Gert Driesen" <[EMAIL PROTECTED]>
> Cc: <NAntContrib-Developer@lists.sourceforge.net>
> Sent: Wednesday, June 01, 2005 8:48 AM
> Subject: Re: [NAntC-Dev] DeleteRegistry and WriteRegistry tasks (with unit
tests)
>

> On 5/31/05, Gert Driesen <[EMAIL PROTECTED]> wrote:
> > I just googled for "Ant registry", and came up with this:
> >
> > http://www.roxes.com/produkte/rat.html
> >
> > This company offers a "win32.registry" task that allows
> > getting/setting/deleting/... registry rentries.  This looks like an even
> > better idea to implement.
> >
> > BTW. they use "entry" as name for the registry value ;-)
>
> Ok, I had a look at their website (documentation, in particular). My
> new proposal would be:
>
> 1. <deleteregistry hive="..." key="..." [entry="..."] />
> 2. <writeregistry hive="..." key="..." [entry="..." value="..."] />
>
> Attributes enclosed in [] brackets are of course optional. If no entry
> attribute is provided, the key is created/deleted.

<writeregistry>:

- what do you do if an empty "entry" is provided (an empty string is set in
the build file) and no value is set ? Should we then clear the default value
of the specified key, or do you just try to create the key ?
- what if no entry is set (attribute not specified in build file), but a
value is set ? Do you then report a build error, or do you set the default
value of the specified key ?

<deleteregistry>:

- we should not allow an empty string (StringValidator(AllowEmpty=false))
here as the default value cannot be removed

> We can of course go for only one hive, because it makes it easier to cope
with when user
> can access, for example, only one of the hives he/she has specified.

Yeah, sure. we can always relax it later.

I have no problem with adding the <writeregistry>  and <deleteregistry>
tasks to NAntContrib, but for the NAnt distribution I'd prefer something
like the <registry> task:

<registry hive="..." key="...">
    <read property=".." entry="..." />
    <write [entry="..." value="..."] />
    <delete [entry="..."]" />
</registry>

where each child element can be repeated a number of times.

Gert


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
NAntContrib-Developer mailing list
NAntContrib-Developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nantcontrib-developer

Reply via email to