Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6829613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:31:15+00:00 2026-05-26T22:31:15+00:00

Ok, I know this is pretty specific, but I lost my whole working day

  • 0

Ok, I know this is pretty specific, but I lost my whole working day on it so I really need some rational explanation to it, so my boss and my wife wouldn’t fire me

According to MSDN :
The /regfile switch “Generates the specified .reg file for the assembly”
The /codebase switch “Creates a Codebase entry in the registry specifiying the file path for an assembly”

I guessed that it was 2 different ways of doing the same stuff. Truth was, I was wrong :

METHOD 1

C:\>"C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe" "C:\SERVER.dll" /regfile
Registry script 'C:\SERVER.reg' generated successfully

Reg File output :

REGEDIT4

[HKEY_CLASSES_ROOT\xfeed.server.X]
@="SERVER.XLS"

[HKEY_CLASSES_ROOT\xfeed.server.X\CLSID]
@="{8F4A5B5E-8DD7-30A3-993F-18C7E2C457CF}"

[HKEY_CLASSES_ROOT\CLSID\{8F4A5B5E-8DD7-30A3-993F-18C7E2C457CF}]
@="SERVER.XLS"

[HKEY_CLASSES_ROOT\CLSID\{8F4A5B5E-8DD7-30A3-993F-18C7E2C457CF}\InprocServer32]
@="mscoree.dll"
"ThreadingModel"="Both"
"Class"="SERVER.XLS"
"Assembly"="SERVER, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6e3de07ee666a5f5"
"RuntimeVersion"="v2.0.50727"

[HKEY_CLASSES_ROOT\CLSID\{8F4A5B5E-8DD7-30A3-993F-18C7E2C457CF}\InprocServer32\1.0.0.0]
"Class"="SERVER.XLS"
"Assembly"="SERVER, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6e3de07ee666a5f5"
"RuntimeVersion"="v2.0.50727"

[HKEY_CLASSES_ROOT\CLSID\{8F4A5B5E-8DD7-30A3-993F-18C7E2C457CF}\ProgId]
@="xfeed.server.X"

[HKEY_CLASSES_ROOT\CLSID\{8F4A5B5E-8DD7-30A3-993F-18C7E2C457CF}\Implemented Categories\        {62C8FE65-4EBB-45E7-B440-6E39B2CDBF29}]

METHOD 2

But when I execute the codebase switch command directly rather that using the reg file,
the keys impacted in the regsitry are different (and work, on the contrary of the preceding output)

C:\>"C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe" "C:\SERVER.dll" /codebase
Types registered successfully

Registry ouptut with codebase :

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{8F4A5B5E-8DD7-30A3-993F-18C7E2C457CF}]
@="SERVER.XLS"

[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{8F4A5B5E-8DD7-30A3-993F-18C7E2C457CF}\Implemented Categories]

[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{8F4A5B5E-8DD7-30A3-993F-18C7E2C457CF}\Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}]

[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{8F4A5B5E-8DD7-30A3-993F-18C7E2C457CF}\InprocServer32]
@="mscoree.dll"
"ThreadingModel"="Both"
"Class"="SERVER.XLS"
"Assembly"="SERVER, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6e3de07ee666a5f5"
"RuntimeVersion"="v2.0.50727"
"CodeBase"="file:///C:/SERVER.DLL"

[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{8F4A5B5E-8DD7-30A3-993F-18C7E2C457CF}\InprocServer32\1.0.0.0]
"Class"="SERVER.XLS"
"Assembly"="SERVER, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6e3de07ee666a5f5"
"RuntimeVersion"="v2.0.50727"
"CodeBase"="file:///C:/SERVER.DLL"

[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{8F4A5B5E-8DD7-30A3-993F-18C7E2C457CF}\ProgId]
@="xfeed.server.X"

As you can notice, stuff is now in the Wow6432Node and infos are much more comprehensive (notably CodeBase !!!)

If anyone could give me a rational reason to this, so I could avoid mentioning paranormal activity as a cause for a lost working day, I would be very grateful

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:31:15+00:00Added an answer on May 26, 2026 at 10:31 pm

    The codebase flag tells regasm that you want to register a DLL with a reference to the actual location of the file. This is useful if you have a dll being stored with a deployed application and you dont want it in the GAC. Without using this flag you must put your DLL in the GAC for its full functionality.

    The regfile flag tells regasm that you want to output a registry file INSTEAD of actually registering the dll.

    These can be used together if you want a registry file output that also contains the data for a dll location other than the registry, and I think you were assuming it was an either-or situation.

    EDIT: Further explanation based on your Comment.

    RegAsm normally registers the basic information about a .dll because the assumption is that it will be loaded into the GAC. Anything in the GAC is registered in a way that allows the system to control and load the assembly into memory. When you are on a 32bit system and use the codebase flag, it almost directly adds the “codebase” valuekey to the registry keys where the assembly is defined, then sets the value of this to the path where the .dll is physically located.

    When registered this way, it basically tells the computer and anything looking to use the assembly where it can find the code, and how to load it into memory. Sometimes this causes extra keys beyond what the GAC would need so that a calling process knows the best way to access the assembly.

    Now, since you are on a 64 bit system, you face an additional challenge. There are rules in place for keeping 32-bit and 64-bit applications separated throughout the computer. That is why there is 2 program files folders, and why the registry has the wow32 section. If a 32 bit dll gets registered, it needs to be stored in this section of the registry when it is done with the /codebase flag so that 32 bit applications can find it (this is the only part of the registry that they have access to). If it was a 64 bit dll, it would not need to be in this part of the registry.

    Now, because of this information, if you are using the output of the file to write a registry script portion of an installer, you will want to check the target machine to determine whether the information needs to be in the users wow section, or normal section of registry, and make the appropriate change to this script before running it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know there are plugins that do this, but I need something pretty specific
I know this is a pretty specific question but I managed to get some
Ok guys, I know this is pretty a rare case but I really would
This is a pretty specific question, but I need to load a Silverlight application
Good day, all. I know that this is a pretty basic question in terms
Pretty sure this has been asked already, but I don't know what to search
I know this subject should be pretty much dated by now, but I'm having
I know this type of question has been asked a lot, but I really
I know this programming language is pretty obsolete, but my company still uses it
I know this question has been asked many times, but here are my specific

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.