athanasia has asked for the wisdom of the Perl Monks concerning the following question:

Dear monks,

I have a perl standalone executable (myscript.exe) which I have generated via the pp option of PAR::Packer. This runs fine in Windows Vista (Home Premium) when I have logged in as Administrator.
Because, of course, I can not rely on a user running my app as an administrator, I want to ensure that right after the user double clicks my exe, the latter will ask for elevated administrator privileges and Window's UAC will handle it from that point on (hopefully :-) ).

After googling, I found the following posts that present some solutions:
http://blogs.msdn.com/cheller/archive/2006/08/24/718757.aspx
Re: (OT) Windows Vista UAC
but none of them worked for me.

To be more precise, I created the following manifest file, called myscript.exe.manifest and placed it in the same directory as myscript.exe:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1. +0"> <assemblyIdentity name="myscript.exe" processorArchitecture="X86" version="1.0.0" type="win32"/> <description>My Vista compatible application</description> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="requireAdministrator" uiAccess="False"/> </requestedPrivileges> </security> </trustInfo> </assembly>
I then tried running my executable, but an error occurred, 'The application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem'. I saw a similar issue being reported a year and a half ago in
How can I integrate within the PDK perlapp the manifest assembly workaround for Vista UAC?
but there did not seem to be a solution for it back then.
As a last resort, I followed the instructions here:
http://xenomorph.net/files-section/programming/embed-manifest-into-exe/
i.e. downloaded MSDN Software Developer kit (for mt.exe) and executed the command
mt.exe -manifest myscript.exe.manifest -outputresource:myscript.exe;#1
but no luck again (perhaps cos all these posts imply VB and not Perl ?). The command mt.exe seems to be executed without warnings or errors, however, the size of the exe is significantly reduced and when I run my exe, I get the same error message!
Hopefully, some of you have run into this issue and have some useful suggestions to offer :-)

Regards,
Athanasia

Replies are listed 'Best First'.
Re: Integrate manifest to perl executable generated with PAR::Packer's pp
by Anonymous Monk on Nov 06, 2008 at 12:41 UTC