LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Why are ExtendedMouseEvents disabled when under Win7 (64bit) when running program "as administrator"?

Environment: Windows 7 64-bit, CVI version 10.0.1. Behavior is same whether executable or CVI is chosen to "run as admin".

 

EVENT_FILESDROPPED no longer generates an event when running <right-click>"Run as administrator", is this an expected /known behavior?

 

Note: Same code runs - as expected - when run with normal privileges.

0 Kudos
Message 1 of 4
(3,202 Views)

Hello blakney,

The extended mouse events enabled by EnableExtendedMouseEvents include:
EVENT_MOUSE_MOVE

EVENT_LEFT_MOUSE_UP

EVENT_RIGHT_MOUSE_UP

The EVENT_FILESDROPPED event is enabled by the EnableDragAndDrop function.

 

I'm not sure of the correlation between ExtendedMouseEvents and Event_FilesDropped that you are referring to. Could you clarify that?

 

As for the behavior you are seeing, it would seem that "run as admin" would always work over normal privileges.

Jacob R. | Applications Engineer | National Instruments

0 Kudos
Message 2 of 4
(3,197 Views)

Either I was confused about that or maybe that was a legacy event that has forked? I will try this and check to make sure drag and drop is enabled.

0 Kudos
Message 3 of 4
(3,195 Views)

My bad getting too old I guess,  I was confused about nature of the call. Regardless, when you "Run As Administrator" - EVENT_FILESDROPPED gets swallowed (possibly by the UAC). This action is the same under debug, release, debug64, or release64 under win7.  If the completed executable is "Run as Admin", identical results.

 

Test project attached. Just compile and drop file(s). The filename(s) should show up in the listbox.

 

 When CVI run under normal privileges, the drag and drop is as expected. If you load CVI with "Run as Admin", the files are all good (cursor adds to the check mark) until you drop and then nothing.

 

I guess we can chalk it up to UAC interference but I thought everybody might like to know.

Message 4 of 4
(3,188 Views)