<br><br><div class="gmail_quote">2012/8/29 Stefan Pendl <span dir="ltr"><<a href="mailto:stefan.pendl.71@gmail.com" target="_blank">stefan.pendl.71@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Am 29.08.2012 13:41, schrieb Malte Hohmann:<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
To be a bit more precise: I have a package "OracleInstantClient" which<br>
sets the environment variable ORACLE_HOME using setx.exe utility with<br>
parameter "-m" (system-wide). This works great. Now I have a second<br>
package which depends on OracleInstantClient. In this second package I<br>
need to read the new value of ORACLE_HOME which was set during<br>
installation of OracleInstantClient, but referecing to %ORACLE_HOME%<br>
here does not work. So it would be great if WPKG could re-create the<br>
whole environment variables from scratch on every new package. Maybe<br>
reading from HKLM\SYSTEM\CurrentControlSet\<u></u>Control\Session<br>
Manager\Environment would do...<br>
However, this could also be achieved by assigning a variable the content<br>
of a registry key ;o)<br>
<br>
</blockquote>
<br></div>
I think the problem here is that setx.exe doesn't notify the system of the change, so cscript.exe doesn't update the process environment.<br>
<br>
May be cscript.exe doesn't support updating the process environment at all, so wpkg.js must be made aware of that change internally.<br>
<br></blockquote><div> </div><div>I am not sure if WPKG updates the environment at all. It saves and
restores its environment during processing of any package - at least
this is logged in the output - so I think it just stores its
environment variables somewhere and reloads them, ignoring any changes
done to the system environment. However, I did not check this in the
source code as I have no clue about JScript. Maybe Rainer could shed
some light into this... <br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
----<br>
<br>
The OPs question could be solved by a DOS command script using "REG QUERY" to read the registry and "FOR /F" to parse the output.<br>
<br>
<br></blockquote><div><br>This won't do the trick at all as you need to do this query _before_ executing wpkg.js. Same problem as with my issue above...<div class="yj6qo ajU"><div id=":n8" class="ajR" tabindex="0"><img class="ajT" src="https://mail.google.com/mail/images/cleardot.gif"><br>
</div></div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
--<br>
Stefan P.<br>
<br>
Top-posting:<br>
A: Because it messes up the order in which people normally read text.<br>
Q: Why is top-posting such a bad thing?<br>
A: Top-posting.<br>
Q: What is the most annoying thing in e-mail?<div class="HOEnZb"><div class="h5"><br>
------------------------------<u></u>------------------------------<u></u>-------------<br>
wpkg-users mailing list archives >> <a href="http://lists.wpkg.org/pipermail/wpkg-users/" target="_blank">http://lists.wpkg.org/<u></u>pipermail/wpkg-users/</a><br>
______________________________<u></u>_________________<br>
wpkg-users mailing list<br>
<a href="mailto:wpkg-users@lists.wpkg.org" target="_blank">wpkg-users@lists.wpkg.org</a><br>
<a href="http://lists.wpkg.org/mailman/listinfo/wpkg-users" target="_blank">http://lists.wpkg.org/mailman/<u></u>listinfo/wpkg-users</a><br>
<br>
</div></div></blockquote></div><br>