mdog has asked for the wisdom of the Perl Monks concerning the following question:
I want to get the results of the windows program tlist.exe in a variable. This is easily accomplised by doing:
$tlist = `tlist`;
And if it is perl.exe that is running the script, the tlist window never shows up. If I run it with wperl.exe, the tlist window flickers up and disappears.
How can I get the results of tlist into a variable while my script is running under wperl.exe without the tlist window showing up?
I have tried using Win32::Process but 1.) I can't get it to start tlist in a non-windowed environment and 2.) I don't know how I could even get the results of the "forked" tlist back in my original script.
Any light that could be shed would be greatly appreciated!use Win32::Process; Win32::Process::Create($ProcessObj, "C:\\windows\\system32\\tlist.exe", "", 0, "CREATE_NO_WINDOW, ".")|| die ErrorReport();
Thanks,
Matt
|
|---|