|
ASP
Components >> AdvRegistry
|
Download | Buy |
AdvRegistry
|
AdvRegistry makes
it easy to access the Registry. Extensive documentation includes
descriptions of areas in the Registry that might be useful
and how to access them. You can use the registry class to
programmatically create, query, and delete keys in the registry.
You can also query and assign named values to the keys.
|
Complete basic registry management
operations, such as Get, Set and Delete a registry value
or key. |
|
Along with these basic operations, it provides
GetAll operation to get listing of all keys and values
under the given registry branch, and return their Entry,
Type and Value, and also can sort the listing in ascending
and descending on given sorting criteria.
|
|
Sample
code for C++, ASP and CF is provided with the component
Example (ASP):
<% set Obj = Server.CreateObject("AdvRegistry.Registry")
%>
Example (ColdFusion):
<CFOBJECT
Class="AdvRegistry.Registry" Action="Create" Name="Obj">
AdvRegistry
Properties
Property |
Description |
Entry
|
The
registry branch to be processed.
Example (ASP):
<% Obj.Entry = "HKEY_LOCAL_MACHINE\SOFTWARE\Advanced
Communications" %>
Example (ColdFusion):
<CFSET Obj.Entry = "HKEY_LOCAL_MACHINE\SOFTWARE\Advanced Communications">
|
ErrorReason |
Reports
any error that occurred during the request.
Example (ASP):
<% if Obj.IsError = 1 then
Response.Write
Obj.ErrorReason
else
No Error
Occurred
end if %>
Example (ColdFusion):
<CFIF #Obj.IsError# EQ 1>
<CFOUTPUT>#Obj.ErrorReason#</CFOUTPUT>
<CFELSE>
<CFOUTPUT>No
Error Occurred</CFOUTPUT>
</CFIF>
|
IsError
|
Returns
1 if any error occurred during the request otherwise
0.
Example (ASP):
<% if Obj.IsError = 1 then
Response.Write
Obj.ErrorReason
else
No Error
Occurred
end if %>
Example (ColdFusion):
<CFIF #Obj.IsError# EQ 1>
<CFOUTPUT>#Obj.ErrorReason#</CFOUTPUT>
<CFELSE>
<CFOUTPUT>No
Error Occurred</CFOUTPUT>
</CFIF>
|
Sort
|
Sorts
query column data (case-insensitive). Sorts on Entry,
Type, and Value columns as text. Valid values are
Entry_ASC (default)
Entry_DESC
Type_ASC
Type_DESC
Value_ASC
Value_DESC
Example (ASP):
<% Obj.Sort = "value_asc"
%>
Example (ColdFusion):
<CFSET Obj.Sort = "value_asc">
|
Type
|
The
type of data you want to process. Valid values are
Any component will process on all including
String, DWORD and Key (subkeys)
String (default) component will process
on String values only
DWORD component will process
on DWORD values only
Key component will process on Key (subkeys)
only
Example (ASP):
<% Obj.Type = "dword"
%>
Example (ColdFusion):
<CFSET Obj.Type = "dword">
|
Value
|
The
data value to be set.
Example (ASP):
<% Obj.Value = "testing"
%>
Example (ColdFusion):
<CFSET Obj.Value = "testing">
|
AdvRegistry
Methods
Method |
Parameter |
Return Value |
Description |
Delete
|
1.
Registry Branch |
None
|
Delete
the specified branch from registry.
Example (ASP):
<% Obj.Delete("HKEY_LOCAL_MACHINE\SOFTWARE\ASPFusion")
%>
Example (ColdFusion):
<CFSET Obj.Delete("HKEY_LOCAL_MACHINE\SOFTWARE\ASPFusion")>
|
Get
|
1.
Registry Branch |
Object
|
Get
the specified entry value from specified branch.
Example (ASP):
<% set Result = Obj.Get("HKEY_LOCAL_MACHINE\SOFTWARE\ASPFusion")
Response.Write
Result.Value
set Result = nothing %>
Example (ColdFusion):
<CFSET Result = Obj.Get("HKEY_LOCAL_MACHINE\SOFTWARE\ASPFusion")>
<CFOUTPUT>#Result.Value#</CFOUTPUT>
WHERE in Get object
Value |
contains value of the registry entry.
|
|
GetAll
|
1.
Registry Branch |
Array
of objects |
Get
listing of specified branch.
Example (ASP):
<% set Result = Obj.GetAll("HKEY_LOCAL_MACHINE\SOFTWARE\ASPFusion")
for each Member in Result
Response.Write
Member.Entry
Response.Write
Member.Type
Response.Write
Member.Value
next
set Result = nothing %>
Example (ColdFusion):
<CFSET Result = Obj.List("HKEY_LOCAL_MACHINE\SOFTWARE\ASPFusion")>
<CFLOOP Collection="#Result#"
Item="Member">
<CFOUTPUT>
#Member.Entry#
#Member.Type#
#Member.Value#
</CFOUTPUT>
</CFLOOP>
WHERE in GetAll collection
Entry |
contains registry entry name.
|
Type |
contains type, whether it is String, DWORD, Binary
or Key.
|
Value |
contains registry entry value.
|
|
Set
|
1.
Registry Branch |
None
|
Set
the specified entry value for specified branch.
Example (ASP):
<% Obj.Set "HKEY_LOCAL_MACHINE\SOFTWARE\ASPFusion"
%>
Example (ColdFusion):
<CFSET Obj.Set("HKEY_LOCAL_MACHINE\SOFTWARE\ASPFusion")>
|
|
|