With winscp.portable (and likely winscp.installer too), the file WinSCP.com should get a shim.
WinSCP.exe gets a shim during installation, but WinSCP.com doesn't.
WinSCP.com is the console-only version which can be used in automated scripts, etc. It's possible to use WinSCP.exe /console for some situations, but exit codes don't work the same way.
@majkinetor do you want me to close this one and open #1134, or leave this one open?
All is fine.
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
AFAIK, still relevant.
@burfo
Would copying WinSCP.com to the location of the shimmed WinSCP.exe accomplish what is requested?
The questions are more about:
programdata/chocolatey/WinSCP.com work for you?@RedBaron2 I would expect (and prefer) for WinSCP.com to be in the PATH, yes. This executable is used in scripts and such; it would not be ideal to embed the executable's path into the scripts. If it's in PATH, then I don't have any preference on where it's actually stored but being next to WinSCP.exe would seem appropriate to me.
@burfo
I'll work on a test package for you by the end of the week fingers crossed . You can give me feedback if it works for you.
I'll edit this with the package URL later
@RedBaron2 be mindful that adding files manually to the bin directory is not allowed on chocolatey.org.
The same goes for any directory underneath %ChocolateyInstall% other than the package directory itself.
The best bet would actually be to change the installation location to use Get-ToolsLocation and add that to the PATH environment variable instead of relying on shims.
NOTE: This will require a call to refreshenv by the user for them to use the program immediately after installation without restarting the shell
I suggest simply adding shim to it.
@majkinetor I don't think that would work in this case, I believe it may be incompatible with the already shimmed WinSCP.exe file.
But by all means, if it do work then indeed that would be the best.
FYI: the normal install of the WinSCP Setup file _Does Not_ add either WinSCP.exe or WinSCP.com to the _Path_
This is only done when installing WinSCP.Install through Chocolatey
AdmiringWorm had quoted in issue #1134
I'm guessing that if we were to shim the winscp.com utility, it would ... be shimmed as
winscp.com.exe
This appears to be the easiest solution to the problem.
WinSCP.Install package un/install script filesWinSCP.com _It will be uninstalled_ through chocolatey {Tested Works}bin directory is not allowed on chocolatey.org.The negatives are
WinSCP.Portable is installed.@burfo
If you are concerned about the .exe extension now added to the file. This appears to be a side effect of the Un/Install-BinFile helper function 馃槥