0

I've looked through all kinds of threads, but I can't find any appropriate solutions to the following issue:

(Windows 10 Pro, en-US)

I have WinSCP installed. Within its application directory are these two relevant files: WinSCP.com WinSCP.exe

I added the application directory to the Windows' environmental Path, however whenever I run "winscp" it is the com file that is launched and not the exe. The exe is never launched. I can only assume Windows picks the first hit, sorted alphabetically...

What would be the fix for this? I would like to run the exe and not the MS-DOS file (not ever). In fact if I could filter away file types so things like ".com" files are never launched from the run prompt, that would also solve this issue.

Chad
  • 1
  • 2
  • @MartinPrikryl Thank you so much! This solved the issue I had. – Chad Jun 18 '20 at 13:49
  • Does this answer your question? [Order in which command prompt executes files with the same name (a.bat vs a.cmd vs a.exe)](https://stackoverflow.com/questions/605101/order-in-which-command-prompt-executes-files-with-the-same-name-a-bat-vs-a-cmd) – Martin Prikryl Jun 18 '20 at 13:52

1 Answers1

0

You can use the App Paths registry key: create a subkey WinSCP.exe, in the Default value, put the full path of your WinSCP.exe

Here's a sample reg file:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Winscp.exe]
@="C:\\Program Files (x86)\\WinSCP\\WinSCP.exe"
Christophe
  • 444
  • 3
  • 5