In Visual Studio 2003, I am trying to set an environment variable in the pre-build event that will then be used in the compilation step, but the value doesn't seem to be propagated. For example, if the pre-build event contains this (either directly or within a batch file):
set MY_LIB_VERSION=1.0.0
and AdditionalIncludeDirectories has...
The following code is suppose to open CMD from my C# application and open the file text.txt.
I tried to set the file path as an environment variable but when notepad opens it looks for %file%.txt instead of text.txt
Any idea why?
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents=false...
I want cscope to open files in MacVim instead of vim, so I'm trying to have the path to MacVim as the Value of the EDITOR environment variable which is used by cscope:
$ export EDITOR=/Applications/MacVim.app/Contents/MacOS/MacVim
If I'm now trying to edit a file from within ctags, it won't work and throws this error message:
$ MacVim...
hi,
this may be a very simple problem, but I couldn't find an answer googleing and I'm in a rush - so I'd appreciate fast code examples.
I have an environment variable on the OS i would like to read using java code. I've tried System.getProperty, but that only seems to work for the -D variables supplied directly for the JVM.
how can m...
I currently use Strawberry Perl as my primary Perl distribution. However, I have some applications that make Perl calls through cygwin. These generally fail because they are calling the version of Perl that was packaged with cygwin, and only looking in cygwin's lib folders. How can I modify my cygwin environment to call Strawberry Perl (...
I want log4net to write log files (using RollingFileAppender) to a subfolder of the common application data folder (e.g. C:\Documents and Settings\All Users\Application Data\Company\Product\Logs).
However, on Win XP, there is no environment variable that specifies this folder. We have %ALLUSERSPROFILE%, we have %APPDATA%, but there is no...
Using Delphi, how do I access the equivalent of .NET's System.Environment.SpecialFolder.LocalApplicationData variable (which works on any version of Windows)? I assumed I could just do:
dir := GetEnvironmentVariable('LOCALAPPDATA');
This works on Vista but XP doesn't seem to set that environment variable by default at least on my tes...
From what I've read, any changes to the environment variables in a Python instance are only available within that instance, and disappear once the instance is closed. Is there any way to make them stick by committing them to the system?
The reason I need to do this is because at the studio where I work, tools like Maya rely heavily on ...
I recently installed the Macports port of Ruby19 and it's changed my environment settings to point to opt/local in the first instance rather than usr/local where I have my standard 1.8.7 install.
I've tried updating my ~/.profile by adding the usual export PATH etc. as the last line but to no avail. I have to run the .profile file each ...
In Perl, I need to read the environment of other processes.
The script is running with root
privileges.
The script will be
running in both Linux and Solaris.
I would like a solution that's mostly platform agnostic, at least between Linux and Solaris. In Linux, examining the /env/<proc_id>/environ can get me the answer.
I would like ...
If I type into a terminal,
export DISPLAY=:0.0
... where is the shell storing that environment variable?
I'm using Ubuntu 8.10. I've looked in the files ~/.profile and /etc/profile and can find no trace of DISPLAY.
...
Ex : I want something like abc.hyd.mycompany.com. My requirement is to parse this name and initialize appropriate service.
use System.net;
Dns.GetHostName() doesn't return fully qualified name it just gives "abc"
...
I'm having this weird situation :
My user's and system's PATH variable is different than the PATH in powershell.
When I do :
PS C:\$env:path
C:\Windows\System32\WindowsPowerShell\v1.0\;c:\oldpath
However this is not correct, it looks like it stuck on some old PATH variable of my system, so none of the udpates I've done on it didn't...
I'd like gcc to include files from $HOME/include in addition to the usual include directories, but there doesn't seem to be an analogue to $LD_LIBRARY_PATH. I know I can just add the include directory at command line when compiling (or in the makefile), but I'd really like a universal approach here, as in the library case.
...
I found it is hard to keep my environment variables sync on different machines. I just want to export the settings from one computer and import to other ones.
I think it should be possible, but don't know how to do it. Can anyone help me? Thanks.
...
I always wondered why I have to manually set the JAVA_HOME environment variable after installing the Java SDK.
JAVA_HOME=c:\Program Files\Java\jdk1.6.0_12
Visual Studio at least provides a batch file to set these kind of environment variables:
call "c:\Program Files\Microsoft Visual
Studio 9.0\VC\vcvarsall.bat"
Does Java ha...
The UNIX "/usr/bin/script" command will create a running transcript of your shell session (see "man script" for more info).
However, when inside a script instance, it seems to forget the parent shell's env vars, aliases, etc.
The following example demonstrates how the "ll" alias I define is ignored inside "script":
zsh> mkdir temp
zsh...
I have a setup project in which I have a custom action that is adding the target folder to the path. Nothing special, works ok, adds it to the path.
However if I then open a cmd window it's not available. If I psexec and try to directly run something that is in the folder it isn't found.
I logged off the box and on again and it turne...
I need to access an environment variable remotely. To do this I think the best way is to read it from registry.
Where are environment variables stored in registry?
...
Is it possible to set an environment variable at runtime from a Java
application?
In Java 1.5 java.lang.System class there is the getenv() method, I would
only need a setenv() method...
Is it possible to modify the environment variables in the java process itself; not in the child process.
Is it possible to achieve it through JNI? And ...