Environment variables are system-wide variables which share the same value. These variables are often parsed by the shell when executing commands, and are expanded into their appropriate variable. For example, this allows users to move file locations without needing to update hard-coded paths in ...

learn more… | top users | synonyms

1
vote
3answers
485 views

What does hyphen mean in Windows batch file?

In particular, I have problems understanding the hyphens in the following lines, which are from wikibooks if not -%1-==-- echo Argument one provided if -%1-==-- echo Argument one not provided & ...
0
votes
0answers
28 views

how to set environment variables in VM Fusion Windows 7

I have installed windows 7 just fine via VM Fusion, but am having trouble setting environment variables, as i cannot edit files on the C: drive. A specific example is the trouble i'm having with R ...
0
votes
1answer
14 views

/usr/bin/env is pointing to wrong ruby version. “No such file or directory”

If I type "rake spec" I get. /usr/bin/env: ruby1.9.1: No such file or directory This problem started happening when I uninstalled ruby 1.9.1 and used rvm to install the latest ruby version but ...
0
votes
0answers
13 views

Node Webkit - Environment Variables [closed]

I can't find any decent examples of Node Webkit being able to temporaringly set environment variables. I am currently working on making a portable framework to place some of my installed apps into, a ...
0
votes
2answers
23 views

Are these environment variables standard?… HTTP_PROXY, HTTPS_PROXY, AND NO_PROXY

It seems that a lot of programs are designed to read these environment variables to decide what proxy to go through in order to connect to a resource on the internet. Those programs may also have ...
0
votes
0answers
8 views

Environment variable for Visual Studio 2013 tools pointing to old Path after re-install

I'm attempting to change the tools environment Path for VS2013 after Uninstalling from my E: drive and installing to my C: drive. Attempted %VS120COMNTOOLS% environment change first answer here and ...
0
votes
2answers
42 views

'sample.exe' not recognised as internal or external command, operable program or batch file

Under Environment Variables, I set the path to sample.exe. I appended the System variable PATH with, C:\Program Files(x86)\Sample The sample.exe is in the Sample folder. Still, I get the above ...
1
vote
1answer
30 views

How can I run correct version of compiler when using elevated command prompt

I have two versions of the Typescript compiler (tsc.exe) on my system (1.0 and 1.5) and I cannot remove the earlier one because it is installed with Visual Studio 2013. They are located at: ...
-1
votes
1answer
12 views

ENV Variable not working - Windows 8

Trying to add an environment variable called phantomjs to my PATH: ECHO %PATH%: ...;C:\foo\phantomjs.exe but when I run where phantomjs, I get INFO: Could not find files for the given ...
1
vote
1answer
20 views

Windows Batch. Append to PATH Environment Variable, when It Contains Spaces

I want to add some binaries to path for my console session and I'm doing it like so if not defined WIXTOOLKIT_IN_PATH ( set WIXTOOLKIT_IN_PATH=1 set MY_PATH=%~dp0..\tools\wix SET ...
1
vote
1answer
34 views

How to change environment variable when the option is inactive

I'm trying to change the environment variable in windows 8, however the option to change is inactive. I tried to change the PATH using the command line, however the path never updated when I closed ...
-1
votes
0answers
51 views

How to populate environment variables in Mac OS X for CLI _AND_ GUI applications

I mostly use Linux as my development box, but I also run a Mac OS X based setup, which I would like to behave mostly as my Linux one. The main problem I face is to sync my environment variables I ...
3
votes
5answers
149 views

bash keep variable reference in another variable

I have the following variables in my .bashrc: export UPRODUCT=productName export U=/path/to/products/$UPRODUCT So typing cd $U will take me to /path/to/products/productName. What I want to do is, ...
2
votes
0answers
10 views

Cant physically type in variable value text box when editing PATH environment variable

I am quite lost with this and hope someone faces similar problem and fixed it. But it's as simple as not being able to type in the provided text box for changing variables values in the PATH. I can ...
0
votes
0answers
11 views

Control number of matlab threads from Linux environment variables

I am configuring Matlab for a multi user cluster and want the users to request a specific number of cores when they are launching Matlab. For example, without controlling this, performing an inverse ...
0
votes
1answer
44 views

