03-22-2011 05:27 PM
I am trying to append my Main VI's ini file to that generated during the built step.
I attempted to do that during a post-built step (as offered as an option in LV 2010 App Builder), but I an getting a File permission error when trying to append my ini file to the app's ini file:
Error 8 occurred at Write to Text File in Post-Build Action.vi->AB_Build.lvclass:User_PostBuild.vi->AB_Engine_Build.vi->AB_Build_Invoke.vi->AB_Build_Invoke.vi.ProxyCaller
Possible reason(s):
LabVIEW: File permission error. You do not have the correct permissions for the file.
C:\Bla\bla\bla\Release Directory\Application.ini
Since ini files are text files, I am simple doing this:
where I checked that the two paths access the correct file (the Main VI's ini file for the top one and the Standalone application's ini file for the bottom one).
What's the problem with that?
03-22-2011 08:09 PM - edited 03-22-2011 08:10 PM
My workaround so far is to use the "Use custom configuration file" option of the "Advanced" Category, where I have pasted the single section content of the default LabVIEW ini file generated for my app into my VI ini file, but that is not extremely robust (if I change something to my app settings and the default ini changes, I will have to reflect that into my custom-made ini file)...
Not exactly a solution, so I'd be happy to hear suggestions.
03-23-2011 06:49 PM
Try right clicking the exe and selecting "Run as Administrator." This is where many file permission errors stem from.
03-23-2011 07:05 PM
Kyle T, I am not sure I understand what you are referring to.
My problem is not with me built exe: the error happens during the build. The VI I am showing part of the diagram of, is the post-built VI run by the Application Builder. It attemps (well attempted, now that I changed strategy) to append my custom ini file (which I use for my Main application VI during development) to the ini file automatically generated by the AB for my Main application. The latter contains typically:
[My App Name]
server.app.propertiesEnabled = True
server.ole.enabled = True
server.tcp.serviceName = "My Computer/VI Server"
server.vi.propertiesEnabled = True
WebServer.TcpAccess = "c+*"
WebServer.ViAccess = "+*"
DebugServerEnabled = False
DebugServerWaitOnLaunch = False
I want to append the different section of my custom ini file to it. Rather than opening the default ini file with the Configuration File VIs and adding each and every entry in my ini file using the Configuration File VIs, I was thinking of just stitching the two together (after all, they are just text files). For whatever reason, the App Builder seems to set some special write permission on the ini file.
Again, I found a workaround, but it still requires me to cut and paste the above section to my VI during development (once), so that it is included when I build my app. It's fine with me, but it is neither very flexible nor elegant.