Assume I want to set an environment variable just for Thunderbird.
It should not be visible outside for other programs.
How can I achieve this?
Peter
How to set an environment variable only for Thunderbird?
-
- Posts: 299
- Joined: July 29th, 2005, 3:25 am
-
- Posts: 6421
- Joined: February 3rd, 2009, 6:29 pm
Re: How to set an environment variable only for Thunderbird?
Try something like:
* Command Prompt
* Thunderbird
Set Command
http://ss64.com/nt/set.html
nsIEnvironment Interface
http://developer.mozilla.org/en-US/docs ... nvironment
Edit:
If I then open the firefox.exe process with windows explorer or in another command prompt window, then the "Example" environment variable would be an empty string.
* Command Prompt
Code: Select all
set Example=Alpha Beta Gamma
thunderbird.exe
Code: Select all
// scriptable access to current process environment
var environment = Components.classes["@mozilla.org/process/environment;1"].
getService(Components.interfaces.nsIEnvironment);
alert(environment.get("Example")); // Alpha Beta Gamma
http://ss64.com/nt/set.html
nsIEnvironment Interface
http://developer.mozilla.org/en-US/docs ... nvironment
Edit:
If I then open the firefox.exe process with windows explorer or in another command prompt window, then the "Example" environment variable would be an empty string.
Last edited by morat on January 11th, 2018, 3:06 pm, edited 1 time in total.
-
- Posts: 299
- Joined: July 29th, 2005, 3:25 am
Re: How to set an environment variable only for Thunderbird?
This is exactly what is NOT suitable
As I said in my initial posting: The environment variable should NOT be visible by other prigrams.
If I enter
set Example=Alpha Beta Gamma
It IS visibale by other programs since it is global
So your suggestion does NOT fit.
So I need a file in "profile" folder where to enter the environment variables.
Peter
As I said in my initial posting: The environment variable should NOT be visible by other prigrams.
If I enter
set Example=Alpha Beta Gamma
It IS visibale by other programs since it is global
So your suggestion does NOT fit.
So I need a file in "profile" folder where to enter the environment variables.
Peter