Win32 extensions? not OLE


#1

Hello
I’m new to programming and Ruby.
My question is, "does Ruby have a Windows extensions module that allows
access to windows OS? "
Something like the windows extension for Python written by Mark Hammond
where you can import OS and peform file copies, dir, get OS versions
ect…

I’m not looking for API or OLE control. Just direct OS control.


#2

Rain wrote:

Hello
I’m new to programming and Ruby.
My question is, "does Ruby have a Windows extensions module that allows
access to windows OS? "
Something like the windows extension for Python written by Mark Hammond
where you can import OS and peform file copies, dir, get OS versions
ect…

I’m not looking for API or OLE control. Just direct OS control.

For direct control of Windows, you use the API.

If, however, you want a more abstract, high-level interface to files,
pathnames, etc., such as Python’s os library provides, you won’t find
them collected into one module. Check out classes IO, File, FileTest,
Find, FileUtils, Tempfile, Process, Pathname, and the constant ENV.

If you ask a more specific question about what you want to do, we can
probably narrow that down for you.

Cheers,
Dave


#3

If you need platform neutral interface like “file handling”,
“network socket”, and such, just check out class library bundled
with Ruby itself. OTOH, if you want certain OS-specific
features (like “shutting down Windows”, “get OS version”, etc.),
use “win32ole” module and invoke a call through obtained WMI
instance. WMI should do the job for most management tasks.

I’ve never heard of any wrapper library that provides simple
methods to perform common Windows management tasks. You
probably need to call/use WMI directly through “win32ole” module.
It’s actually easy and more useful than limited wrapper as
tons of sample scripts (in VBScript or JavaScript) are floating
on the net, especially at MSDN site.

I’m new to programming and Ruby.
My question is, "does Ruby have a Windows extensions module that
allows access to windows OS? "
Something like the windows extension for Python written by Mark
Hammond where you can import OS and peform file copies, dir, get
OS versions ect…

I’m not looking for API or OLE control. Just direct OS control.


Taisuke Y. removed_email_address@domain.invalid, http://rakugaki.org/
2268 E9A2 D4F9 014E F11D 1DF7 DCA3 83BC 78E5 CD3A

Message to my public address may not be handled in a timely manner.
For a direct contact, please use my private address on my namecard.