Hello,
See the following page on how to "flush" environment variable changes so
they are available to other applications:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/environment_variables.asp.
-Bill
Eric Weidner wrote:
> We are using jRegistryKey and we wrote wrappers around it to provide
> easy registry path manipulation. The problem with using Java to
> manipulate the registry is that we haven't found a way to flush the
> changes like you can with InstallShield, etc so they are available
> immediately. Thus the user has to go flush them manually by going into
> the env var dialog and hitting ok, or you have to request a reboot.
>
> http://www.beq.ca/downloads/jreg/
>
> Eric
>
> Steve Loughran wrote:
>
>> ----- Original Message -----
>> From: "Eric Weidner" <eric.weidner@ejbsolutions.com>
>> To: "Ant Users List" <ant-user@jakarta.apache.org>
>> Sent: Wednesday, November 20, 2002 5:05 PM
>> Subject: Re: Ant Featured in Out-of-the-Box
>>
>>
>>
>>
>>> On Windows, we use InstallShield to initially drive the installation,
>>> call out to other Windows installers (e.g., JDK, Apache, MySQL, WinCVS,
>>> etc.), update the registry as needed, and finally kick off our master
>>> Ant script to do the bulk of the installation (e.g.,
>>> extracting/decrypting/copying/moving files, regex replacements, CRLF
>>> fixes, calling other Ant-based installs, running JUnit/HttpUnit,
>>> processing XML docs with XSLT, creating/updating properties files,
>>> creating and populating databases, building and deploying J2EE apps,
>>> etc.). There are actually one or two places that we have Ant call Java
>>> code to create/update some Windows environment variables via JNI, but
>>> it's fairly simple and well-contained.
>>>
>>> On Linux, we use Ant to do it all because there's no need for registry
>>> manipulation. We have Ant ask the user for input up front (e.g., where
>>> to install, DNS setup, user ID/password, etc.) then do all the rest
>>> without further user interaction.
>>>
>>>
>>
>>
>> so what you are saying is we need a <regedit> task for java, which
>> creates a
>> regedit file and then execs regedit. An interesting thought...
>>
>>
>> --
>> To unsubscribe, e-mail:
>> <mailto:ant-user-unsubscribe@jakarta.apache.org>
>> For additional commands, e-mail:
>> <mailto:ant-user-help@jakarta.apache.org>
>>
--
To unsubscribe, e-mail: <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
|