LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create feature options in a distributed exe

Solved!
Go to solution
Highlighted

I would like to build two different versions of a distributed executable. (LabVIEW 2018, application builder, Windows 10).

 

One version (for selected users only) should be able to do everything.

Another version (for other users) has a restricted feature set but is about 98% of the full application.

It should not be possible for a user of the restricted version to gain access to the full features (so no configuration file or run-time settings or secret keypresses) - I expect there to be two distinct but similar compiled executables.

 

I would like to maintain only one set of code and not have to edit the source to change between builds. I thought of doing this with two different build specifications but I am not sure how to get the build option into the compiled code.

 

Is there a standard way to do this? Maybe include full.vi in one build and restricted.vi in the other? What is the best way to build in a compiled option?

 

Thanks.

0 Kudos
Message 1 of 20
(693 Views)
Highlighted

You could create an entry in the registry. If the entry is encrypted the user will not be able to easily change it. You could create a separate utility which would set this entry. Another alternative is to have the user login to the application and based on the user name entered you would grant the appropriate level of access.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 20
(688 Views)
Highlighted

Hi bean,

 

what about using conditional disable structures with project variables?

This way you can easily create two versions of your executable…

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2019 sometimes) on Win10+cRIO
0 Kudos
Message 3 of 20
(687 Views)
Highlighted

Thanks Mark. My client uses the applications for various trained staff in different countries so I don't have (r want access to their machines). Each user does their own installation of our application so the option needs to be built in to the application that gets installed - I neglected to mention that.

 

Also, I have no idea who the users will actually be and their laptops often can't be networked in their working environments so I don't think logging in to the application would work either.

 

Much as I would rather have one distributed executable I think that to start with this won't be an option.

0 Kudos
Message 4 of 20
(678 Views)
Highlighted

I too suggest the conditional disable diagram structure.  You can have two projects use the same source, and each project set a different flag when changes the software's behavior, and load different UIs if you want.

Message 5 of 20
(672 Views)
Highlighted

Thanks GerdW,

 

A conditional disable structure does what I need but I need to be able to have a symbol definition set in the build spec. That's the bit I haven't yet found. Is there a way to do that?

0 Kudos
Message 6 of 20
(671 Views)
Highlighted

The conditional disable is fine - but how do I have different conditional disable symbols based on the build spec. As far as i can see they are common throughout a project and not able to be different in alternative build specs?

0 Kudos
Message 7 of 20
(666 Views)
Highlighted

Just change the conditional disable value between builds.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 20
(661 Views)
Highlighted

See Hoovahh's reply. Create two projects. Each project will have the appropriate flag set. Both projects include the same source code. However, your users can get access to the full application simply by installing both versions. If the access control is critical then I think you will need some type user authentication method.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 9 of 20
(661 Views)
Highlighted

Yes, there is a way. Here is an example taken from one of my projects.

AFAIK it's an undocumented feature (at least it was when I started to use the Set Tag method).

However, it works.

 

Set conditional compilation symbols.png

 

Paolo
-------------------
LV 7.1, 2011, 2017, 2019
Message 10 of 20
(656 Views)