Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

tattdogg

Thank you
martin

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

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/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

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

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:
Environment.GetEnvironmentVariable("PATH")?.Split(';').SingleOrDefault(x => x.EndsWith("\\WinSCP\\"));


Thanks,
tattdogg