Re: Re: my kitgen kits drop the modified date from embedded files (windows)

Neil Bryant <[email protected]> Sat, 19 May 2012 21:58:23 -0700
Newsgroups gmane.comp.lang.tcl.starkit
Message-ID <CAKzejXowad-To3ED-GZwm67JXXXn0PruR1OuHp2VxOxHmJvyJA@mail.gmail.com>
--00235452f638c7558404c070a3d1
Content-Type: text/plain; charset=ISO-8859-1

Pat,

I want to thank you. Your instructions were exactly what I needed, and very
precise. I followed them, and have everything working properly.

As somebody who had just finished a project by deadline when this issue
popped up, I can't tell you how much stress you've saved me.

Thanks again,
Neil

On Mon, May 14, 2012 at 2:49 PM, Pat Thoyts <[email protected]> wrote:

> On 13 May 2012 22:31, Neil Bryant <[email protected]> wrote:
> > Nope. For what it's worth, it seems if I add any type of manifest to the
> > file, it mucks up file extractions.
> >
> > If I use the files from the tclkit goolecode site (eg,
> > tclkitsh-8.5.9-win32.upx.exe), file copies are correct. These exe's have
> no
> > manifest, and appear to have been built without need of one.
> >
> > I've been trying to compile with VC8, which needs a manifest, or it
> > complains it can't find the runtimes. With the manifest, it breaks the
> copy
> > datestamps. I can't (I don't think) compile without a manfest, since the
> exe
> > just won't run.
> >
> > I've been trying to compile in VC6, for comparison--to see if adding the
> > manifest changes things--but I'm not having luck getting it to compile at
> > all.
> >
> > Right now, I've stared at this too long, so I'm putting it down while I
> can
> > still form a sentence. I will pick it up later, or look into alternate
> forms
> > of extraction.
> >
> > If anybody has any thoughts, I would appreciate hearing them. If they are
> > simple enough for me to follow, I will attempt them =]
>
> You should not need to rebuild tclkit to update the manifest resource.
> However, you need to peform
> a couple of steps. The tclkit executable is a Windows PE executable
> compressed with upx and
> has a metakit database appended to the end. To change the resources
> the safest method is to
> split the file and decompress:
>  sdx mksplit tclkit.exe  # this yields tclkit.head (the exe) and
> tclkit.tail (the database)
> then
>  upx -d tclkit.head
> Now you can use the mt tool to merge the manifest update with the
> embedded manifest resource;
>  mt -inputresource:tclkit.head;#1 -manifest:admin.manifest
> -outputresource:tclkit.head;#1
> then rejoin the pieces into a tclkit again:
>   copy /b tclkit.head + tclkit.tail tclkit-admin.exe
> (you could re-compress tclkit.head again here if you want a small exe)
>
> Where admin.manifest contains just the new parts of the manifest required:
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
>  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
>    <security>
>      <requestedPrivileges>
>        <requestedExecutionLevel
>          level="requireAdministrator"
>          uiAccess="false"/>
>        </requestedPrivileges>
>       </security>
>  </trustInfo>
> </assembly>
>
> The above steps give me a tclkit executable that requests elevation as
> soon as I run it. However, if you are doing this you will
> probably need to sign such an executable using a valid authenticode
> certificate. You can't do that to a metakit based tclkit but
> you can do that using the vlerq based executables. So re-do the steps
> above using tclkit-gui.exe if you want to sign the exe.
>

-- 
You received this message because you are subscribed to the "starkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/starkit?hl=en
--00235452f638c7558404c070a3d1
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Pat,<br><br>I want to thank you. Your instructions were exactly what I need=
ed, and very precise. I followed them, and have everything working properly=
.<br><br>As somebody who had just finished a project by deadline when this =
issue popped up, I can&#39;t tell you how much stress you&#39;ve saved me.<=
br>

<br>Thanks again,<br>Neil<br><br><div class=3D"gmail_quote">On Mon, May 14,=
 2012 at 2:49 PM, Pat Thoyts <span dir=3D"ltr">&lt;<a href=3D"mailto:pattho=
