can not register IISModule x86 and x64?

mc 4,106 Reputation points
2024-06-30T09:07:07.85+00:00

I use this :install module /name:Module1 /image:myx64dll.dll

and this :install module /name:Module11 /image:myx86dll.dll

can not register it in one process.

bat or Process.Start

there will be error.

can not load arm64dll. when I use x64.

If I manually execute the command it is all ok. If I use the bat it is error.

Internet Information Services
{count} votes

2 answers

Sort by: Most helpful
  1. MotoX80 32,726 Reputation points
    2024-06-30T14:21:15.89+00:00

    Please remember that we can't see your screen. So when you say: "there will be error", we have no way of knowing what that error is. You have to provide specific details of what programs you are using, what the exact error message is, and it's really helpful is you provide an explanation of the overall goal that you are trying to accomplish. The solution to your problem may not have anything to do with the question that you are asking.

    Where is this "install" command coming from? Is this a Visual Studio command or a stand alone executable? In order to run it in a .bat file, you will need to provide the full path to the file if the folder is not listed in the system path.

    Open a command prompt with run as administrator and run this command.

    where install
    

    If it is not found, then you will need to search your C drive in order to find it.

    dir c:\install.exe /b /s /a
    

    In your bat file, include the full path to the executable. If there are spaces in the name, ie: in a "Program Files" subfolder, then you will need to include double quotes around the full path to the .exe.

    If you are actually trying to use Powershell's Install-Module cmdlet, then your bat file needs to run Powershell.exe and have it execute a script that contains the Install-module statement. Similar to the path issue, if you pass a parameter like "/image:myx64dll.dll", Powershell may not be able to find that file if it is not in the current working directory. You may need to include the full path to the dll.

    To capture the output of a command line program that you are trying to execute with a bat file you can redirect stdout and stderr to a file like this. Review any errors in the log file.

    someprogram.exe /somearg 1>c:\YourLogFolder\YourLogFileName.txt 2>&1
    
    0 comments No comments

  2. Lex Li (Microsoft) 5,237 Reputation points Microsoft Employee
    2024-07-01T06:49:07.63+00:00

    x86/x64/ARM64 registration is much more complex than ever, because of the details involved like WOW64 redirection, ARM64X (pure forwarders), etc. So unless you already master all of them, I suggest you copy everything httpPlatformHandler v2 does https://github.com/lextudio/httpplatformhandlerv2/blob/httpplatformhandler/src/Installers/Windows/AspNetCoreModule-Setup/ANCMV2/aspnetcoremodulev2.wxs and then drop in your own bits.

    Note that HttpPlatformHandler v2 also copied things from Microsoft's ASP.NET Core module, instead of rolling out its own from scratch.

    0 comments No comments