[wpkg-users] Assigning a Variable from a Registry key

Malte Hohmann groups at daooze.de
Wed Aug 29 13:41:14 CEST 2012


2012/8/28 Brett Delle Grazie <brett.dellegrazie at gmail.com>

> Hi,
>
> Hopefully a quick/easy question:
>
> Is there any way to set a variable to the contents of a registry key?
>
> something like:
>
> <variable name="some_var" value="registry:HKLM\Software\Microsoft\..." />
> etc.
>
> We have a requirement to locate the profile of a particular user and
> this is most easily located via the registry as it may vary client
> side.
>
> Thanks,
>
> Kind regards,
>
> Brett
> -------------------------------------------------------------------------
> wpkg-users mailing list archives >>
> http://lists.wpkg.org/pipermail/wpkg-users/
> _______________________________________________
> wpkg-users mailing list
> wpkg-users at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/wpkg-users
>
>
No, there is not. But to get the users profile path, why not use
%USERPROFILE%??

I personally would like the variable definition thing to be extended in
some way. Getting the content of any registry key would be great and
getting the STDOUT output of an external command or reading it from a file
would be fantastic!

I also have another suggestion for the handling of environment variables:
Recently I got into a situation where I update a system-wide environment
variable in one package and need to reference to its new value in a second
package.
To be a bit more precise: I have a package "OracleInstantClient" which sets
the environment variable ORACLE_HOME using setx.exe utility with parameter
"-m" (system-wide). This works great. Now I have a second package which
depends on OracleInstantClient. In this second package I need to read the
new value of ORACLE_HOME which was set during installation of
OracleInstantClient, but referecing to %ORACLE_HOME% here does not work. So
it would be great if WPKG could re-create the whole environment variables
from scratch on every new package. Maybe reading from
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment would
do...
However, this could also be achieved by assigning a variable the content of
a registry key ;o)

Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20120829/f75ce3f6/attachment-0002.html>


More information about the wpkg-users mailing list