self-contained app

K

Ketchup

Hello everyone,

I am prototyping a small application that needs run entirely from a USB
thumb-drive. It has to be independent of the software base on the machine
and has to be self-contained. I will likely only deal with NT-based
systems, more specifically Windows 2000 and later. I don't believe that I
can count on the .NET framework being installed, or C++ runtime library
being available. I also cannot install anything on the system.

What's my most effective approach to writing this app? Do I stick with
unmanaged C++? Can I use MFC? Or would VB 6.0 do the trick? Is there a
converter that would allow me to convert a managed application to a
self-contained unmanaged app?

Thanks in advance!
 
S

Steve

Hello everyone,

I am prototyping a small application that needs run entirely from a USB
thumb-drive.  It has to be independent of the software base on the machine
and has to be self-contained.  I will likely only deal with NT-based
systems, more specifically Windows 2000 and later.  I don't believe that I
can count on the .NET framework being installed, or C++ runtime library
being available.  I also cannot install anything on the system.

What's my most effective approach to writing this app?   Do I stick with
unmanaged C++?   Can I use MFC?   Or would VB 6.0 do the trick?  Isthere a
converter that would allow me to convert a managed application to a
self-contained unmanaged app?

Thanks in advance!

If you stick with VB6 and do not use any third party tools your app
should run just fine.

The VB runtime is included as part of the OS install (at least for Win
2k and XP not sure about NT).

In addition to staying away from third party tools (i.e. OCXs and
ActiveX dlls) you will also want to not use any of the VB addon tools
as the versions of these available vary with OS version and updates
applied. IOW do not use any tools that require you to add references
or components. Just use the tools available from the default VB
toolbox.

Hope this helps,
Steve
 
E

expvb

Ketchup said:
Hello everyone,

I am prototyping a small application that needs run entirely from a USB
thumb-drive. It has to be independent of the software base on the machine
and has to be self-contained. I will likely only deal with NT-based
systems, more specifically Windows 2000 and later. I don't believe that I
can count on the .NET framework being installed, or C++ runtime library
being available. I also cannot install anything on the system.

What's my most effective approach to writing this app? Do I stick with
unmanaged C++? Can I use MFC? Or would VB 6.0 do the trick? Is there
a converter that would allow me to convert a managed application to a
self-contained unmanaged app?

Windows 2000 with no service packs came with VB6+SP3 runtime.
Windows XP with no service packs came with VB6+SP6 runtime.

Applying later service packs can update the runtime. But the above means
that you can run VB6 apps just by running the EXE if you didn't use any
ActiveX DLL or OCX.

Unmanaged C++ can create executables with minimum dependency, not depending
on dotnet library. You can use MFC with static linking, which makes the
compiler include the MFC library inside the EXE, so you only need core OS
DLL's, such as Kernel32.dll, User32.dll, etc.
 
E

expvb

expvb said:
Windows 2000 with no service packs came with VB6+SP3 runtime.
Windows XP with no service packs came with VB6+SP6 runtime.

I am not sure what happens if your EXE was compiled with VB6+SP5 compiler,
but later tried to run it on a system with SP3 runtime. Test to make sure
that there are no issues affecting your application.
 
E

Eugene Mayevski

Hello!
You wrote on Sat, 15 Nov 2008 19:55:03 -0800 (PST):

S> If you stick with VB6 and do not use any third party tools your app
S> should run just fine.
S> The VB runtime is included as part of the OS install (at least for Win
S> 2k and XP not sure about NT).

There can be problems on Vista, which by default doesn't include some OCX
controls which are widely used in VB. I don't remember the details now, but
we came across the situation where our simple sample projects didn't run on
Vista due to lacking control libraries.

With best regards,
Eugene Mayevski
http://www.eldos.com/ - security and virtual storage components
 
T

Thorsten Albers

Steve said:
If you stick with VB6 and do not use any third party tools your app
should run just fine.
The VB runtime is included as part of the OS install (at least for Win
2k and XP not sure about NT).

