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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running apps from CD 2

Status
Not open for further replies.

ausbazza

Programmer
Dec 19, 2000
3
0
0
AU
I wonder if someone can help me with this problem.
I have a program which I have written in VB6 from which I have made an exe file.
The app uses several dll's and ocx files.
When the program runs it calls a jpeg file, several rtf files and an avi file.
I have deployed all this onto a CD
I want the exe file to run from the CD without interfering with host PC's hard drive in any way.
I don't want the dll's and ocx's registered on the host PC and I certainly don't want the host PC to start asking questions about replacing system files with newer versions from the CD or anything like that.
Can I run such an exe from the CD without the hard drive knowing anything about it and without any settings being touched or even questioned??

I would really appreciate some help on this.
Thanking you.

Sincerely

Barry Tattersall
 
No, mosty likely you wont be able to do that. A vb exe is not a true exe, think of it as a table of contents that just calles on other dll's and ocx's do do its job. It would have to be stored on the hard disk in order for the dll's and ocx's to register (they must be registered in order to work). There is a program called fusion which claimes to combine everything that vb regquires into one exe, but ive never used it so im not shure if it actualy works.

-Mettodog
 
Barry -

Like Mettodog said, you aren't going to be able to do that since the files your program depends on (VB runtime, for one!) may or may not be on the user's harddrive. It's the one downside to VB programming.

Supposedly, with the next release of VB (VB.NET, or VB7, depending on who you ask), the runtime will unified with that of the VC++ and other development tools. This runtime will be distributed as part of Windows 2000, so you will have a better chance of running your app off a CD (again, as long as you don't use some controls that aren't part of the unified runtime).

Oh, BTW, prepare yourself for VB7. MS is changing the default array index from 1 to 0. So if you want an array of five elements, they'll be stored in elements 0..4 (just like in C). You also can't declare arrays that start at arbitrary indices -- no more Dim aryData(4..9)!

Chip H.
 
Thanks chiph and mettodog.
They were not the answers I was hoping for, but I will try to find fusion and check it out.
Has anyone heard of fusion, or know where I can find it?
Thank you
ausbazza
 
Chiph,

Oh, BTW, prepare yourself for VB7.  MS is changing the default array index from 1 to 0.  So if you want an array of five elements, they'll be stored in elements 0..4  (just like in C).  You also can't declare arrays that start at arbitrary indices -- no more Dim aryData(4..9)!

Where did you get that information?

VB has already 0 as the default array low bound. When you write

Dim array(4) as ...

you'll get 5 elements from array(0) to array(4).

You can force VB to start array bounds at 1, but then you have to code explicitely Option Base 1

Any information on the subject will be wellcomed.
 
Hi Mettodog
I found the program Fusion and it did what you suggested. However it also boasted that it automatically registered dll's and ocx's that were needed, so it could not serve my purpose.
Thanks anyway
Barry
 
rvBasic
Taken from VBPJ (a magazine) from a article in the November
issue

VB.NET also includes many smaller but subtler changes:

Underlying datatypes change to become consistent with the other languages in VS.NET. For example, Longs become Integers, and Integers become Shorts.
Everything is passed ByVal by default, not ByRef.
Several coding constructs go away, including default parameters, variants, and control arrays.
All arrays are zero-based.
Almost everything is an object, including strings

He goes on to say that zero based arrays are all you can get
Collin
 
Collin,

I think you are referring to the december issue of the VBPJ: "10 Ways to prepare for VB.NET" pp 62-65. It' scary. I'll wonder if there will be a single program that still compiles correctly...

My point was that Arrays for which the LBound was not explecitely declared, always had a lower bound of Zero, unless you used Option Base 1. So, the fact that the lower bound becomes systematically zero in vb.net is not entirely new.

However, the fact that Option Base 1 disappears is new, as well as the fact that you can no longer explicitely specify your favorite bounds (Which personally will hurt several of my programs very much). Not to mention that Dim a(5) will get you an array of five elements, numbered from 0 to 4!

If you are interested in additional info, MS has released an interesting document at:
Be prepared for a bad night's sleep!

PS: If you would like to continue that discussion, we'll better start another thread, as the original one has nothing to do with VB.NET. Not yet...
 
. For example, Longs become Integers, and Integers become Shorts. {/i]

I think this new "benefit" will cause me the most grief. I'll have to go back and change all my Declare statements for calls to Win32, Winsock, APPC, etc. But, it means that I will be able to run on the new 64-bit CPUs, so that's good!

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top