++ed by:

1 PAUSE user
1 non-PAUSE user.

Guillaume Bougard


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


This module provides some Windows-specific generic functions.



Returns true if the OS is 64bit or false.


Returns the local codepage.


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

moniker a WMI moniker (default: winmgmts:{impersonationLevel=impersonate,(security)}!//./)
altmoniker another WMI moniker to use if first failed (none by default)
class a WMI class, not used if query parameter is also given
properties a list of WMI properties
query a WMI request to execute, if specified, class parameter is not used
method an object method to call, in that case, you will also need the following parameters:
params a list ref to the parameters to use fro the method. This list contains string as key to other parameters defining the call. The key names should not match any exiting parameter definition. Each parameter definition must be a list of the type and default value.
binds a hash ref to the properties to bind to the returned object


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


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



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



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


Returns the list of network interfaces.


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


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