Making a VB app to run in a CD-Rom 
Author Message
 Making a VB app to run in a CD-Rom

I am making a multimedia app in VB4 and I have some doubts about being able
to distribute it on CD.

I am dealing with files like this:
filename = "\directory\file.avi"
open "\directory\file.txt" for input...
play = sndPlaySoundA ("\file.wav",....)
Of course this only works while the files are on my fixed disk, but as soon
I pass them to a Cd-Rom.....

So, I would appreciate if anyone could give me some details about how to
load the same files as if they were on a Cd-Rom (some users may have their
CD on d,e or f drive...???)

Many thanks
Paulo Proen?a



Sun, 21 Nov 1999 03:00:00 GMT  
 Making a VB app to run in a CD-Rom

: So, I would appreciate if anyone could give me some details about how to
: load the same files as if they were on a Cd-Rom (some users may have their
: CD on d,e or f drive...???)

the problem is not with your program or with using a CD-ROM.. it's with
the installation program you are using.  We (a professional multimedia
firm) have switched to the (seriously problematic, but still does the
job) InstallShield for our stuff.  this allows us to (assuming we install
a stub program and keep the bulk of our media on CD) to set ini or
registry entries indicating where the CD-ROM drive is.

if you dont want to do this, then be smart about it!  either you can use
APIs to find out which drive is a CD-ROM drive, or put a special file
(say "mycd.ini") in the root directory of the rom and sequentially go
through the drive letters until you find that file.  if you dont find
that file, bring up a box that says 'CD ROM not found!  Please insert
your CD-ROM into drive' and then give a choice of valid CD-ROM drives.  
this has the added benefit that in case their CD-ROM drive ever changes
the prompt will come up and you're still in business.

regards,

adrian

--
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  i keep six honest serving men          \/      
    (they taught me all i knew);         /\         adrian cybriwsky

    and how and where and who. (kipling) /\                                
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



Mon, 22 Nov 1999 03:00:00 GMT  
 Making a VB app to run in a CD-Rom


21:45:57 GMT):

Quote:
>play = sndPlaySoundA ("\file.wav",....)
>Of course this only works while the files are on my fixed disk, but as soon
>I pass them to a Cd-Rom.....

See "App.Path" in the docs and use directories relative to
this.

Mathias Schiffer, Germany
-----------------------------------------------
VB-FAQ: http://home.sol.no/jansh/vb/default.htm
NG-tips: http://www.rat.de/metty/vbnews



Mon, 22 Nov 1999 03:00:00 GMT  
 Making a VB app to run in a CD-Rom

Since u are going to press a cd, you can decide what directory names you
want. For exmaple, I use subdirectory name "\avi" to store videos. I
declare a string as global variable and named it ProjectPath. I do a lazy
way for deciding what CD-ROM drive letter by asking the user to key it in
upon prompt. I stored this CD-ROM drive letter in a varaible called CDROM
and I've the path to my images as such:
        ProjectPath= CDROM & ":"
so to access my video, the path to it will be:
        ProjectPath & "\avi\video1.avi"

Hope this help.

Regards,
Issey



Quote:

> I am making a multimedia app in VB4 and I have some doubts about being
able
> to distribute it on CD.

> I am dealing with files like this:
> filename = "\directory\file.avi"
> open "\directory\file.txt" for input...
> play = sndPlaySoundA ("\file.wav",....)
> Of course this only works while the files are on my fixed disk, but as
soon
> I pass them to a Cd-Rom.....

> So, I would appreciate if anyone could give me some details about how to
> load the same files as if they were on a Cd-Rom (some users may have
their
> CD on d,e or f drive...???)

> Many thanks
> Paulo Proen?a



Mon, 22 Nov 1999 03:00:00 GMT  
 Making a VB app to run in a CD-Rom

You didn't sate wheither or not your application will be running off
of the CD ROM as well.  If it will be then you can always get the info
you want from the App.Path.

I have a class lib that will allow you to find what the drive letter
of the CD ROM is as well.

Cheers
Duncan



Quote:

>I am making a multimedia app in VB4 and I have some doubts about being able
>to distribute it on CD.

>I am dealing with files like this:
>filename = "\directory\file.avi"
>open "\directory\file.txt" for input...
>play = sndPlaySoundA ("\file.wav",....)
>Of course this only works while the files are on my fixed disk, but as soon
>I pass them to a Cd-Rom.....

>So, I would appreciate if anyone could give me some details about how to
>load the same files as if they were on a Cd-Rom (some users may have their
>CD on d,e or f drive...???)

>Many thanks
>Paulo Proen?a



Tue, 30 Nov 1999 03:00:00 GMT  
 Making a VB app to run in a CD-Rom

You didn't sate wheither or not your application will be running off
of the CD ROM as well.  If it will be then you can always get the info
you want from the App.Path.

I have a class lib that will allow you to find what the drive letter
of the CD ROM is as well.

Cheers
Duncan



Quote:

>I am making a multimedia app in VB4 and I have some doubts about being able
>to distribute it on CD.

>I am dealing with files like this:
>filename = "\directory\file.avi"
>open "\directory\file.txt" for input...
>play = sndPlaySoundA ("\file.wav",....)
>Of course this only works while the files are on my fixed disk, but as soon
>I pass them to a Cd-Rom.....

>So, I would appreciate if anyone could give me some details about how to
>load the same files as if they were on a Cd-Rom (some users may have their
>CD on d,e or f drive...???)

>Many thanks
>Paulo Proen?a



Mon, 06 Dec 1999 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Running app from CD-ROM

2. installation and running an app from cd-rom

3. Accessing file from one CD-ROM in a multiple CD-ROM system

4. How to change Multi Media CD-ROM in two or more CD-ROM system

5. Running VB EXE on load of CD-ROM

6. Running VB Created Program from CD-ROM only

7. Run VB app directly from CD without running setup

8. Making floppies from CD-ROM?

9. help w/ cd-rom and cd-r/cd-rw program, please

10. Cd rom crashes app

11. Open CD Rom Door Crashes app

12. Database App on CD-ROM

 

 
Powered by phpBB® Forum Software