Jon Kokott Posted May 2, 2013 Report Share Posted May 2, 2013 I need to automate password protecting a large amount of VIs. I can't seem to find a way to do this easily, anyone know how? ~Jon Quote Link to comment
Dan DeFriese Posted May 2, 2013 Report Share Posted May 2, 2013 (edited) 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 May 2, 2013 by Dan DeFriese Quote Link to comment
Jon Kokott Posted May 2, 2013 Author Report Share Posted May 2, 2013 AHH VI.lib just got password protected!!!! just kidding. thanks. 1 Quote Link to comment
Dan DeFriese Posted May 3, 2013 Report Share Posted May 3, 2013 AHH VI.lib just got password protected!!!! 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 Quote Link to comment
ShaunR Posted May 3, 2013 Report Share Posted May 3, 2013 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 Quote Link to comment
hooovahh Posted May 3, 2013 Report Share Posted May 3, 2013 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. Quote Link to comment
todd Posted May 3, 2013 Report Share Posted May 3, 2013 ... 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. Quote Link to comment
hooovahh Posted May 4, 2013 Report Share Posted May 4, 2013 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. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.