Including files with a vb installation
Including files with a vb installation
Including files with a vb installation
Including files with a vb installation
Including files with a vb installation
Including files with a vb installation Including files with a vb installation Including files with a vb installation Including files with a vb installation Including files with a vb installation Including files with a vb installation Including files with a vb installation Including files with a vb installation
Including files with a vb installation Including files with a vb installation
Including files with a vb installation
Go Back  Xtreme Visual Basic Talk > > > Including files with a vb installation


Reply
 
Thread Tools Display Modes
  #1  
Old 08-30-2009, 12:30 PM
djm2 djm2 is offline
Newcomer
 
Join Date: Oct 2007
Posts: 7
Default Including files with a vb installation


Hi there

I have successfuly written a VB program that I have published.

In my program I have a rtf file which I located on my C:\ whilst I developed. The VB program opens this file up when running as an input into the program.

In my program I use the following code to load the text in a rtb -

rtb.LoadFile("C:\rawreport.rtf")

I have noticed the "Application files" listed under the Publish tab. There is not the option to add my rtf file into here.

I basically want to prevent the user from installing the program and then having to go and add the rawreport.rtf in the correct location ie - "C:\rawreport.rtf". I assume there is someway to do this automatically. I have included rawreport.rtf in the resources folder but cannot work out what to do next.


David
Reply With Quote
  #2  
Old 08-30-2009, 12:36 PM
fisolofee fisolofee is offline
Newcomer
 
Join Date: Aug 2009
Posts: 11
Default

If you're looking into publication, check out Inno Setup at http://www.jrsoftware.org/isinfo.php

Honestly I personally believe it's one of the greatest out there.

If you do not have the time to learn Inno Script (which is pretty simple), you can just as easily download some third-party software such as InnoScript from http://www.jrsoftware.org/is3rdparty.php , which automatically creates the script for you from a visual basic project file.



Edit: Sorry i thought that your project was made in VB6. I did not realize it's in the .Net section. Anyway, Inno Setup still works I believe, but I am not sure whether VS .Net provides a similar/easier/more effective method.

Sorry for the confusion.

Last edited by fisolofee; 08-30-2009 at 12:39 PM. Reason: mistake~
Reply With Quote
  #3  
Old 08-30-2009, 02:39 PM
one2fight4 one2fight4 is offline
Regular
 
Join Date: Jul 2007
Posts: 95
Default

Im not sure if this is the correct way to do it but you could add the file to your resources and then a simple case to either add it there or not.

Ex
Code:
        If My.Computer.FileSystem.FileExists("C:\RawReport.rtf") = False Then
            System.IO.File.WriteAllText("C:\RawReport.rtf", My.Resources.RawReport)
        End If
Code above now works fine
__________________
Be nice to nerds. Chances are you'll end up working for one.
Bill Gates

Last edited by one2fight4; 08-30-2009 at 05:23 PM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Including files with a vb installation
Including files with a vb installation
Including files with a vb installation Including files with a vb installation
Including files with a vb installation
Including files with a vb installation
Including files with a vb installation Including files with a vb installation Including files with a vb installation Including files with a vb installation Including files with a vb installation Including files with a vb installation Including files with a vb installation
Including files with a vb installation
Including files with a vb installation
 
Including files with a vb installation
Including files with a vb installation
 
-->