The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

FusionInventory::Agent::Tools::Win32 - Windows generic functions

DESCRIPTION

This module provides some Windows-specific generic functions.

FUNCTIONS

is64bit()

Returns true if the OS is 64bit or false.

getLocalCodepage()

Returns the local codepage.

getWMIObjects(%params)

Returns the list of objects from given WMI class, with given properties, properly encoded.

moniker a WMI moniker (default: winmgmts:{impersonationLevel=impersonate,(security)}!//./)
class a WMI class
properties a list of WMI properties

encodeFromRegistry($string)

Ensure given registry content is properly encoded to utf-8.

getRegistryValue(%params)

Returns a value from the registry.

path a string in hive/key/value format

E.g: HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/ProductName

logger

getRegistryKey(%params)

Returns a key from the registry. If key name is '*', all the keys of the path are returned as a hash reference.

path a string in hive/key format

E.g: HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion

logger

runCommand(%params)

Returns a command in a Win32 Process

command the command to run
timeout a time in second, default is 3600*2

Return an array

exitcode the error code, 293 means a timeout occurred
fd a file descriptor on the output

getInterfaces()

Returns the list of network interfaces.

FileTimeToSystemTime()

Returns an array of a converted FILETIME datetime value with following order: ( year, month, wday, day, hour, minute, second, msecond )

start_Win32_OLE_Worker()

Under win32, just start a worker thread handling Win32::OLE dependent APIs like is64bit() & getWMIObjects(). This is sometime needed to avoid perl crashes.