?
Solved

How To Make An Install Program

Posted on 2003-03-31
7
Medium Priority
?
178 Views
Last Modified: 2010-04-07
I have created a visual basic program that rely's on an access database and a text file located in a specified location. The location is specified in the code.

My questions are:

1.) Can i create an install program like you use with professional programs that will place my access and text file in the location i have specified in the code.

2.) i want this install program to install the program and place it on the desk top so that when its run the access file and text file are in the proper locations so the program can run error free.

thanks
0
Comment
Question by:greg222
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 48

Expert Comment

by:AlexFM
ID: 8239123
All this can be done using Package and Deployment Wizard (Start - Programs - Microsoft Visual Studio - Tools - Package & Deployment Wizard).
0
 
LVL 18

Expert Comment

by:Crash2100
ID: 8239485
One suggestion, the desktop folder isn't likely to be in the same location on everyone's computer, especially if the user is using windows 2000 or xp.

In win 9x the folder was always "C:\windows\desktop", but in windows 2000 and xp, the folder is something like this:
     "C:\Documents and Settings\Username\Desktop"


One thing you could do is either place the database file in the same folder as the program and use the App.Path variable to get the name of the folder your program is currently stored in:

     Dim strPath as string
     strPath = App.Path & "\dbName.mdb"

But if you want it saved on the desktop, for Windows 2000, XP, and I think NT, you can use something like this to get the location of the desktop folder:

     Dim strPath as string
     strPath = Envoron("userprofile") & "\Desktop\dbName.mdb"
0
 
LVL 18

Expert Comment

by:Crash2100
ID: 8240318
sorry that last bit of code should be this:
    Dim strPath as string
    strPath = Environ("userprofile") & "\Desktop\dbName.mdb"
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:sf2k
ID: 8241263
I bet that you can have an installer up and running in less than an hour.

there is a freeware installer called innoSetup that will manage your program install directories, icons, and even registry settings.  see http://www.jrsoftware.org/isinfo.php for information and help files.  It look professional and will create desktop icons, as well as quicklaunch or tray icons for your application.

innoSetup uses a text file to run a compiler that makes up the installer program.  You can change the look and feel as well as installer options.  (I'll add my .iss setup file to this comment later from my other computer where I have my example, so you can see how it easily manages the setup).

For me anyway, I found this really easy to use, as it separates the installer issues from the program created.  If need be, you can also setup different ways depending on the operating system, or application requirements.  

For example: if your code depends on certain programs already installed, like Access, the installer can check before installing your application that the user has it on the computer.  This prevents user errors and will save you any tech support headaches.

Another example: maybe you need registry settings but they differ depending on the variant of Windows used.  innoSetup can make a single installer manage the changes for the specific version of Windows.

Added benefit: Although hardcoding is a no-no, you can of course do so if you want to.  However, by using installers like this one, you end up programming in a more modular manner so that the installer takes care of all of the local file issues rather than hardcoding it in your application.  This will make future code editing easier.

cheers
sf2k
0
 

Author Comment

by:greg222
ID: 8322968
The package and deployment wizard looks good. Will that place my file where i specify?


0
 
LVL 18

Expert Comment

by:Crash2100
ID: 8323007
yes it will.  In one of the final steps of the package wizard, it will give you a list of files included with the setup program and where they will be installed.
0
 
LVL 18

Accepted Solution

by:
Crash2100 earned 80 total points
ID: 8323009
you can change where the files will be installed at that point.
0

Featured Post

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses
Course of the Month12 days, 22 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question