07-29-2005 05:10 AM - edited 07-29-2005 05:10 AM
The flow should be clearer: The code first generates the path to the configuration file. If it doesn't exist, the "Error" case of the case structure creates it. After the case structure the file is read and the file contents are passed on to the password checking logic.
This code works, but I'm not convinced that it will do what you want. Is your intention to have the configuration file be read from the same location regardless of whether the VI is being run under the development system or as an executable? If so, this logic won't do it. As I explained before, the path to the configuration is based relative to a builtin function node called "Default Path". The value that this node returns is determined by a value in the ini file for either LV or your application--depending on whether the VI is running in the development system or as an executable.
If there is no entry in the ini file to define this value, LV or the LV Runtime Engine has to make some assumptions about what to return. In the case of the development system, LV returns the path to where you have LV installed. For the runtime engine, it returns the path to where the executable is. The problem is that this logic will likely result in the file occuring in two different places depending on the environment in which you are executing the VI, and where the executable is installed. Where do you want the configuration file to be?
Mike...
Message Edited by mikeporter on 07-29-2005 06:15 AM
08-02-2005 08:28 AM - edited 08-02-2005 08:28 AM
Thanks mike,
Sorry for the delay.
As you said I understood in the wrong way and made the changes that I have posted earlier. What I required is When the program is run in the LV or Application builder it has to create a file if doesn't exits and read from the file created. The development system is used while developing the application in LV and once it is made executable file is created and installed in other PC. If we do so the file may not created in two different locations.
With regards,
Anusree
Message Edited by anusree on 08-02-2005 08:35 AM
Message Edited by anusree on 08-02-2005 08:37 AM