LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Distribution Program Fails for non-Admin Users

Solved!
Go to solution
I wrote a program and then create a distribution file for it.  I'm installing it onto a WindowsXP computer where only the admin can install the program.  When I then try to run the program, even as a Super User, it pops up a string of registry errors (Code=10052 Registry Access Error) for a bunch of things it clearly installed when I created the distribution file.  However, I didn't do anything in the registry tab of the "Edit Installer" box.  How can I correct this so that other users will be able to use this application that is installed by an admin (without making others the admin)?  Is there a way to changes the permissions that are set by the installer?
0 Kudos
Message 1 of 10
(4,297 Views)

Hi eaa,

 

We will need a bit more information from you to diagnose what is going on.  First,  can you give us a bit of background on what your application does so we know which direction to look in?  Secondly, can you tell us what things you see errors for that were installed by your program (e.g. the CVI runtime engine, custom files, etc).  Screenshots of these errors would be helpful as well.  Also, what version of CVI are you working with?

 

Lastly, I would like you to try building a sample program that ships with CVI to see if you reproduce the problem.  Please let us know how this goes.

Cheers,
Kelly R.
Applications Engineer
National Instruments
Message 2 of 10
(4,258 Views)

The application essentially controls experimental hardware, mainly from Thorlabs.  In particular, it controls the APT hardware.  There is an added .msm module that I include in the distribution "Drivers & Components" tab.  I'm using CVI 8.5 right now.  Below is a (very small) portion of the log of the errors I got.  They are all Thorlabs errors, but the reason I think it has something to do with CVI is the following.  If I install the program as an admin (which is required on our system), and then run it as an admin, everything works fine.  However, if I install it as an admin, and then run it as another user, these errors all pop up.  I'm assuming it's just because there is some "permission" issue somewhere during the install, but I'm not sure how to set CVI up to avoid that.

 

(Note:  The registry errors below are the real problem.  A few other errors showed up but those are because I pulled this log from a computer without any hardware attached).

 

Thanks for the help!

 

*****************************************************************************

Event Log generated 12:44:56  Tuesday, February 23, 2010
Thorlabs APT Logging Server (Built: May 29 2009 11:17:38).
Server Version:- 1:0:0:27.


12:40:25:0718> Error [Code = 10052]:-
    [MG17Comms.DLL] Internal; Internal Code = 10493107.
    Description: Registry Access Error
    Notes: An error has occurred accessing the system Registry.
    Extra Info: RegCreateKeyEx failed.
12:42:03:0562> Error [Code = 10052]:-
    Internal; Internal Code = 15192301.
    Description: Registry Access Error
    Notes: An error has occurred accessing the system Registry.
    Extra Info: No extra information.
12:42:10:0234> Error [Code = 10052]:-
    [MG17Motor.OCX] Internal; Internal Code = 15282301.
    Description: Registry Access Error
    Notes: An error has occurred accessing the system Registry.
    Extra Info: No extra information.
12:42:10:0750> Error [Code = 10052]:-
    [MG17Comms.DLL] Internal; Internal Code = 10493107.
    Description: Registry Access Error
    Notes: An error has occurred accessing the system Registry.
    Extra Info: RegCreateKeyEx failed.
12:42:11:0296> Error [Code = 10052]:-
    Internal; Internal Code = 17350412.
    Description: Registry Access Error
    Notes: An error has occurred accessing the system Registry.
    Extra Info: No extra information.
12:42:11:0906> Error [Code = 10052]:-
    [MG17Motor.OCX] Internal; Internal Code = 17390412.
    Description: Registry Access Error
    Notes: An error has occurred accessing the system Registry.
    Extra Info: No extra information.

0 Kudos
Message 3 of 10
(4,235 Views)

It appears that when you run your application, it is generating errors when trying to access the registry. In some cases, we specifically know RegCreateKeyEx is failing. You say the application runs fine when run by an Administrator, but not when run by a regular user. This suggests the application may be trying to write to parts of the registry whose permissions prevent regular users from modifying them. If so, the errors have nothing to do with the installation, but rather the application itself. I would try to get confirmation from the author of the  if the application that it truly needs to write to the registry, or if there's a way to make it work for regular users as well.

 

Mert A.

National Instruments

Message 4 of 10
(4,224 Views)
Solution
Accepted by eaa
This looks like a PC which is locked down. The merge module should set the permissions in the registry for everyone, however if there is a heavier than normal lock down we’re stuck. The only thing the you can do is manually unlock the local system part of the registry for software\apt and this should solve it. You may need to speak to one of your IT guys for help.
Message 5 of 10
(4,193 Views)
Thanks!  I will check with the IT folks and see if they can fix this.
0 Kudos
Message 6 of 10
(4,177 Views)

Was this ever resolved? I'm having the same or similar issue with the Thorlabs software...

I've written a LabVIEW application on a WinXP machine and it opens and works fine.

I copied the application to another machine which is running Win7. When I start the application on the Win7 machine I get the error code = 10052, [MG17...], Registry Access Error, as described in this thread. Both machines are set to Administrator. I've wondered if this is a WinXP vs. Win7 thing. Thanks!

0 Kudos
Message 7 of 10
(3,503 Views)

Hi gary-104

 

In addition to be logged in as an administrator, for the Win7 machine, you may need to right click and “Run as administrator.” Another option to try would be to right click-> Properties-> Compatibility tab-> Privilege Level-> “Run this program as an administrator.” I have seen instances when this explicit declaration of administrator privileges is necessary.

 

Regards,

 

Michael Miracle

NI Americas | AE

Message 8 of 10
(3,492 Views)

Hi MichaelAE -

 

Your suggestion worked!

I simply right clicked on the LabVIEW program desktop icon and selected "Run as adminstrator" as you suggested. I was able to open my LabVIEW VI and no errors were encountered. For another test, I started with a blank VI and added an ActiveX Container and then inserted the ThorLabs ActiveX Object that had been causing the error messages. This approach had also generated the error messages, but now it works fine.

 

I did get a support email from ThorLabs that suggested I check my computer registry to see that a ThorLabs folder existed, and then "grant elevated read/write access for that reg key folder". I did not try this as your suggestion worked.

 

Thanks for your help!

-Gary

0 Kudos
Message 9 of 10
(3,489 Views)

Glad I could help.

 

Regards,

 

Michael Miracle

NI Americas | AE

 

0 Kudos
Message 10 of 10
(3,476 Views)