Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual Basic stand alone application 2

Status
Not open for further replies.

vbSun

Programmer
Dec 9, 2002
504
US
The question is about a VB program which does not use any additional controls (Common dialog, Rich text box etc.). What I would like to seek opinion from experts like you is that, is it possible for me to deploy the application without any setup program? To explain further, I want the exe to be sent to someone and it should work fine without the need of an installation. Is this possible?

Thanks in advance for your expert opinion.


------------------------------------------
The faulty interface lies between the chair and the keyboard.
 
Is the vb runtime included on a clean install of windows?
 
A VB6 program usually requires at least these 6 DLLs and 1 TLB.
[tt]
VB6STKIT.DLL
COMCAT.DLL
OLEPRO32.DLL
STDOLE2.TLB
ASYCFILT.DLL
OLEAUT32.DLL
msvbvm60.dll
[/tt]
Some of them will probably already be there but the ones with "vb" somewhere in their name will almost certainly not be unless some other VB-based program has been installed.

[small]No! No! You're not thinking ... you're only being logical.
- Neils Bohr[/small]
 
I could be wrong, but if you don't add any additional controls/references, I think the exe will run on any XP or 2000 SP4 machine.
 
VB6STKIT is only really required if you are deploying via P&D, msvbvm60.dll will be found on all current Windows NT-based operating systems, .TLBs never need to be distributed with applications, and the others should all be available on a target PC already

In other words, yes it is perfectly feasible to simply deploy a VB .exe without using any sort of installation program
 
strongm, can you elaborate on "all current Windows NT-based operating systems"?

Do you mean to say that if Windows NT, 2000, XP, Server 2003 are updated to the most current service pack available, then you don't need the vb runtimes (because they are already on the computer).

What about Windows 98?

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
>Do you mean to say ...
That is correct (in fact 2000, XP, Server 2003 - and Vista when it ships - should have the VB runtime there out of the box; don't need a service pack

>Windows 98
Can't for the life of me remember
 
>Windows 98

Windows 98 Second Edition ships only with msvbvm50.dll. It means if you have compiled your application with VB5, it will work on a fresh installation of Win98 SE too.

To run VB6 apps, you need msvbvm60.dll.
 
I suppose this is true for the c++ runtimes, too.

I am using a 3rd party control. It has a dependency file that looks like...

[tt][blue]
; Dependency file for setup wizards.

[Version]
Version=3.0.0.16

; Dependencies for ThirdPartyControl.OCX

; Default Dependencies ----------------------------------------------

[ThirdPartyControl.OCX]
Dest=$(WinSysPath)
Register=$(DLLSelfRegister)
Version=3.0.0.16
Uses1=mfc42.dll
Uses2=msvcrt.dll
Uses3=msvcrt40.dll

[mfc42.dll]
Dest=$(WinSysPathSysFile)
Register=$(DLLSelfRegister)
Uses1=

[msvcrt.dll]
Dest=$(WinSysPathSysFile)
Uses1=

[msvcrt40.dll]
Dest=$(WinSysPathSysFile)
Uses1=
[/blue][/tt]

Should I not bother installing the dependency files because they, too, already exist?

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
>Uses1=mfc42.dll
>Uses2=msvcrt.dll
>Uses3=msvcrt40.dll

Yep - those should all be there as well
 
Thank you strongm and hypetia.

Right now, I'm suffering through an install program and your comments have helped.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Thanks All!

------------------------------------------
The faulty interface lies between the chair and the keyboard.
 
Yeah, You need to have those dlls installed. For a install program, can i suggest InnoSetup (Google it). This is a free program that has tons of information out there about it.
The reason these other guys are saying that you don't need to install anything is they are probably all running computers with VB installed on it. If the machine that will run it is guaranteed to have VB on it, then you do not need to install any dlls.

David Kuhn
------------------
 
No, that is not the case. Please try and read really carefully what 'these guys' are actually saying
 
I'll throw my 2 copper pieces in here too :)

It is true that if all the files are already on the computer, then an x-copy deployment is possible. However, it would be very tedious to check for those files on each machine prior to using. The dll's that are being copied have to be registered as well.

As far as all of the VB6 dll's being on a fully patched version of XP...they claim it is, but I've had instances where a file or two was missed. I even installed a fresh copy of XP and did the updates myself to test whether the files where there. There were files there with the same name, however different version. And we ALL know what that means :)

I HIGHLY recommend creating an install package for this very reason. Even if it's just as simple as using the Package and Deployment Wizard.

The next option is to switch to .Net. .Net uses Framework 1.1/2.0 for it's standard files, so as long as those are there, you can x-copy deploy till your hearts content :). I have yet to run into a situation where I had to use an installation package. If I use a com reference, I just copy the dll over in the same directory. If not, it's already in the framework. Keep in mind tho, that if the machine doesn't have 1.1 for 2003 and 2.0 for 2005 then you'll need to install that prior to it running properly.
 
So, in answer to the question

>is it possible for me to deploy the application without any setup program?

your answer is to use a setup program ... ;-)



 
The other thing to look at is reg-free COM, but I admit I haven't worked with it much yet myself. I'm sure it works on XP and 2003, and maybe on Win2K as well.

Unlike the .Net IDEs there isn't any direct support in VB for it, so you have to hand-build the necessary manifests. Seems like a candidate for a VB 6.0 IDE add-in though.

Simplify App Deployment with ClickOnce and Registration-Free COM

Just one more thing that was supposed to be in the VB 7.0 we never got. [sad]
 
<Even if it's just as simple as using the Package and Deployment Wizard.

You've been unintentionally funny, mac. :)
 
Maybe no more P&D Wizard for simple VB 6 applications, at least on XP.

I spent part of a day tinkering with Reg-Free COM and most of a day writing a project file scanner to create XCopy-deployable VB programs. Plenty of testing still needed and I'm sure there is more work to do, but so far so good.

Now to see which of my handy dandy programs I wrote in VB 6 over the years I want to move to a flash drive for pocket portability!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top