[email protected]" target=3D"_blank">[email protected]</a>&gt;</span> wrote:<=
br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
<div class=3D"im">On 13 May 2012 22:31, Neil Bryant &lt;<a href=3D"mailto:n=
[email protected]">[email protected]</a>&gt; wrote:<br>
&gt; Nope. For what it&#39;s worth, it seems if I add any type of manifest =
to the<br>
&gt; file, it mucks up file extractions.<br>
&gt;<br>
&gt; If I use the files from the tclkit goolecode site (eg,<br>
&gt; tclkitsh-8.5.9-win32.upx.exe), file copies are correct. These exe&#39;=
s have no<br>
&gt; manifest, and appear to have been built without need of one.<br>
&gt;<br>
&gt; I&#39;ve been trying to compile with VC8, which needs a manifest, or i=
t<br>
&gt; complains it can&#39;t find the runtimes. With the manifest, it breaks=
 the copy<br>
&gt; datestamps. I can&#39;t (I don&#39;t think) compile without a manfest,=
 since the exe<br>
&gt; just won&#39;t run.<br>
&gt;<br>
&gt; I&#39;ve been trying to compile in VC6, for comparison--to see if addi=
ng the<br>
&gt; manifest changes things--but I&#39;m not having luck getting it to com=
pile at<br>
&gt; all.<br>
&gt;<br>
&gt; Right now, I&#39;ve stared at this too long, so I&#39;m putting it dow=
n while I can<br>
&gt; still form a sentence. I will pick it up later, or look into alternate=
 forms<br>
&gt; of extraction.<br>
&gt;<br>
&gt; If anybody has any thoughts, I would appreciate hearing them. If they =
are<br>
&gt; simple enough for me to follow, I will attempt them =3D]<br>
<br>
</div>You should not need to rebuild tclkit to update the manifest resource=
.<br>
However, you need to peform<br>
a couple of steps. The tclkit executable is a Windows PE executable<br>
compressed with upx and<br>
has a metakit database appended to the end. To change the resources<br>
the safest method is to<br>
split the file and decompress:<br>
=A0sdx mksplit tclkit.exe =A0# this yields tclkit.head (the exe) and<br>
tclkit.tail (the database)<br>
then<br>
 =A0upx -d tclkit.head<br>
Now you can use the mt tool to merge the manifest update with the<br>
embedded manifest resource;<br>
 =A0mt -inputresource:tclkit.head;#1 -manifest:admin.manifest<br>
-outputresource:tclkit.head;#1<br>
then rejoin the pieces into a tclkit again:<br>
 =A0 copy /b tclkit.head + tclkit.tail tclkit-admin.exe<br>
(you could re-compress tclkit.head again here if you want a small exe)<br>
<br>
Where admin.manifest contains just the new parts of the manifest required:<=
br>
<br>
&lt;?xml version=3D&quot;1.0&quot; encoding=3D&quot;UTF-8&quot; standalone=
=3D&quot;yes&quot;?&gt;<br>
&lt;assembly xmlns=3D&quot;urn:schemas-microsoft-com:asm.v1&quot; manifestV=
ersion=3D&quot;1.0&quot;&gt;<br>
 =A0&lt;trustInfo xmlns=3D&quot;urn:schemas-microsoft-com:asm.v2&quot;&gt;<=
br>
 =A0 =A0&lt;security&gt;<br>
 =A0 =A0 =A0&lt;requestedPrivileges&gt;<br>
 =A0 =A0 =A0 =A0&lt;requestedExecutionLevel<br>
 =A0 =A0 =A0 =A0 =A0level=3D&quot;requireAdministrator&quot;<br>
 =A0 =A0 =A0 =A0 =A0uiAccess=3D&quot;false&quot;/&gt;<br>
 =A0 =A0 =A0 =A0&lt;/requestedPrivileges&gt;<br>
 =A0 =A0 =A0 &lt;/security&gt;<br>
 =A0&lt;/trustInfo&gt;<br>
&lt;/assembly&gt;<br>
<br>
The above steps give me a tclkit executable that requests elevation as<br>
soon as I run it. However, if you are doing this you will<br>
probably need to sign such an executable using a valid authenticode<br>
certificate. You can&#39;t do that to a metakit based tclkit but<br>
you can do that using the vlerq based executables. So re-do the steps<br>
above using tclkit-gui.exe if you want to sign the exe.<br>
</blockquote></div><br>

<p></p>

-- <br />
You received this message because you are subscribed to the &quot;starkit&q=
uot; group.<br />
To post to this group, send email to [email protected]<br />
To unsubscribe from this group, send email to starkit-unsubscribe@googlegro=
ups.com<br />
For more options, visit this group at <a href=3D"http://groups.google.com/g=
roup/starkit?hl=3Den">http://groups.google.com/group/starkit?hl=3Den</a>
--00235452f638c7558404c070a3d1--