News for hackers. Stuff that matters.
Re:LuaRT: Lua programming environment for console, desktop a... by bionsystem on Saturday May 25, 2024 @05:03AM (#40473722)
Not a programmer, but I see it can use COM objects :

https://luart.org/doc/sys/COM-constructor.html

does that mean we can use it to manipulate Office files just as in VB or PowerShell ?

Re:LuaRT: Lua programming environment for console, desktop a... by _samt_ on Saturday May 25, 2024 @08:18AM (#40474514)
I'm the main author of LuaRT. Yes LuaRT can automate Office apps through COM
Re:LuaRT: Lua programming environment for console, desktop a... by bionsystem on Saturday May 25, 2024 @08:24AM (#40474553)
Great job, thanks for your work !
Re:LuaRT: Lua programming environment for console, desktop a... by _samt_ on Saturday May 25, 2024 @08:26AM (#40474576)
Thank you :)
Re:LuaRT: Lua programming environment for console, desktop a... by walterbell on Saturday May 25, 2024 @12:48PM (#40476185)
Can COM automation work between two networked Windows desktops?

Edit: I guess that would be DCOM, https://en.wikipedia.org/wiki/Distributed_Component_Object_M...

Re:LuaRT: Lua programming environment for console, desktop a... by _samt_ on Monday May 27, 2024 @01:03AM (#40487709)
I don't have tested this
Re:LuaRT: Lua programming environment for console, desktop a... by jodrellblank on Saturday May 25, 2024 @08:16AM (#40474495)
A COM client will let you control Office desktop applications, and use those to open and edit Office files. You need them installed first.

(Contrast with Doug Finke’s Import-Excel module for PowerShell which can work with Excel files without Excel installed, and Przemysław Kłys‘s PSWriteWord module that can write Word files without Word. They can’t do as much as full Excel and Word can).

Re:LuaRT: Lua programming environment for console, desktop a... by bionsystem on Saturday May 25, 2024 @08:26AM (#40474574)
Thanks this is very clear. I use COM objects through PowerShell too, not the Import-Excel module, because I cannot install anything (except Office) on my client's work machine. But I can copy binaries so working with Lua might relieve my headaches from working with PowerShell :)
Re:LuaRT: Lua programming environment for console, desktop a... by jodrellblank on Saturday May 25, 2024 @12:08PM (#40475849)
From the PowerShell Github releases page[1] you can expand 'assets' and 'show more assets' and find a ZIP distribution which doesn't need installing, unzip it. e.g. PowerShell-7.4.2-win-x64.zip . Then from PowerShell 7 somewhere, run

    Save-Module ImportExcel -Path C:\Whatever\
and copy that module folder along with the PowerShell folder to the remote machine, and you can import modules from a full path:

    Import-Module C:\Whatever\ImportExcel
and do a no-install copy-paste deployment of powershell 7 and modules. (I'm not saying you should do this instead of using Lua, just that you can).

[1] https://github.com/PowerShell/PowerShell/releases

Re:LuaRT: Lua programming environment for console, desktop a... by bionsystem on Saturday May 25, 2024 @05:16PM (#40477927)
Nice, thanks. But I have other limitations as well (Powershell 5 only and scripts must be signed, which I believe includes external modules).

Don't ask me why I can run a random binary instead, I don't know and I don't want to know.