Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inno Setup RegAsm.exe Errors

I am trying to build a 32/64bit installer all in one. The only thing that is different on a 32bit vs. a 64bit machine is a call to RegAsm.exe. For a 64bit machine that code has to look at the 64bit framework and for a 32bit it looks at the standard framework.

32bit: "C:\windows\microsoft.net\framework" 64bit: "C:\windows\microsoft.net\framework64";

I have my package setup to run Install actions. For my 64bit action I have the check enable for IsWin64.

Filename: {dotnet4064}\Regasm.exe; Parameters: """mydll.dll"" /codebase"; WorkingDir: {app}; StatusMsg: "Registering Add-In"; Flags: RunHidden; Check: IsWin64;

Several lines of the log file before the error

2012-12-05 14:58:53.233   Installing the file.
2012-12-05 14:58:53.281   Successfully installed the file.
2012-12-05 14:58:53.281   -- Icon entry --
2012-12-05 14:58:53.281   Filename: C:\Documents and Settings\All Users\Start Menu\Programs\myprogram\my program\Uninstall  myprogram.lnk
2012-12-05 14:58:53.281   Creating directory: C:\Documents and Settings\All Users\Start Menu\Programs\myprogram\my program
2012-12-05 14:58:53.483   -- Icon entry --
2012-12-05 14:58:53.483   Filename: C:\Documents and Settings\All Users\Start Menu\Programs\myprogram\my program\myprogram.lnk
2012-12-05 14:58:54.224   -- Icon entry --
2012-12-05 14:58:54.224   Filename: C:\Documents and Settings\All Users\Desktop\myprogram.lnk
2012-12-05 14:58:54.281   Fatal exception during installation process (Exception):
                          Internal error: Cannot run files in 64-bit locations on this version of Windows.
2012-12-05 14:58:54.281   Exception message:
2012-12-05 14:58:54.281   Message box (OK):
                          Internal error: Cannot run files in 64-bit locations on this version of Windows.
2012-12-05 14:58:54.926   User chose OK.
2012-12-05 14:58:54.926   Message box (OK):
                          Setup was not completed.

                          Please correct the problem and run Setup again.
2012-12-05 14:59:00.222   User chose OK.
2012-12-05 14:59:00.222   Rolling back changes.

This all works fine on a 64bit machine. In a 32bit machine I get an error:

Internal Error: Cannot run files in 64-bit locations on this version of Windows

I've been all over the help documentation and google and cannot lock down a reason as to why this is happening. Any help is appreciated.

[Run]
Filename: "{dotnet40}\Regasm.exe"; Parameters: "My.TaskPane.dll"; WorkingDir: "{app}"; Flags: runhidden; StatusMsg: "Registering MyTaskPane Add-In"
Filename: "{dotnet4064}\Regasm.exe"; Parameters: "My.TaskPane.dll"; WorkingDir: "{app}"; Flags: runhidden; StatusMsg: "Registering My TaskPane Add-In"; Check: IsWin64
Filename: "{dotnet40}\Regasm.exe"; Parameters: "My.TaskPane.dll /codebase"; WorkingDir: "{app}"; Flags: runhidden; StatusMsg: "Registering My TaskPane Add-In"
Filename: "{dotnet4064}\Regasm.exe"; Parameters: "My.TaskPane.dll /codebase"; WorkingDir: "{app}"; Flags: runhidden; StatusMsg: "Registering My TaskPane Add-In"; Check: IsWin64
Filename: "{app}\My Software Suite.exe"; Parameters: "/register"; WorkingDir: "{app}"; Flags: PostInstall; Description: "Register the My Software Suite"

I resolved this by adding: ArchitecturesInstallIn64BitMode=x64 and then using Check: Is64BitInstallMode

like image 288
user1879966 Avatar asked Dec 05 '12 17:12

user1879966


1 Answers

I resolved this by adding: ArchitecturesInstallIn64BitMode=x64 and then using Check: Is64BitInstallMode

like image 101
user1879966 Avatar answered Sep 17 '22 20:09

user1879966