Link to home
Start Free TrialLog in
Avatar of aft
aft

asked on

package my VB project into a single exe file

i finished my VB project and i want to distribute it. i tried to use VB package and deplyment but i have one problem using it. VB package and deplyment outputs setup.exe, setup.lst and a .cab file. any one can open the .cab file and see its contents. i do not want that.
i want to package my exe file and all the libraries into a single exe file. and when the client run this exe all the libraries and exe are extracted to his machine.
how can i do so. i think there is a ready made packages for doing so because i see all the software i downloaded from the internet in this form (only one exe file).
regards,
Avatar of aelatik
aelatik
Flag of Netherlands image

You can make your own installer by adding the files in your exe using the recource editor.
I you don't have the Resource Editor then you can enable that Add-In by performing the following : ADD-INS > ADD-IN MANAGER > VB 6 RESOURCE EDITOR ( enable it )

When the resource editor is added, open it and add a custom file and give it the ID ( for example 1001 ).
Now in your code you can detach that file from your exe like this :

Private Sub Form_Load()
Dim X() As Byte
X() = LoadResData(1001, "CUSTOM")
Open "c:\thefilename.dll" For Binary Access Read Write As #1
    Put #1, 1, X
Close #1
End Sub

'It takes more time then PDW, but everything will be packed in the exe ( Otherwise you have to use Packagers like WISE or something )
Avatar of anv
anv

use installshield instead of P&D Wizard..
Hi

Get the visual studio installer...it's much better than the P&D Wizard, and it creates one setup file (*.msi).

Also as a huge bonus..it comes FREE from Microsoft...can you believe it....

http://msdn.microsoft.com/vstudio/downloads/tools/vsi11/download.aspx

Anyhows...
let me know

Cheers
Avatar of aft

ASKER

i have the resource editor.

but u mean that i have to do the previous steps with all of my ocx and dlls and ... etc?
if i put the dll into my app.exe how can i access the function stored in it from my app ?

how can i obtain wise?
Avatar of aft

ASKER

x50Fade

how the client will install this msi when i gave it to him?
or u can also use innosetup its free to use..
download it form here..

www.jrsoftware.org/
Avatar of aft

ASKER

i want all the file to be in the same exe
You just double click on it and it installs like a normal exe
Avatar of aft

ASKER

aelatik

that mean if i have a dll and i am using it in my app.exe. i can add it to the resource editor and delete it from my hard disk and still using it in myapp.exe?
how?
Avatar of aft

ASKER

anv

i downloaded innosetup. it is a good program. but as u know through the development of VB applications u r using some VB ocxs and it must be registered on the client machine. is inno doing so automatically?
Avatar of aft

ASKER

x50Fade

and no one can see the files inside the msi?
hi aft..

installshield is a better tool to use ... u can get the evaluation copy online
..and test it..
aft...to my knowladge no-one can see the files inside the msi...

aft....anv is right in stating that instalhield is better....by better I mean that it is a lot more advanced....sometimes too advanced....It's is also quite expensive to buy..

I played with installshield for a long time...but eventually I got fed-up with the fact that it takes about 20 minutes to create a propper installation.

I have used visual studio installer with great success with all my later projects.

Just downlaod it and check it out for yourself
Avatar of aft

ASKER

anv

i need a free software
Avatar of aft

ASKER

x50Fade

is visual studio installer  register all the ocx and dlls to the client computer while he install my software?
ASKER CERTIFIED SOLUTION
Avatar of x50Fade
x50Fade

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial