Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to compile an "independent" application

Posted on 2002-03-27
6
Medium Priority
?
355 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 600 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
Independent Software Vendors: 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!

 

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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
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…
Suggested Courses

971 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