LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

drag and drop not working 2012 and Win 7

Solved!
Go to solution

try running windows explorer with admin priveledges too


"Should be" isn't "Is" -Jay
0 Kudos
Message 31 of 42
(1,897 Views)

Ok, running LV as admin also prevents my machine from dragging and dropping files into path constants.

It doesn't work regardless if File Explorer is also executed "as admin". But it was a good idea, Jeff.....

 

Why does writing Excel files require admin privileges for you, Paul?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 32 of 42
(1,891 Views)

@Norbert_B wrote:

 

Why does writing Excel files require admin privileges for you, Paul?

 

Norbert


Is there an easy way? I have dozens of Excel file templates, ini and config text files. When I try to modify any of them not running as admin I get a persmisson error. I tried to change permissions for each folder but it didn't work. A lot simpler just to run as admin.

 

 

PaulG.

LabVIEW versions 5.0 - 2023

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 33 of 42
(1,880 Views)

Drag and drop does not work in LV2011 running as admin, either. This is a bug.

PaulG.

LabVIEW versions 5.0 - 2023

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 34 of 42
(1,876 Views)

Work around:

Make an exe with Excel write part of the program.

Launch this exe as admin in your program when needed.

 

George Zou
0 Kudos
Message 35 of 42
(1,860 Views)

@PaulG. wrote:

Drag and drop does not work in LV2011 running as admin, either. This is a bug.


No, it is not a bug. It is just the way user permissions and "run as admin" works defined by Microsoft. Maybe you want to tell them that this is a bug 😉

Seriously, there is nothing NI can do about that as the two applications are running at a different set of permission. This discussion is very interesting as somene writes in there that the Windows File Explorer cannot be elevated in permissions on Win7, so even "run as admin" for the File Explorer still prohibits drag'n'drop to other "run as admin" applications....

 

Nevertheless, you should contact your IT department and ask them why you do not have permission to change existing Excel files without admin rights. This sounds as if they have been created as admin and keep that information somewhere.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 36 of 42
(1,853 Views)
Solution
Accepted by topic author PaulG.

Maybe it's not a "bug" but this behavior is counter-intuitive and "buggy". I would expect the opposite behavior: drag and drop would work under admin but not under user. 

 

Everything I *need* to do I can get done running LV as administrator. Drilling to create a file path is a hassle but I can live with that.

 

Snippets are going to be a pain.

PaulG.

LabVIEW versions 5.0 - 2023

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 37 of 42
(1,842 Views)

It appears the drag/drop behavior is a UAC behavior intended by Microsoft - http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/72f35f33-2df0-47e8-a16d-006f1190d81e/dr...

George M
National Instruments
0 Kudos
Message 38 of 42
(1,837 Views)

@gmart wrote:

It appears the drag/drop behavior is a UAC behavior intended by Microsoft - http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/72f35f33-2df0-47e8-a16d-006f1190d81e/dr...


The thread contains a post that provides a link to a function called ChangeWindowMessageFilter. This function suggests that the programmer use ChangeWindowMessageFilterEx to limit the scope.

 

Is there any reason that LabVIEW can't be updated to call ChangeWindowMessageFilterEx in the Windows version of the dev environment in order to allow  drag/drop to the window of a vi?

Message 39 of 42
(1,833 Views)

It appears that drag and drop works just fine from the project environment while running as administrator. This helps a lot.

PaulG.

LabVIEW versions 5.0 - 2023

“All programmers are optimists”
― Frederick P. Brooks Jr.
Message 40 of 42
(1,805 Views)