Connecting Tech Pros Worldwide Forums | Help | Site Map

include class libraries in .exe

Member
 
Join Date: Aug 2007
Posts: 89
#1: Nov 13 '07
hi all,

i need to include all necessary class libraries in the .exe file when i compile my project, so that it can be run on a computer where the dll-s are unaccessible or simply not there. as far as i understand using the list under tools->references only makes a reference to the .dll - what i want to do is to actually include it.

is this possible? how can i do it?

Moderator
 
Join Date: Oct 2006
Location: Australia
Posts: 7,748
#2: Nov 14 '07

re: include class libraries in .exe


It might help if you tell us which version of VB. But personally, I don't think it's possible. DLLs seem to be an unavoidable evil in Windows.

The idea is to "package" your program so it can be installed on other system, don't just copy it there.

I know it's a pain, but that seems to be the way of the Windows world.
Member
 
Join Date: Aug 2007
Posts: 89
#3: Nov 14 '07

re: include class libraries in .exe


Quote:

Originally Posted by Killer42

It might help if you tell us which version of VB. But personally, I don't think it's possible. DLLs seem to be an unavoidable evil in Windows.

The idea is to "package" your program so it can be installed on other system, don't just copy it there.

I know it's a pain, but that seems to be the way of the Windows world.

i'm using VB6, and even though an installation package would solve the problem of running the program, it would not do it the way i wanted it to: the problem is our support techs want to be able to copy the exe file to a customer server and use it for troubleshooting - as soon as the problem is solved, the program should be removed without leaving any traces whatsoever in the system. this could be obtained by a working .exe that i could just copy, run and delete - i don't want to mess in system folders on a customer's server...
lotus18's Avatar
Site Addict
 
Join Date: Nov 2007
Location: Zamboanga City, Philippines
Posts: 857
#4: Nov 14 '07

re: include class libraries in .exe


Quote:

Originally Posted by BlackMustard

i'm using VB6, and even though an installation package would solve the problem of running the program, it would not do it the way i wanted it to: the problem is our support techs want to be able to copy the exe file to a customer server and use it for troubleshooting - as soon as the problem is solved, the program should be removed without leaving any traces whatsoever in the system. this could be obtained by a working .exe that i could just copy, run and delete - i don't want to mess in system folders on a customer's server...

Click this link
http://www.thescripts.com/forum/thread735247.html

Hope it helps :)
Moderator
 
Join Date: Oct 2006
Location: Australia
Posts: 7,748
#5: Nov 15 '07

re: include class libraries in .exe


Of course, you could do it if you wrote the program in assembler. See http://www.grc.com - Steve Gibson is quite an advocate of writing small, clean, fast assembler code instead of the typical Windows bloat.
AHMEDYO's Avatar
Member
 
Join Date: Nov 2007
Location: Cairo,Egypt
Posts: 112
#6: Nov 15 '07

re: include class libraries in .exe


Hi

I think you have to create your exe without using any external dlls or I think that the only solution, if your file will work in company have server, you must distribute your components as DCOM to let your file use it from any PC within the domain.

I think that, best regards.
Member
 
Join Date: Aug 2007
Posts: 89
#7: Nov 15 '07

re: include class libraries in .exe


Quote:

Originally Posted by AHMEDYO

Hi

i think u have to create ur exe without using any external dlls or i think that the only solution, if ur file will work in company have server, u must distribute ur components as DCOM to let ur file use it from any PC within the domain

i think that, best regards

well, that was sort of what i had in mind. the question was how... i need for example the microsoft scripting runtime library to be able to use file system objects. can i include this library in my exe? that is what i want to do!
Member
 
Join Date: Aug 2007
Posts: 89
#8: Nov 15 '07

re: include class libraries in .exe


Quote:

Originally Posted by Killer42

Of course, you could do it if you wrote the program in assembler. See http://www.grc.com - Steve Gibson is quite an advocate of writing small, clean, fast assembler code instead of the typical Windows bloat.

yes, writing in vb isn't optimal in any aspect whatsoever, except for one: if i can write this in vb, i don't have to learn a new language to finish this task. finding a way of executing my vb code on the customer server will be way less work than learning how to write assembler code...
AHMEDYO's Avatar
Member
 
Join Date: Nov 2007
Location: Cairo,Egypt
Posts: 112
#9: Nov 15 '07

re: include class libraries in .exe


Quote:

Originally Posted by BlackMustard

well, that was sort of what i had in mind. the question was how... i need for example the microsoft scripting runtime library to be able to use file system objects. can i include this library in my exe? that is what i want to do!

Answer is no you can't, the only file that you can include within your project in Visual Basic project, files with .TLB extention and may be you will find it as external component on web.

If your project doesn't use more external files, you can use API but you will work more alot but you can create single file can work alone.
Moderator
 
Join Date: Oct 2006
Location: Australia
Posts: 7,748
#10: Nov 15 '07

re: include class libraries in .exe


You will still need to have the VB runtime available, of course.

AHMEDYO, TheScripts' posting guidelines require posting in clear, concise English. While one obviously must make allowances for differences around the world and the fact that English is often not a member's first language, we specifically disallow "TXTisms" such as "u" for "you" and "ur" for "your". Please remember, this is not a cellphone. (I have edited them out of a couple of messages in this thread.)
AHMEDYO's Avatar
Member
 
Join Date: Nov 2007
Location: Cairo,Egypt
Posts: 112
#11: Nov 16 '07

re: include class libraries in .exe


Quote:

Originally Posted by Killer42

You will still need to have the VB runtime available, of course.

AHMEDYO, TheScripts' posting guidelines require posting in clear, concise English. While one obviously must make allowances for differences around the world and the fact that English is often not a member's first language, we specifically disallow "TXTisms" such as "u" for "you" and "ur" for "your". Please remember, this is not a cellphone. (I have edited them out of a couple of messages in this thread.)


thank you for your advice, and sorry , sure i will stop that
Moderator
 
Join Date: Oct 2006
Location: Australia
Posts: 7,748
#12: Nov 16 '07

re: include class libraries in .exe


Quote:

Originally Posted by AHMEDYO

thank you for your advice, and sorry , sure i will stop that

Thanks.

By the way, is your avatar a self-portrait or something? It's really hard to make out, as it's almost entirely white.
AHMEDYO's Avatar
Member
 
Join Date: Nov 2007
Location: Cairo,Egypt
Posts: 112
#13: Nov 16 '07

re: include class libraries in .exe


Quote:

Originally Posted by Killer42

Thanks.

By the way, is your avatar a self-portrait or something? It's really hard to make out, as it's almost entirely white.

its personal pic but have effect, i am trying now to select good one, it was just test
Moderator
 
Join Date: Oct 2006
Location: Australia
Posts: 7,748
#14: Nov 16 '07

re: include class libraries in .exe


Quote:

Originally Posted by AHMEDYO

its personal pic but have effect, i am trying now to select good one, it was just test

I think it actually looks very good. Maybe you could just try dimming it slightly.
AHMEDYO's Avatar
Member
 
Join Date: Nov 2007
Location: Cairo,Egypt
Posts: 112
#15: Nov 16 '07

re: include class libraries in .exe


Quote:

Originally Posted by Killer42

I think it actually looks very good. Maybe you could just try dimming it slightly.

thanx, yas but thats hard to get it with good quality with 50x50
Member
 
Join Date: Aug 2007
Posts: 89
#16: Nov 16 '07

re: include class libraries in .exe


Quote:

Originally Posted by AHMEDYO

thanx, yas but thats hard to get it with good quality with 50x50

thanks for staying on topic, guys...
Reply