Find RegAsm or RegTLib

  • Print

This sample Lua code shows how you can locate the Microsoft .NET Framework Assembly Registration utility (regasm.exe).

function FindRegAsm()
  local sRegAsm = "";
  local sRootFolder = _WindowsFolder .. "\\Microsoft.NET\\Framework";
  local tVersions = Folder.Find(sRootFolder, "v?.*", false);
  local i, folder;
  if (tVersions ~= nil) then
    for i, folder in pairs(tVersions) do
      sRegAsm = folder .. "\\RegAsm.exe";
      if (File.DoesExist(sRegAsm)) then
        break;
      end
    end
  end
  return sRegAsm;
end
 
sRegAsm = FindRegAsm();
if (sRegAsm == "") then
  Dialog.Message("Error", "regasm.exe not found.", MB_OK, MB_ICONSTOP);
else
  Dialog.Message("Info", "Detected regasm.exe as " .. sRegAsm, MB_OK, MB_ICONINFORMATION);
end

A typical output would be:

This sample Lua code shows how you can locate the Microsoft Visual Studio RegTLib utility (regtlibv12.exe).

function FindRegTLib()
  local sRegTlib = "";
  local sRootFolder = _WindowsFolder .. "\\Microsoft.NET\\Framework";
  local tVersions = Folder.Find(sRootFolder, "v?.*", false);
  local i, folder;
  if (tVersions ~= nil) then
    for i, folder in pairs(tVersions) do
      sRegTlib = folder .. "\\regtlibv12.exe";
      if (File.DoesExist(sRegTlib)) then
        break;
      end
    end
  end
  return sRegTlib;
end
 
local sRegTlib= FindRegTLib();
if (sRegTlib== "") then
  Dialog.Message("Error", "regtlibv12.exe not found.", MB_OK, MB_ICONSTOP);
else
  Dialog.Message("Info", "Detected regtlibv12.exe as " .. sRegTlib, MB_OK, MB_ICONINFORMATION);
end

A typical output would be:

 

Comments 

 
# Mike 2013-10-16 06:21
Thanks! Useful info also presents here:
http://www.actualinstaller.com/help/regasm.html
 

Add a comment (For questions, please use the contact form!)

Security code
Refresh

Our Plugins & Examples Feed

  • POP3 Actions plugin released

    A new, free actions plugin was released today. With it, the developer can check POP3...

  • Reminder: Update Serial Number Validation and/or Subscription Validation

    Next week IPInfoDB's API 2.0 will stop working. If you use an older version than...

Subscribe now!

Advertisement