Page 1 of 1 1
Topic Options
#209442 - 2014-08-25 12:03 AM Library to manipulate registry with WMI (localy or remotely)
ChristopheM Offline
Hey THIS is FUN
*****

Registered: 2002-05-13
Posts: 311
Loc: STRASBOURG, France
Recently, i responded to a post about out parameters (Read registry value remotely with WMI : "Can functions have an OUT parameter" ). As a good exercise, i have tried to rewrite all functions provided by WMI provider StdRegProv (except those about Security Descriptor).

The file joined to this post is the result of my work. It contains a .zip file including 5 files :
- "readme.txt" short description of functions and parameters
- "Library - WMIRegistry.kix" library containing global constants and functions (high and low level)
- "Demo WMI Registry Read High Level.kix" example of use for high-level functions
- "Demo WMI Registry Read Low Level.kix" example of use for low-level functions
- "Demo WMI Registry Measurement.kix" example to measure execution time with high-level, low-level and native kix functions

With this library, you can :
- create, delete or enum subkey
- read, write, delete or enum value
- check access rights to a registry key

Last native function not implemented is KeyExist !!!

there are two ways to read value :
WMIRegistryReadValue searchs the type of the value before reading the value.
WMIRegistryReadValueWithType needs the type of value as parameter to get directly the value.


High-level functions get parameter like native KiXtart functions (except for UNC syntax. no support for "\\remote server\hkey_...\regkey" because "remote computer" is included in the optional parameter $strComputer). They create a WMI connection to registry, do the required action and then close connection (implicit).

Low-level function need you to establish first the connection and use the WMI object as parameter. This is faster.

I hope this set of files will be useful to someone.

Christophe


Attachments
WMI Registry.zip (320 downloads)
Description:




Edited by ChristopheM (2014-08-25 11:04 PM)
_________________________
Christophe

Top
#209443 - 2014-08-25 01:14 AM Re: Library to manipulate registry with WMI (localy or remotely) [Re: ChristopheM]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4562
Loc: USA
Wow... looks like a lot of work there.

We really need to get these posted to the UDFs so people can find them easier.

For now I've put these in my archive, and look forward to the day I need them. \:\)

Top
#209444 - 2014-08-25 10:49 PM Re: Library to manipulate registry with WMI (localy or remotely) [Re: Allen]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11627
Loc: CA
Might want to put a link to the previous discussion for relevancy.

Thanks for the work and sharing Christophe

Top
#209445 - 2014-08-25 11:08 PM Re: Library to manipulate registry with WMI (localy or remotely) [Re: NTDOC]
ChristopheM Offline
Hey THIS is FUN
*****

Registered: 2002-05-13
Posts: 311
Loc: STRASBOURG, France
as asked, i have edited my post to add a link.
_________________________
Christophe

Top
#209446 - 2014-08-26 09:04 AM Re: Library to manipulate registry with WMI (localy or remotely) [Re: ChristopheM]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11627
Loc: CA
Cool, thanks.
Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 739 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.06 seconds in which 0.03 seconds were spent on a total of 14 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org