1

I have a QT app that I download and launch on Windows. If I launch it manually from Windows Explorer, I can use drag&drop to load files. If I launch the very same app via a python script from windows powershell, invoking it with subprocess.run(path_to_app_executable), drag&drop does not work.

Is it because of using a subprocess? On mac I use subprocess.run() with the open command and there drag&drop works fine.

2
  • Are you running from a normal or elevated PowerShell window? Commented May 6, 2019 at 16:06
  • Administrator PowerShell
    – tuexss
    Commented May 6, 2019 at 16:08

1 Answer 1

1

Windows systems with UAC have a concept of "integrity levels". Elevated processes (when you use "Run as Administrator") are marked with 'High' integrity level, while normal processes (including your desktop & file manager) run under the 'Medium' level.

Lower-level processes cannot send data directly to higher-level processes; in other words, they cannot do anything to corrupt those processes – this is a mitigation of the Shatter attack.

But among other things, this also means that they cannot send "window messages" upon which things like drag-and-drop are built.

1
  • Ok, so this means, I can only DnD Admin->Admin and User->User, right? Or would Admin->User also work?
    – tuexss
    Commented May 6, 2019 at 16:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .