Solved

How to compile an "independent" application

Posted on 2002-03-27
6
353 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
[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
  • 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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

Increase Agility with Enabled Toolchains

Connect your existing build, deployment, management, monitoring, and collaboration platforms. From Puppet to Chef, HipChat to Slack, ServiceNow to JIRA, Splunk to New Relic and beyond, hand off data between systems to engage the right people.

Connect with xMatters.

Question has a verified solution.

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

Monitor input from a computer is usually nothing special.  In this instance it prevented anyone from using the computer.  This was a preconfiguration that didn't work.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

696 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