LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I avoid the need for Administrator rights for open registry key.vi

Dear wire workers.
 
I would like to do an EXCEL export.
Therefore I like to check if EXCEL is installed or not.
I use 'open registry key.vi' and read out the Excel\InstallRoot.
If there is an installed EXCEL than I export the data using ActiveX.
Everything works like a charm with LV 8.5.
The problem I have is that 'open registry key.vi' useses RegOpenKeyExA from the Advapi32.dll.

RegOpenKeyEx does, in fact, create a non-existing key and returns 0 (ERROR_SUCCESS?).
LONG lRegResult = RegOpenKeyEx(HKEY_CLASSES_ROOT, m_RegSubKey, 0, KEY_QUERY_VALUE + KEY_WRITE, &hkRegistry);
Successfully opens or creates m_RegSubKey under HKEY_CLASSES_ROOT.

Is there a way aroun this call?
In fact you need administrator rights to do this call because of the try to write a non exsisting key.
In my case this avoids the EXCEL export and any kind of registry access from LabVIEW without administrator rights.

🙂 Who the hell has done this 😉

All ideas are welcome

With kind regards

Martin Kunze

KDI Digital Instrumentation.com
e-mail: martin.kunze@digital-instrumentation.com
Tel: +49 (0)441 9490852
0 Kudos
Message 1 of 2
(2,910 Views)
Hi Martin

Did you try to wire a "KEY_READ" constant to the security access mask input of the open registry key VI? I had a similar problem, if you just need to read a key or check if it's present use read access only, that should work.

Hope this helps,
Daniel

Message 2 of 2
(2,904 Views)