How to using COM Interop.IWshRuntimeLibrary in LINQPad 8
In Visual Studio, I can using IWshRuntimeLibrary by add COM reference "Windows Script Host Object Model".
How to achieve in LINQPad 8.
In Visual Studio, I can using IWshRuntimeLibrary by add COM reference "Windows Script Host Object Model".
How to achieve in LINQPad 8.
Comments
AFAIK there is no NuGet for this.
How I did it for
LINQPad 8 x86/x64 .NET 9
Ran
Developer Command Prompt for VS
.Copied file
c:\windows\system32\wshom.ocx
somewhere I have write access to.Ran tlbimp for that file and got
IWshRuntimeLibrary.dll
Output:
IWshRuntimeLibrary.dll
:Created new script:
Pressed
F4
>Additional References
>Add / Browse...
Ran test script.
You might also need to pay attention to bitness. Also you might have to specify STAThread attribute for
Main
.Thx i2van, it works perfectly.