Skip to main content

All Questions

9 votes
2 answers
13k views

Set and print content of environment variable in cmd.exe subshell?

Consider this example, where I start a new "sub" instance of cmd.exe, and then try to set a new environment variable in it, and then check if it has the proper value set (this is in cmd.exe of Windows ...
sdbbs's user avatar
  • 1,402
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
8 votes
1 answer
21k views

Enable-WindowsOptionalFeature is not recognized in Windows 10

When I try to run Enable-WindowsOptionalFeature windows throws ''Enable-WindowsOptionalFeature' is not recognized as an internal or external command, operable program or batch file.' I am running ...
andgate's user avatar
  • 99
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
2k views

pip command error during installation of requirements.txt

When I run the command py -2.7 -m pip install requirements.txt, I'm getting the error but I have already upgraded it but I'm still getting error in installing requirements.txt. When I use the ...
Rohit Potter's user avatar
2 votes
1 answer
4k views

How to override environment path variable to call curl from custom path instead of system32 path?

I have a path for folder containing curl.exe file (C:\My\Custom\Directory\) added to Path Environment Variable. The problem is that when I call curl from command line, it runs another curl executable ...
Omar's user avatar
  • 1,783
0 votes
3 answers
4k views

how to use output as VARIABLE and put trimmed value into CLIP?

can anyone teach me the right way? here is my attempt code: @echo off SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION "%~dp0..\x64\mediainfo.exe" --Inform=General;%%UniqueID/String%% "%~dp0..\files\...
gamer0's user avatar
  • 931
0 votes
2 answers
1k views

Trying to use an environment variable in a .cmd script, getting the message "\Windows was unexpected at this time"

I need to access a windows environment variable in a .cmd script, it looks something like this, following the documentation on microsoft's support: if "%MY_ENV_VAR%" == "" ( echo You must set your ...
theJuls's user avatar
  • 103
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
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
7 votes
2 answers
3k views

How do I keep each PATH entry only once?

I have just tried to add something to my PATH and realized it grew out of proportions because of duplicates: C:\Users\user>setx Path "%Path%;C:\Python34" WARNING: The data being saved is truncated ...
Dmitry Grigoryev's user avatar
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
2 answers
97 views

Different behaviour of cmd depending on the form of the path string

In cmd window I can't cd to a directory if it is set by a user environment variable. The variable content is OK. If I cd to the directory set by the content of the variable, it works OK, too. Could ...
Gangnus's user avatar
  • 167
1 vote
1 answer
232 views

Can I use a batch file to hilight a specific file format?

I've been experimenting with batch files lately, and recently I found an answer to an old question: Hilight/select a file with a batch script. Now that I have accomplished that, I would like to know ...
Mr. Mendelli's user avatar
  • 1,269
1 vote
1 answer
2k views

Why some libraries are loaded only under administrator privileges?

On Windows, I have an executable that depends on some third-party libraries. If I try to run it under cmd, an error windows appear saying "program can't start because some_third_party_library.dll is ...
Manuel Jesus Rodriguez's user avatar

15 30 50 per page