chen
chen

Reputation: 3

Get The Version Of Executable From Lua

I need to get the version of executable

function getAssemblyVersion(assemblyName)
  Print(assemblyName)
  luanet.load_assembly("System")
  FileVersionInfo = luanet.import_type("System.Diagnostics.FileVersionInfo")
  return FileVersionInfo.GetVersionInfo(assemblyName).FileVersion
end

Version = getAssemblyVersion('C:\\Temp\\new\\Setup.exe')
Print(Version )

Upvotes: 0

Views: 1416

Answers (1)

BMitch
BMitch

Reputation: 264316

It's not clear in your question, but if you're looking for the lua version, then you can use _VERSION. See http://www.lua.org/manual/5.1/manual.html#pdf-_VERSION

Upvotes: 1

Related Questions