PHPackages                             digilive/windows-registry - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. digilive/windows-registry

AbandonedLibrary

digilive/windows-registry
=========================

A small library for accessing and manipulating the Windows registry

v0.10.2(5y ago)1801Apache-2.0PHPPHP ^7.2

Since May 15Pushed 4y ago1 watchersCompare

[ Source](https://github.com/DigiLive/windows-registry)[ Packagist](https://packagist.org/packages/digilive/windows-registry)[ RSS](/packages/digilive-windows-registry/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (3)Dependencies (1)Versions (7)Used By (0)

Windows Registry Wrapper
========================

[](#windows-registry-wrapper)

[![GitHub release (latest by date including pre-releases)](https://camo.githubusercontent.com/1afa1940ed4d2c76ce8f321f9687dc25eeef4f5ec64a35e4b0778a2497eab75d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f646967696c6976652f77696e646f77732d72656769737472793f696e636c7564655f70726572656c6561736573)](https://camo.githubusercontent.com/1afa1940ed4d2c76ce8f321f9687dc25eeef4f5ec64a35e4b0778a2497eab75d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f646967696c6976652f77696e646f77732d72656769737472793f696e636c7564655f70726572656c6561736573)[![Codacy Badge](https://camo.githubusercontent.com/39706c92bae7a08cf2cdf8af959b93f248c928173fb39c3244a12bec93bb7a4c/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3939613565626139333135343464336438376233306531663539393964366161)](https://www.codacy.com/gh/DigiLive/windows-registry/dashboard?utm_source=github.com&utm_medium=referral&utm_content=DigiLive/windows-registry&utm_campaign=Badge_Grade)[![GitHub license](https://camo.githubusercontent.com/3ad9a15614e50f2803b6ed36796cf9702d8e5c6384049b205f3d8c9d2da0fefd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f446967694c6976652f77696e646f77732d7265676973747279)](https://github.com/DigiLive/windows-registry/blob/master/LICENSE)

A small library for accessing and manipulating the Registry on Microsoft Windows systems. For that one time you need to access the Windows Registry in a PHP application.

This library can be (and has been) used in production code, but *please consider* reading the [disclaimer](#disclaimer)below before using.

Features
--------

[](#features)

- Read and write access to any hive, key, or value in the registry (that you have permissions to)
- Automatic conversion between all registry value data types to PHP scalar types
- Lazy-loaded iterators over lists of values and recursive iterators over keys and subKeys
- Ability to connect to registries on remote computers using a remote WMI (Windows Management Instrumentation) connection (see Microsoft's docs on [how to connect to WMI remotely](https://msdn.microsoft.com/en-us/library/aa389290%28v=vs.85%29.aspx) for details)

Requirements
------------

[](#requirements)

- Microsoft Windows (Vista or newer) or Windows Server (Windows Server 2003 or newer)
- PHP [com\_dotnet](http://php.net/manual/en/book.com.php) extension

Installation
------------

[](#installation)

Use [Composer](http://getcomposer.org):

```
> composer require digilive/windows-registry:~0.10
```

Note: This package replaces package coderstephen/windows-registry v0.9.1 which has been abandoned.

Documentation
-------------

[](#documentation)

Full API documentation is available online [here](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/regprov/stdregprov).

Examples
--------

[](#examples)

Below is an example of creating a new registry key with some values and then deleting them.

```
use Windows\Registry;

$hklm = Registry\Registry::connect()->getLocalMachine();
$keyPath = 'Software\\MyKey\\MySubKey';

// create a new key
try
{
    $mySubKey = $hklm->createSubKey($keyPath);
}
catch (Registry\Exception $e)
{
    print "Key '{$keyPath}' not created" . PHP_EOL;
}

// create a new value
$mySubKey->setValue('Example DWORD Value', 250, Registry\RegistryKey::TYPE_DWORD);

// delete the new value
$mySubKey->deleteValue('Example DWORD Value');

// delete the new key
try
{
    $hklm->deleteSubKey($keyPath);
}
catch (Registry\Exception $e)
{
    print "Key '{$keyPath}' not deleted" . PHP_EOL;
}
```

You can also iterate over subKeys and values using built-in iterators:

```
foreach ($key->getSubKeyIterator() as $name => $subKey)
{
    print $subKey->getQualifiedName() . PHP_EOL;
}

foreach ($key->getValueIterator() as $name => $value)
{
    printf("%s: %s\r\n", $name, $value);
}
```

Disclaimer
----------

[](#disclaimer)

Messing with the Windows Registry can be dangerous; Microsoft has plenty of warnings about how it can **destroy your installation**. Not only should you be careful when accessing the Registry, this library is *not guaranteed* to be 100% safe to use and free of bugs. Use discretion, and **test your code in a virtual machine if possible**. We are not liable for *any* damages caused by this library. See the [license](LICENSE) for details.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 68.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~463 days

Total

5

Last Release

2164d ago

PHP version history (2 changes)v0.9PHP &gt;=5.3

v0.10.0PHP ^7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/4aaf207e8b4eb3687946af40fce0530d6ad4bf987bfdafdb334d464d4fd39ab7?d=identicon)[DigiLive](/maintainers/DigiLive)

---

Top Contributors

[![sagebind](https://avatars.githubusercontent.com/u/2192863?v=4)](https://github.com/sagebind "sagebind (45 commits)")[![DigiLive](https://avatars.githubusercontent.com/u/7613487?v=4)](https://github.com/DigiLive "DigiLive (20 commits)")[![Nyaan](https://avatars.githubusercontent.com/u/1336320?v=4)](https://github.com/Nyaan "Nyaan (1 commits)")

---

Tags

phpregistrywindowswindowsregistry

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/digilive-windows-registry/health.svg)

```
[![Health](https://phpackages.com/badges/digilive-windows-registry/health.svg)](https://phpackages.com/packages/digilive-windows-registry)
```

###  Alternatives

[jolicode/jolinotif

Send desktop notifications on Windows, Linux, MacOS.

1.4k11.6M41](/packages/jolicode-jolinotif)[directorytree/ldaprecord

A fully-featured LDAP ORM.

5782.9M10](/packages/directorytree-ldaprecord)[sylius/registry

Services registry.

6211.0M40](/packages/sylius-registry)[adldap/adldap

A PHP LDAP Library for Active Directory Manipulation

429170.1k9](/packages/adldap-adldap)[ivkos/pushbullet

Push notifications to devices and browsers via Pushbullet

21862.6k2](/packages/ivkos-pushbullet)[jolicode/php-os-helper

Helpers to detect the OS of the machine where PHP is running.

212.8M4](/packages/jolicode-php-os-helper)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
