From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

password protect the block diagram

Hi,
 
I would not only like to password protect my vi when run, but also the block diagram behind, so no-one can change the code. There is an example of this at http://zone.ni.com/devzone/cda/epd/p/id/3988 which contains a couple of vi's in a llb and when you just open the main vi, it immediately ask a password.
 
Great !  Only, I can't see how this is done.  It talks about the tools/options/miscellaneous menu, but I do not have that one (LV 8.2).  I tried the settings in the menu "security" but those are only for when you run a vi.
 
So the question is : how do I pop-up a login screen (or something like that) when a vi is opened for editing.
 
Thanks
 
Jan
0 Kudos
Message 1 of 12
(4,782 Views)
Hi Jan,
this function comes with LabView. click with right mouse key on your vi icon and select option. Go to security and that the option password protect. If you have done this close LabView and try to open this vi for editing. now you see a dialog.
Mike
0 Kudos
Message 2 of 12
(4,779 Views)
File -> VI Properties -> Protection -> Locked
0 Kudos
Message 3 of 12
(4,778 Views)
See the VI properties>Security.

Or read the help. It should be in there as well.

Regards,

Wiebe.


0 Kudos
Message 4 of 12
(4,765 Views)

I used this feature several years ago and I remember that I could close the diagram by selecting something that re-enabled the protection (without restarting LabVIEW), but I don't remember where that selection is. Anybody knows?

0 Kudos
Message 5 of 12
(3,615 Views)

LabVIEW caches passwords (more accurately their hash) used to unlock diagrams. You can either restart LabVIEW or select Tools->Options->Environment->General->Clear Password Cache

Rolf Kalbermatter
My Blog
Message 6 of 12
(3,596 Views)

Note: The password protection is rather weak.  The best thing is to deploy your VIs without the block diagram.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 7 of 12
(3,566 Views)

@paul_cardinale wrote:

Note: The password protection is rather weak.  The best thing is to deploy your VIs without the block diagram.


Well that has the disadvantage that it will only work in the saved LabVIEW version and platform anymore, including bitness. So not an attractive solution for a library.

The password protection being weak is an unavoidable problem though. The diagram can't be truly encrypted as that would mean the same as saving it without diagram at all for anyone not knowing the password: No use on any other platform and LabVIEW version as the one it was last saved with. Not a practical solution either!

But without true encryption there is no way to prevent a determined hacker to circumvent the password protection. It is really a catch 22 situation.

Rolf Kalbermatter
My Blog
0 Kudos
Message 8 of 12
(3,562 Views)

Rolfk is right, but I do wonder how this might change now that the 2017 feature of a forward compatible runtime engine.  I haven't tested this myself, but the idea is code built for one runtime engine can run in another, so hopefully ripping out the block diagram will still mean this code isn't completely useless in other run time versions.

0 Kudos
Message 9 of 12
(3,526 Views)

@Hooovahh wrote:

Rolfk is right, but I do wonder how this might change now that the 2017 feature of a forward compatible runtime engine.  I haven't tested this myself, but the idea is code built for one runtime engine can run in another, so hopefully ripping out the block diagram will still mean this code isn't completely useless in other run time versions.


Rolf is wrong.  It is always possible to archive copies of VI that have their block diagrams while distributing copies that don't have their block diagrams.

Since the default behavior of the app builder is to delete the BDs, the feature would be nearly useless if it wouldn't work on VIs without a BD.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 10 of 12
(3,516 Views)