Results 1 to 5 of 5

Thread: Running Program from cdrom

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Location
    Holland
    Posts
    13
    I can get my program running right from cd(i'm burning it my self).
    A problem with that he can not find the file's in other maps on cd.
    I used the App.Path & "\his.txt"
    Bud that don't works.
    On my c: drive and others it's working fine.
    Can somebody help me with did?

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    cd

    App.Path and file could be your problem
    If your txt file is in your appfolder/myfolder/his.txt
    then the app.path will look for appfile/his.txt
    if your code states
    app.path & "myfolder/" & his.txt then it will find it.

    check your code and the location of your folders.
    if his.txt is in the appfolder then
    app.path & "his.txt" will work.
    Make sure you have the "/" add to your app.path

    If Right(App.Path, 1) <> "/" Then _
    appPath = App.Path & "/" _
    Else appPath = App.Path
    end if

    Hope this is some help.




    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Location
    Holland
    Posts
    13

    Question

    It still don't work
    Here below i have set the code i used
    maybe you can tel me what's wrong with it



    Form2.txtFileName.Text = App.Path & "\songtxt\Deuce.txt"

    Greatings

  4. #4
    Addicted Member JasonGS's Avatar
    Join Date
    May 2000
    Location
    California
    Posts
    155

    Exclamation

    Try this...
    Code:
    ' If your running your .EXE from the root (\) of the CD this should work...
    Dim cdRoot As String
    If Right$(App.Path, 1) = "\" Then cdRoot = App.Path Else cdRoot = App.Path & "\"
    Form2.txtFileName.Text = cdRoot & "songtxt\deuce.txt"
    
    ' If your running your .EXE from a subdir on the CD, such as x:\AUTORUN, then
    ' the following code should work...
    Dim cdRoot As String
    cdRoot = Left$(App.Path, 2) & "\"
    Form2.txtFileName.Text = cdRoot & "songtxt\deuce.txt"
    Before wasting a CD, test your CD by running this command... subst T: d:\folder_where_your_cd_stuff_is ...this will create a temporary drive T: that will emulate a CD-ROM drive for you to test your program!

  5. #5

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Location
    Holland
    Posts
    13

    Talking

    Heeeeeeee
    Thanks it's works ;-)))
    See You!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width