Solved

Make executable without an install...Points depending on answer

Posted on 2000-03-03
10
267 Views
Last Modified: 2009-07-29
This probably sounds like a stupid question, but is it possible to create an executable that will run on a machine without vb installed without creating an install program or copying any runtime files to the machine. The program only has one line of code (except for the declaration), and it is an API. I'm just writing it as a joke program and all it does is switch the mouse buttons.

The code is simply:

Sub Command1_Click()
     Sw = SwapMouseButton(-1)
End Sub

I don't want them to have to do an install or copy files just to run such a dumb little joke.

I'm pretty sure that is not possible, but I'll give you
150 points to tell me how to do it,
or
50 points if the answer is simply I can't

Please don't answer telling me it can't be done unless you are sure.

Thanks!
mshaner
ps..Vb is the only programming language I know (well, besides qbasic)



0
Comment
Question by:mshaner
[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
10 Comments
 
LVL 1

Expert Comment

by:johnczimm
ID: 2581667
Odds are the the user may already have some runtime files on the computer from installing other programs.  If you only common controls, it look like you are, you might get this to work on some computers.
0
 
LVL 1

Expert Comment

by:PatrickVD
ID: 2581699
In regular circumstances, I would say you can't... but the answer is not so easy...
Because if the system on which you would want this program to execute is running Windows NT4 with Service Pack4 (may be even with Service Pack3 but I couldn't check) it already has the minimal VB5 and VB6 runtime files installed (MSVBVM600.DLL). So if your program does not reference any external OCX it will work on that system !

I don't know how it will be with Win9X, because I only work with NT here.. so probably somebody else will have to confirm or deny this situation on Win9X.

Hope this helps..

Patrick.
0
 
LVL 1

Expert Comment

by:ntdragon
ID: 2581703
i really think that they"ll need some dlls
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.

 
LVL 1

Accepted Solution

by:
karlww earned 50 total points
ID: 2581764
Short answer is you can't w/o a C/C++ compiler or other compiler than can produce a stand alone EXE.  VB5/6 have as a minimum requirement a single runtime DLL (MSVBVM50.DLL or MSVBVM60.DLL as PatrickVB mentioned).

Here's minimum C code to do this.  Now you need a compiler.
#include <windows.h>

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
    ::SwapMouseButton(TRUE);
    return 0;
}
 
0
 
LVL 5

Expert Comment

by:KDivad
ID: 2581840
Win98 also has the VB5 runtimes included.
0
 
LVL 24

Expert Comment

by:SunBow
ID: 2582190
I think the code will run fine, but why not try?
I suspect a problem might occur with the method you use to launch the thing.
0
 
LVL 1

Expert Comment

by:olx
ID: 2582490
mshaner:
please post your code to work it out.
i've done something like this before.

:)
0
 

Expert Comment

by:LeXien
ID: 2584859
have a look at - www.bit-arts.com and their program called Fusion
0
 

Expert Comment

by:darnison062499
ID: 2585377
There is an application called Fusion that compiles all runtimes, ocx's etc into the executable of a Visual Basic program.  This would definatly work, but you'll have to pay $39.00 for it.
0
 
LVL 24

Expert Comment

by:SunBow
ID: 2593669
I like the Fusion concept of no royalty so fee does not seem that bad.  But, does it really handle registry and the scenarios of the ol' dll h@ll?
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

738 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