perldoc Win32::Process! The main problem is I can not 'invoke' pdf files directly using it.
OTOH I've almost solved this by determining of associated to '.pdf' command line and invoking that file. So, following works (with console window appearing for half of a second and then disappearing):
This works good. May be it is needed to search in registry instead of `assoc` and `ftype`. When I'll come with a final solution I'll probably report this in 'code' section.use Win32::Process; sub ErrorReport{ print Win32::FormatMessage(Win32::GetLastError()); } my ($ftype) = `assoc .pdf`=~/=(.*)/; print $ftype,"\n"; my ($apath) = `ftype $ftype`=~/=(.*)/; print $apath,"\n"; my $procobj; $apath=~s/"%1"$//; $apath=~s/^"//; $apath=~s/"\s*$//; Win32::Process::Create( $procobj, "$apath", "x D:\\WORK\\Documentation\\cd-writing\\perl-technology\\root-cd-tk\ +\files\\PSAX1250_IG_R610_Iss1-mp.pdf", 0, NORMAL_PRIORITY_CLASS, "." ) || die ErrorReport();
In reply to Re: Re: How to 'invoke' a PDF file on Win32
by svad
in thread How to 'invoke' a PDF file on Win32
by svad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |