문제

Is there a Perl command that lets me get the minimum supported OS for any given binary?

You can manually get that information by running "link /dump /headers [binaryFile]" and looking for the "subsystem version" link. I don't want to use that since it's got really bad perf.

Thanks

도움이 되었습니까?

해결책

If you need this for Windows, use get_manifest from Win32::Exe. You will need to install it first.

다른 팁

If there's a command that gets what you want, why not just run that command?

You can use backticks or qx// in Perl to get a command's output

eg:

my $output = `command arg1 arg2 ...`;

Or, if you want an array of lines:

my @lines = `command arg1 arg2 ...`;

Then you can use Perl's normal facilities for scanning that output for patterns you're interested in.

Also, your command looks like it is for Windows - is that true? If so, you should add a Windows tag.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top