Expand x86.exe to 'C: \ Windows \ System32' under Windows x86 and x64?

I would like to make my installer compatible with both x86 / x64 windows , that means portability.

I made an innosetup installer just to extend the x86 CLI executable and I need to deploy it to the C: \ windows \ system32 directory even if the installer is running Windows x64 , because otherwise if I expand it to the C: \ Windows directory \ Syswow64 then exe is not recognized under Windows x64 CMD >.

So how am I supposed to set this property to make it portable with the above condition ?:

ArchitecturesInstallIn64BitMode= ???

      

And what flags should I use when extending the file here:

Source: {sys}\My_x86_application.exe; DestDir: {sys}; Flags: ??? 

      

I've played around a bit with some flags like 32Bit

, 64Bit

and Is64BitInstallMode

, but I can't get the expected result, because if I know that limited constants are like {syswow64}

installing an error under Windows x86 ...

UPDATE

This is an important part of my install script, but it is wrong, it should be compatible with x86 and x64 windows (portable) and only expand files Source: {sys}\*

to C: \ Windows \ System32 under both windows (using a constant {sys}

to find the dir path of course).

[Setup]
DefaultDirName={pf32}\{#AppName}
ArchitecturesAllowed=x86 x64
ArchitecturesInstallIn64BitMode=x64

[Files]
Source: {app}\*; DestDir: {app}; Flags: ignoreversion
Source: {sys}\*; DestDir: {sys}; Flags: ignoreversion 64bit

      

-1


source to share


1 answer


Answers in parts like your question:

  • ArchitecturesInstallIn64BitMode

    Valid values ​​are one or more of the following, separated by spaces:

    • x64

    • ia64

Default value: (space)

Description: Specifies the 64-bit architecture (s) on which the installer should install in 64-bit mode. If this directive is not specified or empty, the installer will always be installed in 32-bit mode. Typically you should not change this default directive unless your application contains native 64-bit binaries.

You have an x86 exe file , so leave it blank .

  1. Source

    (required)

Description: The name of the source file. The compiler will add the path to the source directory of your installation if you do not provide the full path name.

Example:



Source: "My_x86_application.EXE"

      

Leaving it without any path like the above entry might be optimal (for small projects, because it will mess up the files to be deployed using the install script). Also, beware that Constants can only be used when a flag is specified external

, as the compiler does not do any constant translation. So the following entry:

Source: {sys}\My_x86_application.exe; DestDir: {sys}

      

actually expects to have a binary stored in a subfolder of {sys}

the config-script directory. If it is not, compilation will fail.

  1. DestDir

    (required)

I think you can always specify System32 using {win}\System32

. Since the x86 and x64 version of Windows contains the System32 directory .

  1. For Flags

    further clarification of doubt, visit.

EDIT: Save the iss file in the same folder where your x86 exe file exists. Then launch it.

+2


source







All Articles