LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to create registry key with Admin rights

Hi All,
 
I have created a simple program with the intention of counting the number of times the program itself runs.  This is done by creating a registry key and incrementing a value each time 'OK' or 'STOP' is pressed.  When the total number of button presses exceeds a value (5 at present) a message is flashed on screen and the registry value is reset.  I can only get this to work if I create the registry key manually.  This is a bit of a pain, and not everyone is comfortable editing the registry in this way in case they make a mistake.  I thought Labview could create registry keys automatically, as long as the user has admin rights - is this possible?
 
Ideally I would like to create an installer to create the registry key, but I don't believe this is possible with Labview v7.1.  Creating C code is unfortunately beyond my abilities.
 
Any help muchly appreciated!Smiley Happy
 
Dan
 
 
0 Kudos
Message 1 of 6
(4,544 Views)
Hi Dan,

LV can create registry keys, also without admin rights - atleast in the CurrentUser-tree...
I never had problems (using Create Registry Key, Write Key, Close Key) with LV7.1 and LV8.5, Win2k and WinXP.
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(4,539 Views)

Hi Dan,

i think the problem in your vi is, that you connect the error line with activ error in it, to the create registry vi. I think you should first check whether the value exist and if not create it with connect error constant without activ error.

Mike



Message Edited by MikeS81 on 01-29-2008 07:03 AM
0 Kudos
Message 3 of 6
(4,531 Views)

Hi Dan,

i create an example for you. Pleae see the attached vi or picture.

Mike

Download All
0 Kudos
Message 4 of 6
(4,523 Views)

Thanks Mike. 

I can't open the vi as it was created with v8.5.  I don't suppose you could save it as v7.1?

Otherwise I will try to decipher the picture - I haven't looked at it for long yet.

Thanks again for your help.

Dan

0 Kudos
Message 5 of 6
(4,518 Views)

Mike,

I have got it to work now using your diagram - Thanks!

Dan

0 Kudos
Message 6 of 6
(4,503 Views)