LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I add .html file to my installer?

Solved!
Go to solution

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??

0 Kudos
Message 1 of 8
(7,582 Views)

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.

0 Kudos
Message 2 of 8
(7,571 Views)

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.

0 Kudos
Message 3 of 8
(7,560 Views)

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.

0 Kudos
Message 4 of 8
(7,554 Views)
I think I misread your question. There is a seperate runtime engine for web server. Is that added to your installer build? Are you getting an error from your installed program? 
0 Kudos
Message 5 of 8
(7,549 Views)

 

No errors.

 

 

Ok..... simplest way to ask the question (I promise I am getting closer Smiley Wink )

 

 

What directory should I use for publishing web pages on a computer that does not have the LV development system installed?

0 Kudos
Message 6 of 8
(7,545 Views)
Solution
Accepted by topic author dbtestcon

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.

 

source file for html.jpg

0 Kudos
Message 7 of 8
(7,540 Views)

 

Nickerbocker - Perfect, just what I was looking for.

0 Kudos
Message 8 of 8
(7,535 Views)