View Full Version : Patch... not quite
NewsArchive
06-26-2007, 08:12 AM
Have now tried the scenario outlined previously.... but it appears to be
installing the NON-manifest (i.e.smaller) version in *both* O/S.
i.e. it doesn't install the 'manifest+' version on my new Vista machine
I can tell because file sizes are 645kb (normal) vs 648kb (manifest'd)
Clips attached of the relevant section...
Steve Bywaters
NewsArchive
06-26-2007, 08:12 AM
Works fine here. I have just tested this on XP SP2.
The test app installed a "manifested" sbuilder.exe. Then the installer
patched it down to an "un-manifested" sbuilder.exe.
If you are interested, please post your uninstall .log to find out if the
patch executed.
Friedrich
NewsArchive
06-26-2007, 08:13 AM
BTW, this is my code (see attached screenshot).
Friedrich
NewsArchive
06-26-2007, 08:14 AM
Sorry, should read:
"I have just tested this on XP SP2 and Vista64 Ultimate".
On XP, I see the "un-manifested" file. On Vista64 Ultimate, I see the
"manifested" file.
Friedrich
NewsArchive
06-27-2007, 03:52 AM
Friedrich,
I have something strange going on here: the Vista-condition if/else is
definitely working: I see the appropriate message boxes I put in, for XP and
Vista.
But I also see that the *wrong* file is being applied to each O/S - XP
gets the (larger) manifest'd one... Vista gets the smaller,
unmanifest'd one!
I attach:
* a clip of the two versions of the exe in their appropriate folders
('normal'/XP in StoreMgr.5, Vista in 'VistaExe' sub-folder)
* relevant pics of portions of my script
* both XP & Vista logs.
???
Steve
NewsArchive
06-27-2007, 03:53 AM
A. You need to embed the manifest BEFORE you sign the .exe, otherwise
you'll corrupt the signature.
B. That said, I'd try it a bit differently.
1. You already have a Vista directory
2. Make a corresponding XP directory.
3. Copy your .exe into both of them from your compile directory.
4. In the vista directory, add manifest and then sign
5. In the xp directory, just sign
I tested this, and it does work. However, my installed .exe is 311K in each
case, regardless of whether or not it has the embedded manifest.
But the XN Resource editor verifies that the patched version does not
contain a manifest.
Jane
NewsArchive
06-27-2007, 03:53 AM
Jane,
I understand what you say re. manifest/sign ordering... makes sense.
But I don't understand the distinction, otherwise.... there's an extra
folder... so???
You *were* using Patching?
'Cos if not, it bloats out the install-exe size (because 2 distinct exe
included), which is unacceptable.
Patching appears to minimise this... appears to do it really well, apart
from this 'greebly'.
Steve Bywaters
NewsArchive
06-27-2007, 03:53 AM
Steve,
I think Jane means the application executables (with and without the
manifest) do have an identical file size of 311K. I noticed the same here.
My test .exe (one is located in the "XP" sub-folder, the other in the
"Vista" folder) is always 3,688K.
Friedrich
NewsArchive
06-27-2007, 03:55 AM
> A. You need to embed the manifest BEFORE you sign the .exe, otherwise
> you'll corrupt the signature.
Jane - just tried that, but SB doesn't like it...now there's a compile
error: "Code signing process failed"
Steve Bywaters
NewsArchive
06-27-2007, 03:55 AM
Steve,
What you do (as I understand it) is, you code-sign the .exe, copy that
code-signed .exe to another location, embed the Vista manifest and code-sign
that (copy).
So you are code-signing an already code-signed .exe. This is not possible
and the Microsoft code-signing tool returns an error ;-)
Friedrich
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
"point. click. ship" - that's SetupBuilder 6.5
Create Windows Vista ready installations in minutes
-- Official Comodo Code Signing and SSL Certificate Partner
NewsArchive
06-27-2007, 03:55 AM
Of course - so it should be:
* copy
* code-sign original
* embed manifest
* code-sign copy
I'll try it....
.... it compiles, yes.
Steve Bywaters
NewsArchive
06-28-2007, 02:04 AM
Yes, Friedrich, that's what I meant.
But as far as his question about my "extra" folder...
In his script it appears that his development compile directory is
....TCS\StoreMgr.5
His script signs storemgr.exe and then copies it to the TCS\StoreMgr.5\Vista
directory.
Then his script attempts to insert a manifest into the already signed app
(which is a no-no), and then to sign the app AGAIN.
IOW, he's using the original compile folder for one version, the Vista
folder for the other, and using those to arrange his patch.
I said he needs to leave the original app alone in this scenario (and
preferably re-compile it, as I couldn't tell from his shots whether he might
have ticked the "permanent" check box).
Make a copy of the unmodified app to his Vista folder
Make another copy of the unmodified app to another (XP) folder.
Manifest and sign the app in the Vista folder
Just sign the app in the XP folder.
Then install one of those apps "always" and use the other app as a patch.
The screen shots I posted last night illustrated this, and worked (with the
only strangeness being that the patched version didn't shrink by the 3K that
had been added by the manifest). Also, installing the patch creates a
backup of the unpatched app (installdir\BACKUP\appname.0001), and in the
interest of tidiness I had my sample script delete that backup file.
My compile worked fine that way (screen shot attached), as did the
installation.
My test app is small - 306K. The installer using the patch trick is 302K.
If I clear the patch and deploy both versions without it, the installer is
431K. Generator is using "standard" compression.
Jane
NewsArchive
06-28-2007, 02:04 AM
Hi Jane,
Yes, absolutely correct!! What you said is the *optimal* way to do this.
My test script does the same. I am using two sbuilder.exe files - one has a
manifest, the other one has not. File size is 3,688K in both cases.
The resulting setup.exe (using "standard" compression) is 1,533K and
includes both sbuilder.exe versions. Not bad. The same installer without
using patching would result in a 2,895K setup.exe.
Thank you for all your support here on the NG and for your help improving
the SetupBuilder product line!
Friedrich
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
"point. click. ship" - that's SetupBuilder 6.5
Create Windows Vista ready installations in minutes
-- Official Comodo Code Signing and SSL Certificate Partner
NewsArchive
06-28-2007, 02:04 AM
Thank YOU for an awsome product!
Jane
NewsArchive
06-28-2007, 02:04 AM
Jane & Friedrich,
After some time *away* from the computer <g>, it suddenly came to me what
you meant, and I 'saw the light'!
I re-organised and did the double copy from compile folder to both XP and
Vista folders.... (btw these can now optionally have 'permanent' code-sign
and manifest, since they are refreshed each time anyway).... I see your
point and I think I get it!
As I pointed out (and Friedrich and yourself have confirmed) this is a
*very* size-efficient way to do the 'alternative version' install.
Because it is a touch tricky to get one's head around, may I suggest
there's a how-to or formal example on this subject in the docs., using
exactly this approach? ( If for no other reason than to show off all the
research that has been done on Vista wrt SB6! ;-)
Now if I can just resolve this registry/vitualization issue.....
S.
NewsArchive
06-28-2007, 02:04 AM
Steve,
I've been playing with SetupBuilder longer than you have, but Friedrich's
magic patch approach was something that hadn't occurred to me until he
mentioned it in a recent post. The demo installer I threw together last
night was trying to translate his concept into a script that actually
worked. I certainly do appreciate the "aha" lightbulb moment...LOL...
As for Vista's file and registry virtualization and how manifests relate to
that... the clarionmag.com articles I did a couple of months ago have some
simple apps (and a lot of screen shots) to show what's going on. That's how
I learn best myself - putting together an test app that lets me kick the
tires.
Jane
NewsArchive
06-28-2007, 10:59 AM
Steve,
I agree. I think it's time for a "SetupBuilder Tips and Tricks, How-To, and
Beyond" manual. I am still learning new things about SetupBuilder on a
daily basis. The underlying technology is quite powerful and I really enjoy
all the discussions here on the NG. I believe we are only using 30%-40% of
what is possible with SetupBuilder right now.
I have written a "Everything you ever wanted to know about Vista
installations but were afraid to ask"(tm) whitepaper. My goal was to
summarize the experience that we gained during our and our clients' Vista
journey. But Jane did such a fantastic (let me repeat that, fantastic!) job
with all the clarionmag.com Vista articles. I cannot compete with that :)
Friedrich
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
"point. click. ship" - that's SetupBuilder 6.5
Create Windows Vista ready installations in minutes
-- Official Comodo Code Signing and SSL Certificate Partner
NewsArchive
07-07-2007, 06:25 AM
Hi Jane,
Almost there but I get an error:
In your terminology it would be "The file yada is not a valid previous
version and could not be upgraded.
I presume it was in the patch command.
What did I not set properly?
Thanks!
Lynn
NewsArchive
07-10-2007, 02:44 AM
Figured it out. Errors on test but not on a real install.
Go figure.
Lynn
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.