It is part of the OS installation but not of the OS itself. Therefore it
may be removed or replaced with no restrictions. Therefore with 2K, XP, and
Vista it the same as with Windows 9x: All necessary libraries possibly may
be there but they are not necessarily.
 
T

Thorsten Albers

Ketchup said:
I am prototyping a small application that needs run entirely from a USB
thumb-drive. It has to be independent of the software base on the machine
and has to be self-contained. I will likely only deal with NT-based
systems, more specifically Windows 2000 and later. I don't believe that I
can count on the .NET framework being installed, or C++ runtime library
being available. I also cannot install anything on the system.

What's my most effective approach to writing this app? Do I stick with
unmanaged C++? Can I use MFC? Or would VB 6.0 do the trick? Is there a
converter that would allow me to convert a managed application to a
self-contained unmanaged app?

Unmanaged C++ with all external libraries linked statically, or use another
programming language which compiles executables which do not depend on
additional libraries, e.g. PowerBasic.
 
K

Ketchup

Thanks everyone,

I am going to try VB6 first, just because I am quite comfortable with it.
If that fails testing, I will revert to unmanaged C++. I just hate doing
forms in unmanaged C++. I used to do all my forms design in VB6, and used
C++ for the functionality. Perhaps, that's still an option.

I will also do some research on PowerBasic.

Thanks again everyone!
 
R

Ron Weiner

As other have stated in this thread, "It's Doable!". We have a VB6 app that
runs off a thumb drive that we have been using for years. The limitations
are (again) the OS be win 2k or better and we also require IE 4 or better.
Dam thing even works under Vista.

The application was written **VERY** carefully and does not use ANY OCX's.
It does make use of IE webrowser and MDAC, though we are careful only to use
MDAC 2.1 features. Everything it needs that is not in the VB6 runtime it
gets from making direct calls into the OS.

The only time we had any compatibility issue was when a customer attempted
to run it on a MAC under whatever the emulation software he had. The
reason, best I could tell it would not run, was because it was unable to
communicate our USB HID device that our software needs to "do its thing".
If the emulator had faithfully emulated a standard PC USB port, it might
well have worked there too.

Rdub
 
J

Joep

Ketchup said:
Thanks everyone,

I am going to try VB6 first, just because I am quite comfortable with it.
If that fails testing, I will revert to unmanaged C++. I just hate doing
forms in unmanaged C++. I used to do all my forms design in VB6, and
used C++ for the functionality. Perhaps, that's still an option.

I will also do some research on PowerBasic.

Yes, or molebox your vb6 app.
 
D

Dean Earley

Ketchup said:
Hello everyone,

I am prototyping a small application that needs run entirely from a USB
thumb-drive. It has to be independent of the software base on the machine
and has to be self-contained. I will likely only deal with NT-based
systems, more specifically Windows 2000 and later. I don't believe that I
can count on the .NET framework being installed, or C++ runtime library
being available. I also cannot install anything on the system.

What's my most effective approach to writing this app? Do I stick with
unmanaged C++? Can I use MFC? Or would VB 6.0 do the trick? Is there a
converter that would allow me to convert a managed application to a
self-contained unmanaged app?

Further to the other answers, if you use VB6 you can include the VB6
runtimes and needed OCX files in the same folder as the EXE, and it will
register any that aren't already installed.
I'm not sure if it leaves them registered or not though.
 
M

Matt Williamson

Ketchup said:
Hello everyone,

I am prototyping a small application that needs run entirely from a USB
thumb-drive. It has to be independent of the software base on the machine
and has to be self-contained. I will likely only deal with NT-based
systems, more specifically Windows 2000 and later. I don't believe that I
can count on the .NET framework being installed, or C++ runtime library
being available. I also cannot install anything on the system.

What's my most effective approach to writing this app? Do I stick with
unmanaged C++? Can I use MFC? Or would VB 6.0 do the trick? Is there
a converter that would allow me to convert a managed application to a
self-contained unmanaged app?

Thanks in advance!

Another option is to create the program and use VMWare ThinApp to make it
portable.

HTH

Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top