I have written a class library using Visual Studio 2010 C# to read hardware information of a Computer (e.g. HDD/SSD). I will use this dll to create an installer using InnoSetup
Though its more than a year, I recently had the same problem and was able to rectify using the below script.
[Run]
Filename: "{dotnet20}\RegAsm.exe"; Parameters: /codebase YourDLL.dll; WorkingDir: {app}; StatusMsg: "Registering Controls..."; Flags: runminimized
If the file has be registered at initialize step, we can use one of the Inno setup's support functions.
function Exec(const Filename, Params, WorkingDir: String; const ShowCmd: Integer; const Wait: TExecWait; var ResultCode: Integer): Boolean;
More Info can be found in: Inno Setup Help
To do this, you MUST..
1) make sure that .net 4.0 is installed (not by default on most machines yet)
2) extract and register the DLL (you need to call regasm.exe on the extracted DLL)
This is a lot to do just to "GetDiskDriveInformation" as the very first step of the install.
It is far better to get the information natively in Inno or call a native DLL that doesn't have the prerequisites.