Size: 2577
Comment: Restrictions emphasized
|
Size: 2195
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
= Dealing with the Windows Registry = {{{WinReg}}} is part of the CategoryAplApl project. |
= WinRegSimple: dealing with the Windows Registry = {{{WinRegSimple}}} is part of the CategoryAplTree project. |
Line 7: | Line 7: |
This class offers methods useful to deal with the Windows Registry without using .NET. | This class offers a limited range of methods useful to read, write and delete values from the Windows Registry without using .NET. It uses the [[https://en.wikipedia.org/wiki/Windows_Script_Host|Windows Scripting Host]]. For an all-singing-all-dancing class see [[WinReg]] which is much more powerful. However, `WinReg` is a complex and large class. If `WinRegSimple` offers what you need stick with it. |
Line 10: | Line 12: |
To understand the names of the methods you need to understand the terminology. If you find the terminology strange: so do I, but it was invented by Microsoft and got widely accepted. That is the reason why I decided to go for it: it makes it easier to understand others while talking about the Windows Registry. | To understand the names of the methods you need to understand the terminology. If you find the terminology strange: so do I, but it was invented by Microsoft and therefore defines the standard. That is the reason why I decided to go for it: it makes it easier to understand the Microsoft documentation but also to understand others while talking about the Windows Registry. |
Line 16: | Line 18: |
you can see that this string is visible in the top of the window: | you can see this string: |
Line 20: | Line 22: |
at the top of the window. |
|
Line 21: | Line 25: |
This is called a "Main key". There is a particular number of pre-defined main keys available you can choose from. For the most important one from an application programmers view there is also a shortcut available: Instead of '''HKEY_CURRENT_USER''' you can use '''HKCU'''. | This is called a "Main key". There are a number of pre-defined main keys available you can choose from. There is also a shortcut available: instead of '''HKEY_CURRENT_USER''' you can use '''HKCU'''. |
Line 24: | Line 28: |
This is called a '''subkey'''. | This is called a '''sub key'''. |
Line 26: | Line 30: |
On the right side you see a list. The entries in this list are called "value". '''!CancelKey1''' is there a value. The actual data saved under this value is called "data". | On the right side you see a list. The entries in this list are called "values". Therefore '''!CancelKey1''' is a value. Note that the '''''names''''' are called values; the actual data saved under a value is called "data". |
Line 30: | Line 37: |
DeleteSubKey DeleteValue DoesKeyExist DoesValueExist GetString GetValue PutString PutValue Version |
Read Write Delete |
Line 43: | Line 44: |
Note the following restrictions: | The `Write` method supports just two data types: REG_SZ and REG_DWORD. |
Line 45: | Line 46: |
* `GetValue` as well as `SetValue` support at present only DWORDs (REG_DWORD) * `GetString` as well as `PutString` support at present only string (REG_SZ) == History == For a full version history: [[WinReg/History|History]] |
== Project Page == For bug reports, future enhancements and a full version history see WinRegSimple/ProjectPage |
Line 56: | Line 53: |
||Current state: ||1.3.0 || | |
Line 58: | Line 54: |
== Download == You have two options: you can either download the script for usage: [[http://aplwiki.com/WinReg?action=AttachFile&do=get&target=WinReg.ZIP|Download WinReg script right now]] or get the whole thing from the AplWikiRepository, including the development workspace and the script and maybe more for any development or for running the test cases: {{{ svn list svn://aplteam.com/os/dyalog/WinReg/tags }}} If you plan to contribute please note that all stuff published as part of the APLAPL project must follow certain [[AplAplStandards|APLAPL-specific standards]]. |
<<Include(APLTreeDownloads)>> |
Line 72: | Line 57: |
CategoryAplApl | CategoryAplTree |
WinRegSimple: dealing with the Windows Registry
WinRegSimple is part of the CategoryAplTree project.
Contents
Overview
This class offers a limited range of methods useful to read, write and delete values from the Windows Registry without using .NET. It uses the Windows Scripting Host.
For an all-singing-all-dancing class see WinReg which is much more powerful. However, WinReg is a complex and large class. If WinRegSimple offers what you need stick with it.
Terminology
To understand the names of the methods you need to understand the terminology. If you find the terminology strange: so do I, but it was invented by Microsoft and therefore defines the standard. That is the reason why I decided to go for it: it makes it easier to understand the Microsoft documentation but also to understand others while talking about the Windows Registry.
In this picture:
you can see this string:
HKEY_CURRENT_USER\Software\Dyalog\Dyalog APL/W 12.0 Unicode\AutoComplete
at the top of the window.
HKEY_CURRENT_USER
This is called a "Main key". There are a number of pre-defined main keys available you can choose from. There is also a shortcut available: instead of HKEY_CURRENT_USER you can use HKCU.
SOFTWARE\Dyalog\Dyalog APL/W 12.0 Unicode
This is called a sub key.
On the right side you see a list. The entries in this list are called "values". Therefore CancelKey1 is a value.
Note that the names are called values; the actual data saved under a value is called "data".
Shared Methods
Read Write Delete
Restrictions
The Write method supports just two data types: REG_SZ and REG_DWORD.
Project Page
For bug reports, future enhancements and a full version history see WinRegSimple/ProjectPage
Version Information
Original author: |
|
Responsible: |
|
Email: |