LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Open System Exec as Admin

Solved!
Go to solution

Hi all,

 

This post is similar to the question here wherein I need to call an application with administrator rights & get the UAC dialog, but the example as in message 5 is actually crashing LabVIEW. When I first opened the VI it was searching for the dll though it is actually present, but after relinking the VI became runnable. Need your suggestions on what is wrong with that VI.

 

P.S.: Since the older post is a solved post it may not receive new viewers and hence the new post.

 

Thanks,

Priyadarsini S

0 Kudos
Message 1 of 5
(5,143 Views)

This just works for me fine: https://forums.ni.com/t5/LabVIEW/How-to-Run-System-Exec-Batch-File-as-an-Admin/m-p/3327934/highlight...

 

I have LV 2017 32bit, and Windows 7 x64.

Message 2 of 5
(5,122 Views)

Very neat, in the past I've used elevate.exe which I think I got from here.  But I'll look into the DLL since that is likely cleaner.  Also if you like this idea then you should go vote for it here.

0 Kudos
Message 3 of 5
(5,111 Views)
Solution
Accepted by topic author Priyadarsini

Thank you for your suggestions. But the dll is still not working for me. In the meantime found another easiest solution using Powershell. The command will be similar to 

"powershell.exe Start-Process -FilePath '<application full path>' -Verb runAs"

 

And, I have upvoted your idea, Hooovahh!

 

Thanks,

Priyadarsini S

 

0 Kudos
Message 4 of 5
(5,086 Views)

You can always set UAC to "Never Notify", then believe it or not all commands entered in cmd shell windows will be ran as Administrator, including commands ran by the systemexec.vi. 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 5
(5,065 Views)