It is possible to programmatically perform the same operation by having a top-level VI that loads the main program only if a password is passed in correctly.
The easiest method uses the Prompt User for Input Express VI. This Express VI prompts the user for a password and passes out a true or false which can be handled as in the example below. It launches the main program if the password matches. Note that this example launches the subVI statically and the ExampleProgram.vi is configured to show its Front Panel at Run-Time. This method requires the Password VI to remain open while the main VI runs.
The one downside of using the Prompt User for Input Express VI is that there currently is no way to replace the typed characters with asterisks as is commonly used in password entries. If this is required, manually set up a top-level VI that handles the string input as seen in the example below. Note that this example loads the ExampleProgram.vi dynamically. This allows the password program to end while the main application runs.
Right click on the string control for the password and select Properties. In the Appearance tab, find the Display Style sub-category and select the Password radio button. Click OK. This will replace any entered characters with asterisks.
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.