Skip to main content

All Questions

15 questions with no upvoted or accepted answers
4 votes
2 answers
1k views

PATHEXT environment variable not working

I want to use gcc on Windows, so someone gave me a MinGW folder. I put the D:\software\MinGW\bin\ folder in my PATH. But when I open a new CMD and type gcc, I get 'gcc' is not recognized as an ...
JacopoStanchi's user avatar
3 votes
0 answers
2k views

How can I set a dynamically evaluated environment variable for Windows' Command Processor (cmd.exe)?

The Windows command processor (cmd.exe) supports environment variables like USERNAME and USEPROFILE. The value of these variable is always the same after they have been set. But if I execute echo %...
Michiel van Oosterhout's user avatar
2 votes
0 answers
907 views

Powershell can't see "git" or "node" commands while cmd can

Using Windows 10, I can't run certain commands from PowerShell but they all work correctly using cmd. PowerShell: node --version: node : The term 'node' is not recognized as the name of a cmdlet, ...
Vitaly Senko's user avatar
2 votes
0 answers
220 views

Python and Perl not recognized in cmd even after adding in environment

It was fine yesterday, but it suddenly stopped working today. Both my perl and python were not recognized in cmd. I read as much as i can online for the answers and follow the instruction. I have ...
niknur's user avatar
  • 21
2 votes
0 answers
141 views

Windows 10 Environment Variables: why does variable replacement not work?

On Windows 10 Pro: I just downloaded and installed (i.e. unpacked) the latest Maven version into a directory in preparation of an upcoming development project. Then - as instructed - I defined me two ...
mmo's user avatar
  • 130
2 votes
0 answers
433 views

Unset environment variable starting with =

I have this stange environment variables in my windows (discussed here and here): C:\Users\******\Desktop>set "" =::=::\ =C:=C:\Users\******\Desktop Unfortunately, I have to run a software that ...
Franz Wimmer's user avatar
1 vote
2 answers
2k 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 ...
kutschkem's user avatar
  • 194
0 votes
0 answers
122 views

Why does adding a filetype to PATHEXT cause invocations to say "Access is denied"?

My goal: to run a file hello.py on my %PATH% when I write hello. What I've done: Made sure .py is part of PATHEXT. C:\Windows\System32>echo %PATHEXT% .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;....
GreenTriangle's user avatar
0 votes
0 answers
42 views

What happened to this added directory in environment variables path?

Added the following directory to the path by using this method: set path=%path%;D:\Programm\jflex-1.8.2\jflex-1.8.2\bin set path=%path%;D:\Programm\jflex-1.8.2\jflex-1.8.2\bin\jflex but, I can't find ...
3Dot's user avatar
  • 1
0 votes
1 answer
2k views

system variable not set on remote machine by psexec

Need to set-up system variable on remote machine. Performing psexec \\remote_machine cmd /c setx foo bar got reply Success: Entered value was saved cmd exited on remote_machine with error code 0 ...
user2956477's user avatar
0 votes
0 answers
49 views

Command prompt. Is it possible to create a certain number of variables according to the lines in a text file and then

Can we use a text file to set variables according to how many changing lines are there in the .txt file? files.txt name 1 text 2 info 3 ... and so on set line01="name 1" set line02="text 2" ...
10Y01's user avatar
  • 23
0 votes
1 answer
497 views

CMD: SET : SETX :: %ABC% : ??? -- Getting "global"/"original" ENV after altering by SET

SET "temporarily" sets/changes an environment variable. How do I get the "original" / "global" / "unchanged" one from a shell/process in which it has been ...
stuquus's user avatar
0 votes
0 answers
92 views

Windows: Remove file type from path completion

I've got an issue with my cmd environmental variables autocompletion (with TAB). For some reason, I'm getting suggestions for .dll .png and all other nonsense I don't care about. How do I exclude ...
Peter's user avatar
  • 101
0 votes
0 answers
361 views

How to tell whether machine is on AD Domain when running as SYSTEM

I have a batch script run as the SYSTEM user, and I need to find out whether the machine is on an AD Domain or not. I don't know, or need to know, the AD Domain name, just whether it's on any AD ...
FrinkTheBrave's user avatar
0 votes
0 answers
253 views

Driving me crazy. SETX /?

Rosalee is no longer a user, but her name remains everywhere. I am thinking of exporting the registry and performing a Find/Replace on all Rosalee's or trying to use setx, but I cannot figure out the ...
user avatar