Jump to content

Inno Setup 6 on Windows XP


naaloh

Recommended Posts

Facing the same problem as many other people on this forum, namely trying to install software that would most likely work on Windows XP, but being hindered by the Inno Setup installer that would not run, I was, it seems, able to get farther than other people who posted, but still unable to install.

When I first ran the Setup.exe file, the "Setup.exe is not a valid Win32 application" message popped up. As advised on this forum, I changed the vaules of "OS Major Version" and "SubSys Major Version" in the executable from 06 to 05 (there are many tools that can do it and in fact it can be done with any hex editor, as the values seem to always be at 148 and 150 hexadecimal respectively).

That still didn't help much because running the patched executable just caused the box with the lines "Unable to execute file in the temporary directory. Setup aborted." and "Error 193: %1 is not a valid Win32 application." to appear. Using Process Monitor, it's possible see how the original Inno Setup executable creates a temporary executable in the temporary directory and using a file undelete tool (I used R-Studio, but I think any other would perform equally well), it's possible to recover the file after it's deleted when the setup is aborted. That Setup.tmp file, too, needs to have the "OS Major Version" and "SubSys Major Version" changed to 05, but even after patching you cannot just run it without any command line, as it gives the "Messages file "...\Setup.msg" is missing. Please correct the problem or obtain a new copy of the program." error.

The temporary setup file, I believe, is assembled from the data stored (in compressed form) inside the original setup file, so you cannot just patch the original setup file to fix the temporary one. The best thing I could do to work around it was to suspend the process of the original Setup.exe before the temporary Setup.tmp is executed with the AutoIt script given at https://www.autoitscript.com/forum/topic/180996-set-application-in-idle-state/?tab=comments#comment-1299592 (obviously, modified to run the Setup.exe executable and leave it suspended until commanded to resume it, see in the attachment) and then, using WinHex, open the Entire memory of the Setup.exe process and then modify the "OS Major Version" and "SubSys Major Version" values of the temporary file while it's still in RAM (it has to be done in two places).

That still brought no joy because the original Setup.exe, apparently, verifies the checksum of the temporary Setup.tmp after extracting it to RAM and before it's written to disk, so after resuming the patched process I just got "The setup files are corrupted. Please obtain a new copy of the program.". That still didn't cause me to give up, as I began searching for the checksum of the unmodified Setup.tmp in the original Setup.exe and to my joy was able to find out that it's stored as CRC32 in the "inverted" form (e. g. 05975E97 as 975E9705). So I patched that value in memory as well (it, obviously, can also be done on the Setup.exe file itself), changing it to the CRC32 of the modified Setup.tmp and it caused the CRC check to succeed.

You'd think that after all that effort I would be rewarded with the install wizard, but alas... The temporary temporary Setup.tmp did finally execute, but only to display "This program does not support the version of Windows your computer is running.". Having executed it once, it was no longer necessary for me to go through all the initial steps to do it again, as I could now see the command line with which it ran (I used Advanced Process Termination for that, but I think Process Explorer would do as well), in my case it was Setup.tmp /SL5="$360218,804352,0,O:\Install\Setup.exe" so I could simply rename Setup.tmp to Setup.exe and run it manually, but I couldn't make any further progress and I feel that I have to give up now.

If anyone can figure out a way past that (probably last) obstacle, I'd be extremely grateful, as I do need the software. I think it's some value stored somewhere in the original Setup.exe that can be modified, or perhaps there's a way to get Windows XP to report a higher version than it normally does, as one can certainly get it to report a lower version by setting it in the Compatibility tab or an executable's properties, so any advice would be appreciated.

Setup.exe.au3

Setup.tmp.part01.rar Setup.tmp.part02.rar Setup.tmp.part03.rar Setup.tmp.part04.rar Setup.tmp.part05.rar

Edited by naaloh
Link to comment
Share on other sites


