Jump to content

Password Protect VIs using VI server


Recommended Posts

No I've never done it but you should be able to iterate through your VIs using the LockState.Set Invoke Node. There is also a setting for applying a password to source in Source Distribution build spec.

 

 

Okay just created and example which will set a password on all VIs in a directory recursively - BE CAREFUL what you point it at :)

Batch Password Example.vi

Edited by Dan DeFriese
Link to post
Share on other sites
:D

 

Just out of curiousity... What's the use case for applying password protection on the VIs? I've never really thought about this before.

 

~Dan

To hide embarrassing spaghetti code :)

Link to post
Share on other sites
:D

 

Just out of curiousity... What's the use case for applying password protection on the VIs? I've never really thought about this before.

 

~Dan

Or to prevent accidental changes to VIs in the vi.lib.  Of course changing the file to be read-only maybe an easier alternative for this.

Link to post
Share on other sites
... changing the file to be read-only maybe an easier alternative for this...

If you have the "treat read-only VIs as locked". Otherwise, dirty dots can happen.

 

Distributing code that is "locked - no password" works no matter what LV settings someone else has.

Link to post
Share on other sites
If you have the "treat read-only VIs as locked". Otherwise, dirty dots can happen.

So if the file is read-only it can still be edited, (so a dirty dot) but you can't save it so any changes will not be kept, which in my mind is the real reason to set the file to read only.  Sure I could edit a VI that is read-only, keep it in memory and then the changes will be implemented, but as soon as I close LabVIEW (and changes are discarded) the VI will revert back to the original file.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.