Hi, It may have nothing to do with paths.
Your '$play_file' param needs to be vmidi.exe path_to_midi_file. It currently works on one machine because C:\Program Files\vanBasco's Karaoke Player\vmidi.exe is registered with shell to execute MIDI files. On the machine where it does not work, either it isn't, or something else prevents shellexecute from working. In any case, 3rd param should be a command line so you need to include the exec name. (not the full path to the exec). Regards Mark Spencer Chase wrote: > Greetings , > > I know that everyone likes a working or not working total script. In this > case it is not > going to be easy for someone else to test so I will start with just a snip > and try to > explain the problem. I can send a whole script but it would require > installing programs > and text files etc. to really test it. I will send the mess of a script (I > tend to write > really rambling garbage with the hope of cleaning it up some day and rarely > do) to anyone > who does want to install the required program etc. > > Win32::Process::Create( my $process, > $player, > $play_file, > 0, > DETACHED_PROCESS, > ".") || die "Create: $!"; > > I am using win32::process as above. I need to start an application that, > unfortunately is > in the following location: > C:\Program Files\vanBasco's Karaoke Player\vmidi.exe It has both a ' and > spaces in it so > I can not figure out how to treat it in "" or '' strings. I read the path > from a text file > just as it is above and assign this to the variable $player the other > variable $play_file > is a MIDI file that the application will open and is in the working directory > although it > can also have a path added to it. The above snip of code works fine on one > computer (the > one I am developing it on) but not on another win xp machine. I get an error > from die > since the process can not be created. I have tried all sorts of combinations > of "" '' > single and double \\ / \' for the ' in the path, thinking that I might get > something that > works on both computers. I can only get it to work by reading C:\Program > Files\vanBasco's > Karaoke Player\vmidi.exe from a text file (a config file) and assigning it to > $player.It > may also be that permission is needed to start a process but I thought I was > avoiding this > by using win32::process. > > Should the name of the process as used above work on all win computers? It it > just a > permission problem? If so, what can I do to assure that I can run this > application on > other computers not knowing what permissions and passwords are in effect? > > -- > Best regards, > Spencer Chase mailto:[EMAIL PROTECTED] > 67550 Bell Springs Rd. > Garberville, CA 95542 Postal service only. > Laytonville, CA 95454 UPS only. > [EMAIL PROTECTED] > http://www.spencerserolls.com > http://www.spencerserolls.com/MidiValve.htm > (707) 984-8356 > > _______________________________________________ > Perl-Win32-Users mailing list > Perl-Win32-Users@listserv.ActiveState.com > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs