2012/8/29 Stefan Pendl <stefan.pendl...@gmail.com> > Am 29.08.2012 13:41, schrieb Malte Hohmann: > > 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) >> >> > 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. > > May be cscript.exe doesn't support updating the process environment at > all, so wpkg.js must be made aware of that change internally. > > 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...
---- > > 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. > > > 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... > -- > Stefan P. > > Top-posting: > A: Because it messes up the order in which people normally read text. > Q: Why is top-posting such a bad thing? > A: Top-posting. > Q: What is the most annoying thing in e-mail? > > ------------------------------**------------------------------** > ------------- > wpkg-users mailing list archives >> http://lists.wpkg.org/** > pipermail/wpkg-users/ <http://lists.wpkg.org/pipermail/wpkg-users/> > ______________________________**_________________ > wpkg-users mailing list > wpkg-users@lists.wpkg.org > http://lists.wpkg.org/mailman/**listinfo/wpkg-users<http://lists.wpkg.org/mailman/listinfo/wpkg-users> > >
------------------------------------------------------------------------- wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/ _______________________________________________ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users