comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: permanent setenv?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: permanent setenv? [message #50900] Wed, 25 October 2006 03:25
Jo Klein is currently offline  Jo Klein
Messages: 54
Registered: January 2006
Member
> Forget the environment, not portable anyway. Write your info into a
> simple text file, and read that. On Unix a .myapprc file in the users
> home will do, for Windows you have to do something else. Leave the
> environment to the user, do not mess with it.
You can use that approach on Windows, too. You have to test if you're
running on Windows, though. To get the user's home directory, you can
getenv('USERPROFILE') and use that instead of ~.
Cheers,
Jo
Re: permanent setenv? [message #50901 is a reply to message #50900] Wed, 25 October 2006 02:17 Go to previous message
Maarten[1] is currently offline  Maarten[1]
Messages: 176
Registered: November 2005
Senior Member
Wox wrote:

> Is there a way of adding an environment variable, like SETENV does,
> but then permanent?
>
> For windows one could make a .reg file and spawn regedit, adding
> something to "HKEY_CURRENT_USER\Environment".
>
> For Linux one could add an "export" line to .bashrc or .profile or ...
>
> One could try doing this for all the available OS's. Isn't there a
> more generic/uniform way of doing this? (Maybe
> "HKEY_CURRENT_USER\Environment" is ok for WinXP, but is it for 2000?
> Maybe you are using another shell on linux, so the 'export' line
> should be added to .kshrc,...)

Forget the environment, not portable anyway. Write your info into a
simple text file, and read that. On Unix a .myapprc file in the users
home will do, for Windows you have to do something else. Leave the
environment to the user, do not mess with it.

Maarten
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: permanent setenv?
Next Topic: Visibility / viewshed algorithm ?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:56:53 PDT 2025

Total time taken to generate the page: 0.00536 seconds