delete items from path environment variable

I have a question regarding editing the path environment variable on my windows 7 Machine. I have been editing my path using SystemPropertiesAdvanced.exe's dialog window, but the changes i make are ...
0
votes
0answers
15 views

Bash filename tab completion when an environment variable is present

When I use tab completion on a normal path like this: vim /home/tester001/di<tab> it correctly expands to: vim /home/tester001/directory_1/ and I can continue like this: vim ...
1
vote
0answers
28 views

How to add Visual Studio code to path variable?

My path variable had corrupted which I have fixed now. But during the process, I lost some of the original entries in the path variable. I specifically want to add entries for visual studio code and ...
0
votes
1answer
30 views

Can I use shortcuts from a directory in PATH?

I'd like to have a directory, add it to my PATH, and put shortcuts to executables in it. I've done it in a Linux and it worked so wonderfully, but it doesn't seem to work on Windows -- it just can't ...
0
votes
1answer
25 views

Installing extensions of a program that is installed twice

I have Python installed twice in my computer. The python.exe file is located once under C:\Python34 and again under C:\Anaconda3. The first was installed through the standard Python installation, ...
1
vote
1answer
26 views

Use an environment variable to point to an “Open With” program

I have Windows Vista, but I guess this pertains to other versions as well. I want to set a program to be used in the Open With context menu. Now I want that the path to the .exe contain an environment ...
2
votes
3answers
79 views

To whom do environment variables belong?

From several websites I read that getenv is a system call. However I cannot find any reference to sys_getenv. I am trying to understand what "environment variables" are, exactly. Are they part of ...
2
votes
1answer
28 views

Why does ZSH local variable assignment fail?

I was reading this question and answer: zsh - variable assignment isn't working. The post explains how to fix it, but not why. Why does the local variable assignment fail in that case ? There ...
0
votes
0answers
39 views

call environment path commands from powershell

I can call any executable included in the environmental variable path from a command prompt by simply calling its name. However when i try to do the same from Power-shell I get an exception the ...
0
votes
1answer
83 views

'git' is not recognized as an internal or external command, operable program or batch file

I'm reciveing this error when trying to install something which uses 'git' command. I've already installed git and put the directory into my environment variable - C:\Program Files (x86)\Git\cmd I've ...
0
votes
1answer
38 views

How to handle Permission denied on source command?

I am trying to persist my java environment variables to the system and I'm having trouble with the following: :$> source java.sh -ksh: source: cannot create [Permission denied] What is the ...
0
votes
1answer
54 views

Start command inside xterm with login shell, over SSH?

I'm trying to use ssh to remotely start an xterm that runs a command inside a non-interactive login environment with a file that sets up the environment that is in a non-standard location. Anybody ...
0
votes
4answers
63 views

Pinging using a variable

I'm trying to create a batch file that will ping a variable that is determined by the users input e.g. "Enter PC Name:" pc name =123 Then it pings 123.domain.com @echo off set /p UserInputPath = ...
3
votes
2answers
40 views

Can I delete (apparently) redundant elements between my two Windows PATH variables?

For some reason--and I'm not sure if this is standard on Windows--I've got 2 PATH variables in my Windows System settings under Environment Variables. Can I delete from one of them anything that ...
0
votes
2answers
40 views

Is there an equivalent to source which allows me to have a batch script alter environment variables of the parent bash process?

My situation is this: I use python with conda on a windows machine, and work mostly in cygwin when on the command line. Now conda allows for different python environments, similar to virtualenv, but ...
15
votes
1answer
1k views

What is the difference between SETX and SET in environment variables in windows

What is the difference between SETX and SET? As per my understanding: Both are used to set environment variables SETX is for global variables. SET is for local variables. Is it correct?
1
vote
1answer
41 views

In what order does GNU env print environment variables?

When invoked without arguments, the env and printenv commands from the GNU Coreutils print the value of every environment variable. What determines the order in which these variables are printed? ...
2
votes
3answers
73 views

Can I change my PATH dynamically based on my cwd?

