Skip to main content

All Questions

0 votes
1 answer
58 views

%localappdata% and echo %localappdata% returns two different directories [closed]

I'm having some issues with Windows 10. After fixing my temp INET folder which somehow was pointing at a different account, I've now found an odd issue. If I type echo %localappdata% in CMD, it gives ...
user3714877's user avatar
-2 votes
1 answer
39 views

In there some description of all the command processor macros in Windows?

I'm looking for a list of the macro strings known to Window 10 command processor, e.g. %ProgramFiles%, %ProgramFiles(x86)%, etc.
Max Yaffe's user avatar
  • 147
4 votes
2 answers
447 views

How do I persist windows variables set in a CMD file?

in windows I would like to have a cmd script that I can run which sets an environment variable. The variable should still be set after the script executes. The variable is a token of sorts and is ...
George's user avatar
  • 181
2 votes
1 answer
396 views

Node wont run from cmd unless the .exe extension is added

So this is a very weird one. Let me start by saying that things used to work fine. I installed Node a few days ago and once complete I opened a command prompt (On Windows 10), I entered node --version ...
Jacques Ramsden's user avatar
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
3 answers
1k views

How to run apps from Windows' command line like in Linux

Context: I use Fedora GNU/Linux as my main OS, but sometimes I need to work within Windows. Over the years, using Linux distros, I have become used to working mainly through the command line, calling ...
Noumeno's user avatar
  • 106
1 vote
1 answer
130 views

Why the path(enviroment variable) is different between show in the cmd and the system property?(Windows10)

Before the question show, i use cmd order path = %path%D:\test to add a root in PATH(eniroment variable).When i use cmd order echo %path% , it shows: D:\VMware Workstation Pro\bin\;C:\Program Files\...
Danhui Xu's user avatar
0 votes
1 answer
975 views

Run script on windows startup with environment variable

Windows should run a script on startup that starts a DB based on an environment variable %SAPSYSTEMNAME%: net start SYBSQL_%SAPSYSTEMNAME% When i run this command in my cmd it works fine, however on ...
Core_Dev's user avatar
0 votes
2 answers
654 views

Erased System Path Variables

I was writing a batch file that was supposed to automatically set up a computer to receive "psexec" remote commads. Unluckly i didn't really pay attention to what i was writing and i wrote ...
Xcode's user avatar
  • 1
1 vote
0 answers
17 views

What does the start command actually do? [duplicate]

Suppose I want to launch a program from the cmd (or windows powershell). If i simply type the name of the executable of course nothing starts, as my shell does not know where to find the .exe that I ...
Noumeno's user avatar
  • 106
0 votes
2 answers
5k views

How to call programs from cmd directly without adding their paths to PATH variable on windows?

Suppose I installed a new package with someProgram in it: myNewPackageDir/bin/someProgram If I want to accessing it from cmd using only its name (example: someProgram --option1 a --option2 b --option3 ...
hidden_machine's user avatar
0 votes
1 answer
466 views

How using SET command with a call to CMD.EXE? [duplicate]

I have to create system variable in Windows through calling CMD.Exe. I try : cmd.exe /C maVar=maVal Saddly, no maVar is created. If i open CMD.Exe and type : maVar=maVal -> maVar is created. ...
Walter Fabio Simoni'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
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
0 votes
1 answer
222 views

how to find out what shortcut is used for a application by start command in cmd windows? [duplicate]

How does application (any) make its shortcut for launch in installation? For example c:\>start calc will launch windows calculator, but I have no idea where is located the executable calc.exe and ...
Herdsman's user avatar
  • 371
0 votes
1 answer
1k views

How can I run a batch file in an isolated environment? [closed]

Changes to the environment made by a batch file persist in the calling cmd.exe's environment. Assume set.bat: SET MYVAR=42 Then in cmd.exe, I type and see: C:\Users\Me>.\set.bat C:\Users\Me>...
Zyl's user avatar
  • 105
0 votes
1 answer
281 views

Why clearing PATH in windows CMD prompt makes it close immediatly?

Consider these 2 versions of a cmd script. First Version (overrides PATH) set PATH=%USERPROFILE%.cargo\bin;%USERPROFILE%.rustup; %~d1 cd "%~p1" call cmd Second Version (add some path to ...
CoffeDeveloper's user avatar
1 vote
1 answer
176 views

%PROMPT% variable resolved differently if set directly in CMD or by Windows variables tool

When trying to customize my command prompt I faced a strange behaviour: from the CMD the line SET set prompt=$D $T$H$H$H$_%USERNAME%@%COMPUTERNAME%$_$P$G works as expected: 28/05/2020 12:02:15 DDS@...
DDS's user avatar
  • 741
1 vote
1 answer
2k views

Windows: How to save a variable -(input: path) to text file

I'm trying to save a variable to text file, but i'm failing: :folder echo. && echo Where is your folder ? set /p userinputpath = Type input[Drive][Path]: echo "%userinputpath%" >> ...
Georg's user avatar
  • 23
1 vote
1 answer
1k views

Windows 10 command prompt is not recognizing any basic commands

I have read forums, but have not found anything useful about what to do, with someone suggesting it might be with my PATH variable, but I don't know how to fix that. Output of ipconfig: Output of ...
Philippe Fatouros'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
27 views

impossible to open .bat files by double clicking: can't find file [duplicate]

My problem is that when i double click a .bat file it doesn't get opened by cmd and i get this error message: "Windows cannot find 'C:\users\ (my name)\Desktop\test.bat'. Make sure you typed the ...
wattbatt's user avatar
  • 121
2 votes
1 answer
433 views

How Does py Launch Python3 on Windows Command Prompt

Im trying to understand how python get's launched from the command prompt with the "py" syntax. From my understanding, an environment variable is created, allowing python.exe to be executed from the ...
Jack's user avatar
  • 21
0 votes
1 answer
402 views

WMIC Output Result Without Property Name

I'm entering this line: wmic /OUTPUT:D:\DriverVersion.txt path win32_VideoController get driverversion The txt file has two lines in it: VariableValue XX.XXX.XXX.XX.X But I don't want ...
SammyJ's user avatar
  • 3
1 vote
1 answer
5k views

How to add to SYSTEM "PATH" environment variable in windows 10 via cmd, not to user's one?

By using setx "%path%;c:\whateverFolder I just copy system path variable to users one, therefore duplicating it, and only after it the required folder is added. Is it possible to add it to SYSTEM path ...
ymdred16's user avatar
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
3 votes
2 answers
11k views

youtube-dl 'youtube-dl' is not recognized as an internal or external command, operable program or batch file

I have already added the path to environment path variable. But when I tried to execute it through cmd . I am getting the error 'youtube-dl' is not recognized as an internal or external command, ...
Aman's user avatar
  • 169
2 votes
1 answer
8k views

Windows CMD reset PATH variable to default

I have a question that someone surely must have come across, but maybe I'm not using the right search terms. I wish to reset the PATH variable in a command prompt to the default. So, for example, I ...
namezero's user avatar
  • 123
0 votes
0 answers
38 views

Setting an Environment Value in a FOR Loop [duplicate]

I wrote this code: set list1=This,Is,A,List set list2= FOR %%c IN (%list1%) DO set list2=%list2%-%%c I expected list2 to equal -This-Is-A-List, instead it equals -List. I have verified that it is ...
Patrick O'Hara's user avatar

15 30 50 per page