Re: WinSCP launched by script running as admin, but should not run as admin: "RunAsInvoker" not working?
I do not see anything wrong about what you are doing.
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
explorer WinSCP.exe
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
"c:\path\to\app.exe"="RunAsInvoker"
RunAsInvoker
. This overrides the compatibility setting.
RunAsInvoker
does what you want.
runas /user:StandardUsername "WinSCP.exe"
explorer
process:
explorer WinSCP.exe
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
"D:\software\WinSCP-Portable\WinSCP.exe"="RunAsInvoker"