No install.exe in the archive?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Octopuss
Junior Member
Junior Member
Posts: 53
Joined: 2011-11-30, 13:15 UTC

No install.exe in the archive?

Post by *Octopuss »

I've downloaded the installer and when I unpacked the file (tcmd900ax64.exe), I noticed there was no install.exe inside.
I need to do this in order to use customized install.inf.

I've only noticed now becase previously, all those years, I just replaced the other files in the folder I stored the installation files and it never occured to me install.exe stopped being packed inside at some point.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Install.exe is now embedded into tcmd900ax64.exe itself, and zip-archive with other files is appended to it. You can modify that zip-archive, but don't forget that it must be packed with no compression.

You can read more here.
User avatar
Dalai
Power Member
Power Member
Posts: 10032
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

If you want to make things a little bit less painful regarding the repacking, you can take a look at my post here. It's about scripting the new installer but since it's only one command it can be easily run interactively.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Dalai,
So, WinRar is able to ignore digital signature?

Ah, you simply create new archive and append installer executable module...
Octopuss
Junior Member
Junior Member
Posts: 53
Joined: 2011-11-30, 13:15 UTC

Post by *Octopuss »

Jesus, that's horribly complicated.
What's the point of using any install.inf when it's impossible to customize it in any reasonable way?
What's described in those two posts barely makes sense to me :( And besides, I no longer use WinRAR.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Octopuss,
It is not much harder than in older versions.
Old scheme:

Code: Select all

STUB + ZIP(install.exe, install.inf, install.cab, ...) + SIGNATURE
New scheme:

Code: Select all

STUB_WITH_INSTALL_EXE + STORED_ZIP(install.inf, install.cab, ...) + SIGNATURE
So you can create STORED_ZIP with any ZIP archiver and then append it to STUB_WITH_INSTALL_EXE.
User avatar
Dalai
Power Member
Power Member
Posts: 10032
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

2MVV
There's no digital signature in the new installer (the old installer has one). I don't see how the resulting archive - regardless of how it gets created - would contain any signature either. Am I missing something?

2Octopuss
Maybe it's possible to use another packer like 7zip to do this. I don't know because I haven't checked that. It was difficult enough to create the archive in an unattended way, and the hardest part for me was to figure out how to tell the packer (WinRAR) which SFX header to use.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Dalai wrote:There's no digital signature in the new installer (the old installer has one). I don't see how the resulting archive - regardless of how it gets created - would contain any signature either. Am I missing something?
Official installer is signed after combining STUB_WITH_INSTALL_EXE with STORED_ZIP so SIGNATURE is added at the end of file and registered in PE header of stub (so you can see that the installer is signed in its properties or in UAC confirmations).
User avatar
Dalai
Power Member
Power Member
Posts: 10032
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

2MVV
Yes, I know, but I'm refering to the installer modified by users to create an unattended setup.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Octopuss
Junior Member
Junior Member
Posts: 53
Joined: 2011-11-30, 13:15 UTC

Post by *Octopuss »

MVV wrote:Octopuss,
It is not much harder than in older versions.
Old scheme:

Code: Select all

STUB + ZIP(install.exe, install.inf, install.cab, ...) + SIGNATURE
New scheme:

Code: Select all

STUB_WITH_INSTALL_EXE + STORED_ZIP(install.inf, install.cab, ...) + SIGNATURE
So you can create STORED_ZIP with any ZIP archiver and then append it to STUB_WITH_INSTALL_EXE.
I'm sorry, I have absolutely no idea what this is/means.
I use 7-zip, and I know about as much as selecting files and creating an archive.
Does anyone have idiot variant of instructions?
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Octopuss,
OK, I'll try to describe it step by step.

1. Extract STUB_WITH_INSTALL_EXE from tcmd900ax64.exe, it is in first 144896 bytes of the file (if you open file in Lister with FileInfo plugin, you will see that last file section has raw offset 20E00h and raw size 2800h, so executable module ends at offset 20E00h+2800h=23600h=144896). You can use any hex editor to copy this piece into new file, or you can use TC split function with 144896 bytes per file - tcmd900ax64.001 part is the STUB_WITH_INSTALL_EXE.
2. Extract all contents of tcmd900ax64.exe via Alt+F9 into some folder.
3. Edit install.inf unpacked on step 2 as you need.
4. Pack all files extracted on step 2 and modified on step 3 to ZIP archive with zero compression level, you can use TC internal packer or 7-Zip with corresponding compression level setting.
5. Combine STUB_WITH_INSTALL_EXE extracted on step 1 with STORED_ZIP created on step 4, you can do it using e.g. following console command:

Code: Select all

copy /b  STUB_WITH_INSTALL_EXE + STORED_ZIP  output_custom_installer.exe
Done, your output_custom_installer.exe is ready!
Octopuss
Junior Member
Junior Member
Posts: 53
Joined: 2011-11-30, 13:15 UTC

Post by *Octopuss »

There's no such thing as STUB_WITH_INSTALL_EXE, be it a foldrer or a file. Not sure about WinRAR, but 7-zip doesn't see anything like that when I open the archive.

@ghisler: couldn't you add a command line parameter to specify external install.inf maybe?
User avatar
Dalai
Power Member
Power Member
Posts: 10032
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

IMO the easiest way to create an unattended installer/setup is the old installer. Download and extract both the old installer and the normal TC setup (tcmd*.exe) into a directory of your choice, edit install.inf as needed and you're good to go. No need to repack anything, but you can do that if you like.

If you need to use the new installer, you must repack it because it expects its data appended to itself. There's a post by Ghisler somewhere in the forum explaining step by step how to create a modified setup (setting zip compression to 0 being the most important step).

Regards
Dalai
Last edited by Dalai on 2016-12-22, 21:28 UTC, edited 1 time in total.
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Octopuss,
STUB_WITH_INSTALL_EXE is not inside of archive, it is before archive in the file, and I've written how to extract it: split tcmd900ax64.exe with TC using part size 144896 bytes and rename first part tcmd900ax64.001 to STUB_WITH_INSTALL_EXE.
User avatar
Hacker
Moderator
Moderator
Posts: 13144
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

MVV,
Octopuss wrote:I use 7-zip, and I know about as much as selecting files and creating an archive.
Does anyone have idiot variant of instructions?
MVV wrote:raw offset 20E00h and raw size 2800h, so executable module ends at offset 20E00h+2800h=23600h=144896
:roll:

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Post Reply