Is the setup within the setup also an Inno package, or something else? The original package built with Inno, should have an .iss file, which is the script file that inno uses to install the package. An OS version can be specified in there. Also, either program's manifest can be blocking the install.

Link to comment
Share on other sites

4 hours ago, Tripredacus said:

Is the setup within the setup also an Inno package, or something else?


Apparently it is, at least it looks similar (and supports Inno Setup command line). I attached the first volumes of the archive with it (unmodified) to the first message and the last to this one (I had to split due to the size limit). I also attached the installation log to this message.

The manifest in this case is the same as on the older version, which does run on XP, so I don't think it's the case. The install script - maybe, but it's not possible to modify it, is it? That is unless it can be done directly in the operating memory. What is this script supposed to look like?



 

Setup.tmp.part06.rar Setup.tmp.part07.rar Setup.tmp.part08.rar Setup.tmp.part09.rar Setup Log 2020-09-08 #002.txt

Edited by naaloh
Link to comment
Share on other sites

It might indeed be the install script (the archive with which I attached to this message, after extracting it with innounp). Every entry under the [Files] section contains the "MinVersion: 0.0,6.0" parameter, which according to https://jrsoftware.org/ishelp/index.php?topic=setup_minversion means that it would require Windows to report at least version 6.0 and XP is, obviously, below that.

Only question is, what can be done about it?



 

install_script.7z

Edited by naaloh
Link to comment
Share on other sites

Is the split files complete? The forum only shows 6-9. Perhaps do not put this .tmp file onto the forum at all and put it somewhere else like a Google/OneDrive.

See if you can get the insides using Innounp: http://innounp.sourceforge.net/
Note: can't force https on that link.

With the .iss file you have, you can see exactly what the setup is going to do, and so you can modify it. For example, you may want to remove everything except the last line in [Run] section and everything except "createdesktopicon" in [Tasks]. For the MinVersion, XP should be set to 5.0. My reference .iss file is for a setup that is for XP and that is what it has. Example from that file:

Source: "{app}\setup.exe"; DestDir: "{app}"; MinVersion: 0.0,5.0; Flags: ignoreversion 

Since you have the .iss file, and can extract the files from the archive, you can repackage it using a modified .iss file if you wanted to create an XP installer.

Link to comment
Share on other sites

On 9 September 2020 at 2:38 PM, Tripredacus said:

Is the split files complete? The forum only shows 6-9.

The parts 1 to 5 are attached to the first post in this topic; like I said, I had to split due to the size limit. No, the Setup.tmp file cannot be read with Innounp


 

On 9 September 2020 at 2:38 PM, Tripredacus said:

Since you have the .iss file, and can extract the files from the archive, you can repackage it using a modified .iss file if you wanted to create an XP installer.

Repackage with what, the Inno Setup installation builder?

Edited by naaloh
Link to comment
Share on other sites

This setup requires the Common Controls for Vista, this is specified in the manifest. It may require .net Framework 1.1, 2.0 or 4.0.

Also the setup does not contain the installation files. There must be a different file that can be opened, or an archive that is included. It is safe to remove those attachments now.

Link to comment
Share on other sites

22 hours ago, Tripredacus said:

This setup requires the Common Controls for Vista, this is specified in the manifest. It may require .net Framework 1.1, 2.0 or 4.0.

Can the manifest be edited? Anyway, I doubt the manifest plays any part here because, as I have said, the manifest in this case is the same as on the older version, which does run on XP, and I do have the Microsoft .NET Framework 1.1 to 4.0 installed.

22 hours ago, Tripredacus said:

Also the setup does not contain the installation files. There must be a different file that can be opened, or an archive that is included.

The files are in the original Setup.exe (links to download multiple-part archive: 1 2 3 4), which contains the installation script and other installer files. It has to be modified somehow to allow installation on Windows XP. There's also an InnoSetup archive next to it (400+ MB), which contains some of the program files, and the rest are in the directory structure on the DVD.



 

Edited by naaloh
Link to comment
Share on other sites

