Windows PATH and Run command

0

I have a folder called C:\bin\ that I like to keep a lot of scripts and bat files in. One of those files is cmder.bat, which just opens cmder.exe in it's installation folder:

@echo off
start C:\Users\<Username>\cmder\cmder.lnk

C:\bin is the second item in my PATH variable.

I like to start cmder by hitting winkey + R and typing in cmder, and until recently it would open cmder for me. For whatever reason, typing cmder into the Run dialog now opens cmder's installation folder under C:\Users\<Username>\cmder in Windows Explorer.

Also, if I type cmder from cmd or powershell, it opens the program correctly and not the folder. It's only the Run dialog that opens the folder.

I have other programs that I like to start this way, and those still work without opening any folders or anything. I have even duplicated the setup on another Win 10 machine, and cmder in Run works as intended.

Does anyone know what changed or where I can look to get this back to the way it was?

neilsimp1

Posted 2017-09-30T01:13:38.457

Reputation: 113

Check to see if the executable is still in c:\bin or not and update your post whether it is or not. Other programs in c:\bin still working from command line indicates something changed about the cmder application. Perhaps the PATH has changed. Open up a command shell window and type the command set to get a list of your environment variables. Check the environment variable Path. The way Path finding works is that the paths in the semicolon delimited list are checked one by one until the application is found and the search stops. A Path order change might be the problem. – Richard Chambers – 2017-09-30T01:34:23.150

The bat file is still in C:\bin, and the PATH is correct. See above for another update. – neilsimp1 – 2017-09-30T02:02:46.373

Be sure the cmder.exe installation path is in the PATH env variable.Do from command prompt ECHO %PATH% and paste back the result output. – Pimp Juice IT – 2017-09-30T03:47:12.887

Add to your posting the contents of the cmder.bat file so that we can see what it is doing. The behavior sounds like there is a command to open the folder containing the target like doing a right click to open a shortcut link then doing a find target. Were there any changes to the cmder.bat file? – Richard Chambers – 2017-09-30T05:13:30.513

@Facebook it is the bat file in the bin folder, not the exe. This was working fine for the longest time. @RichardChambers Contents of cmder.bat added. – neilsimp1 – 2017-09-30T22:44:33.137

The run applet maintains an history of launched items, maybe you opened that folder from the run applet by mistake and now is the history taking precedence over the bat file, check if the folder appears in the dropdown menu before typing anything. – Alberto Martinez – 2017-10-02T23:29:49.347

@AlbertoMartinez Yes, you're right, that one appears in the Run Dialog history. However, if I go to regedit > \HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU, I don't see this one listed. Does Run search your home folder by default? – neilsimp1 – 2017-10-06T21:45:36.390

I don't know where entries are stored but if you want to delete that entry just select it in the list and press Delete (note this is only before you type anything, if you start typing the run dialog can autocomplete searching matching files). – Alberto Martinez – 2017-10-06T21:47:47.550

Delete in the Run box isn't doing anything for me, sorry. – neilsimp1 – 2017-11-16T00:31:02.407

No answers