Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

martin

Re: WinSCP launched by script running as admin, but should not run as admin: "RunAsInvoker" not working?

I do not think that RunAsInvoker does what you want.
What it does is that when the app is marked to request Administrator privileges on start, it does not grant them.
But it does not relinquish Administrator privileges if the calling process already has them.
And WinSCP is not marked to request Administrator privileges anyway.

This is not really a WinSCP question, but possible solutions are (in general):

  • If the intended account does not have administrator privileges, explicitly run WinSCP with that account:
    runas /user:StandardUsername "WinSCP.exe"

  • Run WinSCP via ad hoc temporary task scheduler task without Administrator privileges.
  • Run WinSCP via explorer process:
    explorer WinSCP.exe

Ccyz7

WinSCP launched by script running as admin, but should not run as admin: "RunAsInvoker" not working?

Hi,
I have a setup in which WinSCP is launched by a script running as admin (I have no other option for out-of-topic reasons).

However, I do NOT want WinSCP to run as admin (because if so, I can't drag and drop files from Windows Explorer, and I miss this).

The common solution for this is to do a registry key:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

D:\software\WinSCP-Portable\WinSCP.exe = RunAsInvoker

But this seems ignored and I still can't drag and drop files from files Explorer windows.

How to solve this?

Thank you in advance! :)