Ah just looking now, it seems XP doesn't natively support the manifest, and will ignore it. Apparently, Vista also. So perhaps this is a dead end. That, however, doesn't invalidate that Common-Controls v6 is required. I would run depends on the setup.exe (formerly setup.tmp) and see if anything else is missing.

Otherwise, it is possible you can run into an issue with the certs that are in there as well.

Since the issue isn't really to do with the original setup, the one that uses the .iss. But perhaps, you can still rebuild the whole thing since you have both the files and the .iss. You'd need to change all those minVersion values. When doing this, do not include the setup.tmp/exe from before, perhaps the rebuild will create a new one. And see about using an older version that v6, if you use v6 you probably don't have to change the .iss. I haven't used inno setup in a long time.

Link to comment
Share on other sites

2 hours ago, Tripredacus said:

Since the issue isn't really to do with the original setup, the one that uses the .iss.

The issue is, apparently, with the installation script that requests Windows version 6.0 at least. The question is, can the script be edited without recompiling the whole installation package? Or, is there any way to make Windows report a higher version than it actually is (kind of like  the compatibility mode does, even though it reports a lower one)? 
 

Link to comment
Share on other sites

1 hour ago, naaloh said:

 Is there any way to make Windows report a higher version than it actually is (kind of like  the compatibility mode does, even though it reports a lower one)? 
 

Application Verifier.

Link to comment
Share on other sites

5 hours ago, Tripredacus said:

Ah just looking now, it seems XP doesn't natively support the manifest, and will ignore it.

It does, but elements specific to newer OS are ignored.

6 hours ago, Tripredacus said:

That, however, doesn't invalidate that Common-Controls v6 is required.

Which is a thing since XP. Applications have to require this version via manifest if they want it, which is located only somewhere in WinSxS folder, otherwise, they get v5.82, which is located in System32 folder. v6 supports new theming features of XP.

Link to comment
Share on other sites

13 hours ago, XPRTM said:

Application Verifier.

Thanks a lot (wonder why nobody mentioned this application before). So I installed the Microsoft Application Verifier version 4.0.0665, which seems to be the last one to support Windows XP (correct me if I'm wrong), but when I added the temporary Setup executable and enabled the HighVersionLie test, the executable just crashed when I tried to run it. Are there any specific values I should have entered as Properties for the HighVersionLie test (see the attached screenshot) to simulate Vista?

 

When I looked up Application Verifier here, I also saw fcwin2k (Force Compatibler For Windows 2000) mentioned. I got that one to try and was able to run the temporary Setup executable, but apparently, fcwin2k does not allow to specify the command line parameters for the executable (when I enter them into the "File" field, all the relevant buttons become inactive). I tried executing the original Setup.exe with fcwin2k (see the second screenshot attached), repeating all steps described in the first post, but I just got the usual "This program does not support the version of Windows your computer is running". Since I cannot enable logging without command line parameters, I don't know which OS version was passes to the child process Setup.tmp that gives the error message.

 

Any advice?
 

HighVersionLie.png

fcwin2k.png

Link to comment
Share on other sites

OK, I now understand that after you enter the OS Ver parameters and use CompatSave in fcwin2k you can run the executable from anywhere with any command-line options, but it still doesn't help, as after setting the parameters to Windows VIsta, I still get the same "This program does not support the version of Windows your computer is running" and the installation log file still reports "Windows version: 5.1.2600 SP3  (NT platform: Yes)".

UPDATE: It looks like fcwin2k is not able to emulate for a file named Setup.exe (perhaps because there's a system file of the same name). After I renamed the installation file and set it up in fcwin2k, the installation started to crash just like with Application Verifier. I wonder what's causing it to crash and if it's possible to fix it...

I attached the archived log of the Process Monitor, which list the file system and registry calls of the temporary Setup executable, to this message in case anyone want to research it.
 

Logfile.7z

Edited by naaloh
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...