10-01-2009 07:21 PM
I am creating an installer to put my compiled executable on a customer's computer. The application also does web publishing, so I must include the following files:
niwebserver.conf
WebPub.ini
WebPub.alias
etc..... No problem there as the installer selects and includes those files.
I must also include the file "C:\Program Files\National Instruments\LabVIEW 8.6\www\WebPub.html" and then have it installed into the directory "C:\Program Files\National Instruments\LabVIEW 8.6\www" on the customer's system as this is where the webserver is pointed.
I want this all transparent as trying to get the customer to grab the file out of one directory and figure out how to put it in the correct directory would not go well.... 🙂
Hints??
Solved! Go to Solution.
10-02-2009 12:52 AM
Don't they always say using fixed paths is not good practice?
Your customers PC has the development environment installed? If the folder path already exists on the clients PC then why would you need to add the .html file? Wouldn't it already be there?
Include the .html file as a Support file with the installer. Use the current application path vi in LabVIEW and build a relative path to the .html file included with your installer.
Within your application. Check whether the .html is already at location "C:\Program Files\National Instruments\LabVIEW 8.6\www". If it isn't then copy it from the support folder into the www folder.
Oh BTW, if you are ever deploying to Vista machines you will never be able to programmatically move files into the Program Files folder without administrator privaleges.
BTW who is to say that your customer has installed LabVIEW at this location.
10-02-2009 08:57 AM
Nno, the .html file is not already there (it is custom for each LV exe that you create). I don't know if that path is there or not either as the development system is not on their computer.
How about I rephrase the question after thinking about it.
I have a LV exe built and it uses web publishing. I want to install it on a computer that does not have the LV developnment system on it. What directory do use to publish the .html file and how do I get it there?
I could use the directory for that the application resides in, but what if there is more than one application attempting to publish a web page? They would have to use the same directory so as to not confuse the LV web server.
10-02-2009 09:23 AM
I have always added non-LabVIEW files to the installer.
Add the file(s) to your project, then in the installer properties "Source Files" view, add those files under the executable. The files will be installed in the same location as the executable program. I do this for operator manuals and such.
10-02-2009 09:39 AM
10-02-2009 09:53 AM
No errors.
Ok..... simplest way to ask the question (I promise I am getting closer )
What directory should I use for publishing web pages on a computer that does not have the LV development system installed?
10-02-2009 10:00 AM
Hi!
I'm not sure you can get rid of the physical path problem in 8.6. In 9.0 NI added a variable $LVSERVER_ROOT to their web config file.
The path turns out to be:
[Program Files]\National Instruments\Shared\LabVIEW Run-Time\www
The best you can do is the path [Program Files] for the installer. See my post here: http://forums.ni.com/ni/board/message?board.id=170&message.id=439052#M439052
I write a step-by-step on how to do what you want in LabVIEW 2009. Might work for 8.6 too, but I seem to remember some tweaking was required.
10-02-2009 10:16 AM
Nickerbocker - Perfect, just what I was looking for.