Hi,

I have it on my 'todo' list to add 'Win32::Exe::PP' to the Win32::Exe dist.

What i think it will do is:

Split the PAR exec into 3 parts - exec stub, binary extract (libperl etc) and the appended zip.

extract the 'second' executable from zip.

Carry out all Win32::Exe operations on both the exec stub and the 'second' exe.

Win32::Exe::PP->write;

will join everything up again.

So then,

my $exe = Win32::Exe::PP->new('c:\\path\\to-par-exec.exe');
my $manifest = $exe->get_manifest;
$manifest->set_execution_level('requireAdministrator');
$exe->set_manifest($manifest);
$exe->write;

would do what you want.

But ......

I have not looked at PAR::Packer internals for quite some time, so the assumption that a pp exec is constructed in the three parts above may be wrong.


Regards

Mark

















On 10/02/2011 18:56, Michael Carman wrote:
There's a question on Stack Overflow
[http://stackoverflow.com/questions/4441767] about running a
PAR-packed application with elevated privileges. Since it hasn't
received any answers I'm forwarding it here:

Does anyone know how to make a PAR packed Perl application run with higher 
privileges?
I've read that there must be somewhere some kind of manifest file, but how 
should this file
look like and how to combine it with the PAR packed executable? This is still 
unknown to me.

If you have a SO account feel free to answer there. If not, I'll post
anything useful that comes out of this thread.

-mjc

Reply via email to