1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

Programming Problem in XP

Discussion in 'Windows XP' started by David Favin, 2005/05/25.

Thread Status:
Not open for further replies.
  1. 2005/05/25
    David Favin

    David Favin Inactive Thread Starter

    Joined:
    2004/07/08
    Messages:
    149
    Likes Received:
    0
    Troops:

    I have written a program in BASIC in which there is the line

    SHELL "START C:\QB45\WMPLAYER C:\QB45\RP022.MID "

    In the folder QB45 I have included the files wmplayer.exe (copied from WINMEDIA version 9.00.00.9280) and RP022.mid, a midi file.

    When I execute, in WINDOWS 98, the program that includes the above line it runs just fine.

    If I try to run this in WINDOWS XP with the same programs in the c:\QB45 folder I get an error message saying it cannot find the file.

    Can someone explain the reason for this?

    David Favin
     
    Last edited: 2005/05/25
  2. 2005/05/25
    Steve R Jones

    Steve R Jones SuperGeek Staff

    Joined:
    2001/12/30
    Messages:
    12,315
    Likes Received:
    252
    SHELL "START C:\QB45\WMPLAYER C:\QB45\RP022.MID "


    Might add .exe to wmplayer.
    Might try it without the " " .
     

  3. to hide this advert.

  4. 2005/05/25
    TonyT

    TonyT SuperGeek Staff

    Joined:
    2002/01/18
    Messages:
    9,072
    Likes Received:
    400
    If WMPlayer is the default paler asociated with midi files the all you should need is START C:\QB45\RP022.MID. That alone should invoke the default media player.
     
  5. 2005/05/25
    David Favin

    David Favin Inactive Thread Starter

    Joined:
    2004/07/08
    Messages:
    149
    Likes Received:
    0
    Tony T:

    I tried using your suggested line

    SHELL "Start \C:QB45\RP022.mid "

    and got the "bad command or file name" error message

    If I double click on the file \C:QB45\RP022.mid in WINDOWS EXPOLORER the association is with Real Player and the music plays just fine.I don't care if the association is with the Real Player or WINMEDIA. I just want some program to play this file.

    David
     
  6. 2005/05/25
    WhitPhil

    WhitPhil Inactive

    Joined:
    2002/01/07
    Messages:
    599
    Likes Received:
    4
    SHELL "Start \C:QB45\RP022.mid "

    Is this what the command looks like, or a typo?

    Should be

    SHELL "Start C:\QB45\RP022.mid "
     
  7. 2005/05/25
    JoeHobart

    JoeHobart Inactive Alumni

    Joined:
    2004/05/19
    Messages:
    919
    Likes Received:
    1
    SHELL "cmd /c "START C:\QB45\WMPLAYER C:\QB45\RP022.MID" "

    (i have no idea how to escape "'s in basic)
     
  8. 2005/05/26
    TonyT

    TonyT SuperGeek Staff

    Joined:
    2002/01/18
    Messages:
    9,072
    Likes Received:
    400
  9. 2005/05/27
    David Favin

    David Favin Inactive Thread Starter

    Joined:
    2004/07/08
    Messages:
    149
    Likes Received:
    0
    Tony:
    Thanks for that lead regarding programming statements. While it is good it really does not address my current problem. What I do not understand is why your first suggestion of using
    SHELL "START c:\QB45\RP022.mid"
    does not work. (Note in a previous thread this was presented with a typo.)

    I get the following error message
    c:\QB45\RP022.mid; %1 is not a valid win 32 application.

    If on the other hand I go to WINDOWS EXPLORER and double click on the file
    RP022.mid it comes up playing through its association with RealPlayer.

    Do you or anyone have any idea why it does not effect its association when executed from wiothin the BASIC program.?

    David FAvin
     
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.