11-29-2017 07:59 AM
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
Solved! Go to Solution.
11-29-2017 09:32 AM
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.
11-29-2017 11:33 AM
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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
11-30-2017 05:33 AM
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
11-30-2017 03:54 PM
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.