Find RegAsm

  • Print

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

 
function FindRegAsm()
  -- locate Microsoft .NET Framework Assembly Registration Utility
  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
 
 

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

Security code
Refresh

Our Plugins & Examples Feed

  • Dependency module for Setup Factory: Visual C/C++ 2010 SP1

    New dependency modules to add runtime support for applications developed with Microsoft Visual C/C++ 2010...

  • LuaFileSystem 1.5.0 for AutoPlay Media Studio 8

    LuaFileSystem is a Lua library developed to complement the set of functions related to...

Subscribe now!

Do you need help?

clockWe provide customer support for Indigo Rose software development products since 2008!
Please contact us if you need assistance for designing, debugging, or finishing your project on time.