Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 714
  • Last Modified:

In vb.net_2005, when publishing your app, how do you automatically include certain files with it?

In vb.net_2005, when publishing your app, how do you automatically include certain files with it? I have a db I need to have installed along with my program. And another program a font. What's the best way to do this?

Thanks Experts! ~Michael
0
JeffreyDurham
Asked:
JeffreyDurham
  • 7
  • 4
1 Solution
 
usarianCommented:
Have you created an install project, or is your software being installed some other way?
0
 
JeffreyDurhamAuthor Commented:
All I'm doing is going to the 'Build' Menu and selecting 'Publish Project'.. It produces a setup.exe app and has some folders with libraries and such that it makes.. (Is that what an install project is?)

~Michael
0
 
JeffreyDurhamAuthor Commented:
Additionally I've got a application setting (I'd have to make it user) connection string which I may need to change depending on whether I'm running it in debug mode or it's a published app, but it should point to the db that I'm trying to include with the program.
I do know that if I go to `My.Application.Info.DirectoryPath' I can find the location of my program at run time, and if it included my db in this same folder it woudl be really quite easy.. But yeah, I just want to include my db with my program and know how to include other files too. Not resources tho. I know how to do images and stuff like that.

Thanks~Michael
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
usarianCommented:
Are you trying to use ClickOnce deployment so your ap can be used within your company over the network?
0
 
JeffreyDurhamAuthor Commented:
No, we plan to distribute it to people like they'd download the setup.exe file & folder it comes with. Not over the network tho. I've never used the ClickOnce deployment before. Umm.. I'm not really trying to install it over the web either really. I kinda just want a standalone we can give them however.
~Michael
0
 
usarianCommented:
Ok, then you want to add a setup project.
Click FILE-->ADD-->NEW PROJECT
click the plus sign next to OTHER PROJECT TYPES
click SETUP AND DEPLOYMENT
click SETUP PROJECT
name your setup file (say.. SETUP or something..) and click OK

right click your newly created setup project and click ADD-->PROJECT OUTPUT
select PRIMARY OUTPUT for now and click OK.

by the way, I HIGHLY recommend the book "Microsoft Visual Basic .NET Step by Step" by Michael Halvorson.   Very easy to read, but handy reference too.

What kind of database are you wanting to package with your software?
0
 
JeffreyDurhamAuthor Commented:
Thank you usarian.. this sounds like what I needed to know. On Monday when I get into work again, I'll check this out first thing. Have a great weekend! ~Michael
0
 
JeffreyDurhamAuthor Commented:
Wow ok, adding a setup project to this is /extremely/ complicated.. I have that book btw to by Michael Halverson and it doesn't discuss how to do this at all.
Mainly the problem I'm running into is it isn't intalling my application at all. I have no idea how to setup the folders, the Application Folder, the User's Desktop and the User's Program Menu, nor do I have any idea how to set any of the User Interface, Custom Actions, or Launch Conditions. Furthermore it refuses to let me include the SHDocVW library saying it's under windows file protection or something bizarre like that.
Michael
0
 
usarianCommented:
For the target file system:

Right click your setup project, and click VIEW-->File System

You will see three folders in the left hand pane.
APPLICATION FOLDER (the directory the installing user decides to place your application in)
USER'S DESKTOP (for placing an icon)
USER'S PROGRAM'S MENU (the end user's Start-->All Programs list of files in windows XP or Start-->Program Files in Windows 2000)

If you already added your project's primary output, you will see that in the application folder.  Once you click on the folder in the left pane, you will see the icon in the right.  You can right click that, then click create shortcut to primary output to get an icon in the application folder.  You will want to name the shortcut file.

In the shortcut file's properties (right click it then click PROPERTIES WINDOW) and you will see where you can assign an icon to the shortcut.  You will have to add the icon to the setup project first.  It will appear in the APPLICATION FOLDER.

In Halvorson's book, deployment is Chapter 14 (page 371).. well, depending on your edition..
Another edition on Amazon has it in Chapter 2, p59.
Actually, I also have an abridged version that came with my first copy of VB.NET 2003 that .. well.. it's abridged.. The full version is on Amazon.  I just saw it for around $20.

Windows File Protection:
Here's a windows kb article--> http://support.microsoft.com/kb/222193

So what kind of database are you installing?
0
 
JeffreyDurhamAuthor Commented:
Hey Usarian, very good answers. Ok, I'm working through all this, but I think I have an idea what I'm doing now thanks to you. Pretty soon I'll get this compiled, and working the way I want, and I'll totally award you the points.. :)
~Michael

>>So what ind of database are you installing?
It's an access 2000 format db I'm pretty sure..
0
 
JeffreyDurhamAuthor Commented:
Huh, I do have the older book.. >> Another edition on Amazon has it in Chapter 2, p59.
Well that explains that :P
0

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

  • 7
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now