in reply to Re: More Perl/Tk Queries with Spawned Processes under Win32
in thread More Perl/Tk Queries with Spawned Processes under Win32
This suggestion works very well, with some modifications... many thanks for your help!
I'm not sure if I should put this next item in another question by itself... but as it's related to the current program...
It's always a bugbear that when using Win32::Process::Create, complete paths need to be specified in the call, rather than letting the PATH search mechanisms find the program I want to run.
In the current example, this means we have to specify the call like:
Win32::Process::Create($ProcessObj, "C:\\windows\\system32\\notepad.exe", "notepad c:\\tmp\\del.me", 0, NORMAL_PRIORITY_CLASS, ".")|| die ErrorReport();
I'd like to know how people get around this problem, particularly when programs are placed in non-standard locations (although the programs may be found on PATH).
I've had a look in 'SuperSearch' but had no joy. One thought would be to collect the list of directories in PATH via File::Spec->path() and then use File::Find on the result. Alternatively, there seems to be a module on CPAN called File::PathList which (I think) returns the fully-pathed filespec directly.
Any other thoughts? ...and many thanks for any forthcoming suggestions :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: More Perl/Tk Queries with Spawned Processes under Win32
by BrowserUk (Patriarch) on May 09, 2006 at 03:46 UTC |