Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Ddiidev/WindowsRegistry
Windows registry wrappers for Vlang
https://github.com/Ddiidev/WindowsRegistry
Last synced: 3 months ago
JSON representation
Windows registry wrappers for Vlang
- Host: GitHub
- URL: https://github.com/Ddiidev/WindowsRegistry
- Owner: Ddiidev
- Created: 2023-11-23T21:26:39.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2024-01-31T03:47:29.000Z (9 months ago)
- Last Synced: 2024-05-19T05:28:25.659Z (6 months ago)
- Language: V
- Homepage: https://Ddiidev.github.io/WindowsRegistry/
- Size: 645 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-v - winreg - MS Windows Registry API. (WIP) (Libraries / Operating system)
README
# WindowsRegistry
Windows registry wrappers for Vlang
## Package [vpm.winreg](https://vpm.vlang.io/packages/Ddiidev.winreg)
## Documentation
[Documentation](https://Ddiidev.github.io/WindowsRegistry)
## Funcionalidades
- [X] Update and delete **value**
- [X] List **value** information
- [X] Read value of type only **REG_SZ** and **REG_DWORD**
- [ ] Read value of type **REG_BINARY**, **REG_QDWORD**, **REG_DWORD_BIG_ENDIAN** and **REG_EXPAND_SZ**
- [X] Write value of type only **REG_SZ** and **REG_DWORD**
- [ ] Write value of type **REG_BINARY**, **REG_QDWORD**, **REG_DWORD_BIG_ENDIAN** and **REG_EXPAND_SZ**
- [ ] create new keys
- [ ] Delete keys## How to use
Getting a string value.
```v
import Ddiidev.winregh := winreg.open_key(.hkey_local_machine, r'SOFTWARE\Microsoft\Windows\CurrentVersion', .key_read)!
value := h.query_value[string]('ProgramFilesDir')!
println(value)
```It is possible to get a value without needing to know the type of the value in the registry.
```v
import Ddiidev.winregh := winreg.open_key(.hkey_local_machine, r'SOFTWARE\Microsoft\Windows\CurrentVersion', .key_read)!
value := h.get_value('ProgramFilesDir')!
println(value)
if value is string {
println("value is string")
}
```Defining and creating new value. (Remembering that you need to be as ADM on Windows)
```v
value_test := 'my_test'h := winreg.open_key(.hkey_local_machine, r'SOFTWARE\Microsoft\Windows\CurrentVersion', .key_write)!
h.set_value('test', value_test)!
```