Topic "ExeSessionProcess.GetExecutablePath() doesn't search in 'Program Files (x86)' directory"

Author Message
tattdogg
[View user's profile]

Joined: 2016-04-22
Posts: 2
Location: Minsk, Belarus
Hi

ExeSessionProcess.GetExecutablePath() doesn't search in 'Program Files (x86)' directory

Possible fix: https://github.com/mirror/winscp/pull/1/commits/0996f04cda7ca0d90febce16e0f3da986709d820

Also you can add search in %PATH% variable:
Code:
Environment.GetEnvironmentVariable("PATH")?.Split(';').SingleOrDefault(x => x.EndsWith("\\WinSCP\\"));


Thanks,
tattdogg
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Thanks for spotting this.

The ProgramFilesX86 requires .NET 4, so I cannot use it.
Also what primarily needs fixing, is the GetInstallationPath implementation.

Anyway, both are fixed:
https://winscp.net/tracker/show_bug.cgi?id=1421

Though note that you generally should not rely on WinSCP.exe in "Program Files". You should distribute the executable with your .NET application.
https://winscp.net/eng/docs/library_install

The lookup in "Program Files" is really only the last resort fallback.
tattdogg
[View user's profile]

Joined: 2016-04-22
Posts: 2
Location: Minsk, Belarus
Thank you
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License