Find RegAsm or RegTLib

  • Imprimir
Este artigo ainda não foi traduzido.

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:

 

Our Plugins & Examples Feed

  • Microsoft .NET Framework 4.5.2 Dependency added

    A new dependency installer was added to the site. Users of Setup Factory can now...

  • SQL Server 2014 Express (Database Only)

    A new dependency module was added to the site, now for Microsoft's SQL Server 2014...

Subscribe now!

Advertisement