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
Solved

How to compile an "independent" application

Posted on 2002-03-27
6
350 Views
Last Modified: 2013-11-14
Hello.

I would like to compile and deploy an application in a perhaps less usual way, namely that the program can be run “straight away”, that is without having to install it first – so that for instance, the user can run it from a CD-rom.

I have already found out that when I compile my application, the resulting EXE will look for all kinds of necessary .dll’s, .ocx’s and what not, and that it expects them to “reside” in the directories where they where when the EXE was created.

When one creates a setup.exe package using the package and deployment wizard or independent programs such as InstallShield or Wise, those .dll’s, .ocx’s will apparently be included and when the user installs the program, they are being placed in the corresponding “default directories”.

In order to run completely independent, those files would have to be located in a directory where I want them to be and the compiler should be told to produce an EXE that looks for them there.

1) Is it possible to achieve this and how do I go about it ?
2) Does Visual Basic or Visual Studio include a compiler that can achieve this , or can InstallShield and WISE ?

Many thanks,

Michel
0
Comment
Question by:michelvanpassel
  • 3
  • 2
6 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 200 total points
ID: 6901981
It is possible, the most popular tool for this is the Fusion product from http://www.bit-arts.com/fusion which will combine all the runtime files and any necessary dlls/ocxs into a single executable. This also handles the dynamic extraction of any necessary dlls/ocxs etc when you run the application.

Unless you use this or another similar tool you cannot do this with any of the installation package tools.

The only other method is to include all the necessary dlls/ocxs in the same folder on the CD as your application, whilst normally the application will look for dlls/ocxs in \windows\system32 or equivalent or any other specified installation location it will also check the startup folder of the application so including everything in this folder is a possible method. However it is not necessarily entirely reliable especially if there are conflicting versions of dlls/ocxs installed already on the machine that it will be run on.
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 6902269
Actually,FUSION is somewhat "misleading" as it is actually a SELF-INSTALL program, which does the install, under the covers, and then executes the "main" app.

In reality, it is IMPOSSIBLE to totally avoid some form of installation, whether it is EXPLICIT - the user MUST install the program forst, and then run it, or IMPLICIT- such as Fusion, which installs the support strcuture and the executes, without the user being involved directly in the installation step.  Either way, the support DLLs, which a VB program MUST have in order to operate, MUST be installed, with the necessary registry entries made, for the application to run.  That is the nature of the way VB 6  earlier programs are structured.  That WILL not be the case with VB.NET which DOES NOT require an EXPLICIT installation, and does not use the regitry the way COM does.  In fact, with .NET, after the CLR has been "installed" on a system, then "installation" of a .NET application can be accomplished with a simple XCOPY of the >EXE to the target PC.
0
 

Author Comment

by:michelvanpassel
ID: 7026567
Hello Tim,
Hello Arthur,
Thanks for your comments. My apologies for this very late reply, but I have been ‘out of computer circulation' for almost two months.
As Arthur states, some files have to be installed for any program to work.
So what I'm going to try is this:
-     Create a setup that will ask to install all necessary files in a specified location.
-     When running this setup, tell it to install the package on my CD-RW drive (which can be done if the right software has been installed).
-     Then ‘eject' (or ‘finalise' as it is sometimes called I think) the CD.
This should produce a CD with an installed and ready to use version of the program.
And as Tim suggests and after visiting the Bit-Arts site, the Fusion program could do the trick.
If I succeed, I will surely let you know.
Finally, as Arthur says, this won't be a problem anymore with .NET - but I'm not up to that yet.
I would like to award both of you the 200 points. I'll start with Tim and try the same for Arthur, but don't shoot me if it doesn't work.
Thanks again,
Michel
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

Author Comment

by:michelvanpassel
ID: 7026578
Hi Arthur,

As I feared, once the anwer accepted, I can't award any more points for this question.

I owe you one.

Michel
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 7026640
Michel if you want to award Arthur some points you can always raise a dummy question pointing to this one of the for "points for arthur_wood" body of the URL to this question.
0
 

Author Comment

by:michelvanpassel
ID: 7027014
Thanks Tim
I'll do that, because EVERY usefull advice is worth points.
Greetigs
Michel
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

839 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