I would like to change my $PATH environment variable dependent on my current working directory. Say I'm in /foo/bar/baz and I have the directories /foo/node_modules/.bin and ...
-1
votes
3answers
132 views

Commands not executed with %comspec% /k

I am trying to execute a .bat file with a set of commands which can be executed individually through the command line, but not all together through the script: %comspec% /k ""C:\Program ...
1
vote
2answers
279 views

Why cmder does not import the user path variables?

The path variable in the cmder only contains those paths imported form the system path variable. While in normal command shell, the system path and user path will be concatenated. I've found in the ...
1
vote
1answer
63 views

Evaluate %PATH% as the system-scope environment variable exclusively

In Windows' command line, echo %PATH% appears to merge the system and the user variables PATH in such order before printing. That seems reasonable, but I would also like to be able to print only the ...
1
vote
2answers
53 views

Why does the set command display more environment variables than the environment variables gui?

When I run the set command in command prompt the first variable I see is But when I open my Environment Variables GUI I don't see ALLUSERSPROFILE Why is that? There are numerous other ...
5
votes
1answer
205 views

Powershell: A variable within a variable; Variableception

So the easiest way to explain my problem is for me to show you this simplified version of what I'm trying to do: PS C:\> $a = 'hello' PS C:\> $a hello PS C:\> $b = '$a world!' PS C:\> $b ...
0
votes
1answer
62 views

Setting Environment Variables on Mac OS X

I'm new to using Mac OS X. From my understanding, it uses Linux under the covers. I have a need to add an environment variable. Currently, whenever I start a terminal window, I've been executing ...
1
vote
1answer
87 views

MAC equivalent - user name & appdata

I have a couple of questions: On PC I can get the username from the environment variable USERNAME and on LINUX it is USER - what the MAC equivalent? The users local area on windows can be found via ...
1
vote
1answer
26 views

Should system path & user path match?

This morning I was trying to add python to my windows 7 PATH and used: setx PATH "%PATH%;C:\python34\" /M This seems to have changed my path but not in the manner I'd hoped! My user path now ...
1
vote
1answer
110 views

How to call environment variables in runas command for right click context menu

I am having trouble with using environmental variables with using runas when using the command in the registry for a right click context menu command. I have tried different methods of escaping the ...
1
vote
1answer
52 views

Windows 8 Can't find executable in path with “where” command

I added the following line in my System Variable Path "C:\Program Files (x86)\FontForgeBuilds\bin" I can then run fontforge: C:\Windows\system32>fontforge -v Copyright (c) 2000-2014 by George ...
1
vote
1answer
283 views

Do I need SQL Server paths in my PATH environment variable for it to work?

SQL Server adds things to my PATH environment variable, and over time that bloat makes me hit the 2048-char limit in Windows 7. Do I really need them there for SQL Server to run? This is on a ...
1
vote
1answer
26 views

Run a function from bashrc, but modify exported variable

I am trying to run a function from my bashrc that refreshes every minute and externalizes a variable. It looks like this: export CFN = '' _some_fn { export CFN = 'test' sleep 60 _some_fn ...
0
votes
2answers
66 views

How to echo string of another string shell variable

We would like to echo the value of a shell variable which has another variable string in its variable name. eg: we want the following output var1=1 var2=2 We tried several various forms similar to ...
0
votes
0answers
29 views

Can't change system variables from config files on MariaDB/MySQL on Linux

I want to change two system variables on my MySQL testing server, namely collation_server and collation_database from latin1_swedish_ci to utf8_general_ci, because its annoying that everytime I create ...
0
votes
2answers
30 views

All the Environment variables have been deleted in my Win7 64bit [duplicate]

I have overwritten all the paths in environment variables. . How can i restore those variables back.
0
votes
1answer
29 views

Cronjob: Iterate through files

I want to iterate through a list of bash scripts with a cron-job. I.e. every two hours I want to start another bash script. My idea was to set a new environment variable, each time the cronjob script ...
1
vote
1answer
45 views

batch current directory when starting as administrator

Background: I like to have my computer clean. Especially I don't like programs and services starting with my windows, but I still want to use all my programs without having to manually start ...