ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <>
Subject Re: Ant and the Windows Registry
Date Fri, 13 Oct 2006 13:14:33 GMT
Robert Pepersack wrote:
> Hi all,
> I would like to read and alter a Windows registry key with Ant.  You
> may ask why would I want to change the Windows registry??!!  I want to
> change the registry because I want to change my J2EE server's (Sybase
> EAServer) classpath from Ant.  My fellow developers and I could change
> our servers' classpathes manually by opening regedit, but this would be
> prone to point-and-click screw-ups.  I think that changing the registry
> from Java would be more reliable and less error-prone.
> I Googled on the subject and found that there is a Java Preferences API
> and Orangevolt Ant Tasks.  Has anyone used these, or know of something
> better?

1. Java PAPI does go via the registry on windows, but only a subset.

2. if patching stuff into the registstry (i.e. add/remove/replace keys) 
only (and not reading), just <exec> regedt32 with the right command line 
options to load a .reg file. You can probably dynamically create one of 
those using <echo>, but presumably you have to encode it as UTF-16 LE or 
the like to get windows to take it,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message