Registry Tables
Contributed by D3ath
Registry tables
Registry tables allow you to efficently store a large ammount of data for later reference
Registry tables does not work EXACTLY like hash tables,i.e: hash tables can store more then 1 peice of data in 1 table,unlike Registry tables,you must create a Registry ENTRY first,then comes the tables,so the Registry ENTRY would act as half the Registry table:
::::::IMPORTANT/DISCLAIMER::::::
Regsitry tables can NOT remove a Regitry entry/folder do due security reasons.
Registry tables does NOT support multi switches,i.e: /radd -mb . I will update this in some time and allow multi switchs.
I take no responsibility on what you do with Registry Tables...use at YOUR OWN risk.
Just incase you dont know what your doing and you some how screw up your registry i suggest you save your registry before you use this..
You can do this by going into start,click run,type regedit,then click file up top and then EXPORT. Save the file to a place you will remeber like your desktop.
;/RMAKE
; Creates a Registry Table
; /rmake
;/RMAKE
;NOTE: i suggest you use the -s switch on all commands that involve themes: i.e ONJOIN,ONMODE,ONTEXT etc or anything that will automaticly do a command at a certain time or event
alias rmake {
if ($1 = -m) {
if ($2 == $null) || ($3- == $null) { echo $active * /rmake: insufficient parameters | halt }
var %a = $2
var %b = $null
var %c = $3-
if ($rd(HKCU\Tables\ $+ %a $+ \ $+ %c $+ )) { echo $active * /radd: Registry entry " $+ %a $+ " already exists }
$rw(HKCU\Tables\ $+ %a $+ \ $+ %c $+ ,%b,REG_SZ)
echo $active * /rmake: Registry table " $+ %a $+ " created successfuly
}
if ($1 = -s) {
if ($2 == $null) || ($3- == $null) { echo $active * /rmake: insufficient parameters | halt }
var %a = $2
var %b = $null
var %c = $3-
$rw(HKCU\Tables\ $+ %a $+ \ $+ %c $+ ,%b,REG_SZ)
}
}
;/RFREE
; Removes a Registry Table
; /rfree
;/RFREE
alias rfree {
if ($1 = -s) {
if ($2 == $null) || ($3- == $null) { echo $active * /rfree: insufficient parameters | halt }
var %a = $2
var %b = $3-
$rdel(HKCU\Tables\ $+ %a $+ \ $+ %b $+ )
}
else {
if ($1 == $null) || ($2- == $null) { echo $active * /rfree: insufficient parameters | halt }
var %a = $1
var %b = $2-
if ($rd(HKCU\Tables\ $+ %a $+ \ $+ %b $+ ) == $null) { echo $active * /rfree: Registry table " $+ %b $+ " does not exist in Registry entry " $+ %a $+ " | halt }
$rdel(HKCU\Tables\ $+ %a $+ \ $+ %b $+ )
echo $active * /rfree: Registry table " $+ %a $+ " removed successfuly
}
}
;/RADD
; Adds a table to an existing Registry Entry
; /radd
; You can specify the switch <-m> to halt /RADD if the Registry table your specified already exists,otherwise /RADD overwrites the current Regitsry table specified
; you can specify the switch <-b> to indicate that you are adding a binary value to a Registry table
;/RADD
alias radd {
if ($1 = -m) {
if ($2 == $null) || ($3- == $null) || ($4- == $null) { echo $active * /radd: insufficient parameters | halt }
var %a = $2
var %b = $3
var %c = $4-
if ($rd(HKCU\Tables\ $+ %a $+ \ $+ %b $+ )) { echo $active * /radd: Registry table " $+ %b $+ " already exists }
else {
$rw(HKCU\Tables\ $+ %a $+ \ $+ %b $+ ,%c,REG_SZ)
echo $active * /radd: Registry table " $+ %b $+ " was added to " $+ %a $+ " successfuly
}
}
if ($1 = -b) {
if ($2 == $null) || ($3- == $null) || ($4- == $null) { echo $active * /radd: insufficient parameters | halt }
var %a = $2
var %b = $3
var %c = $4-
if ($rd(HKCU\Tables\ $+ %a $+ \ $+ %b $+)) { echo $active * /radd: Registry table " $+ %b $+ " already exists | halt }
$rw(HKCU\Tables\ $+ %a $+ \ $+ %b $+ ,%c,REG_BINARY)
echo $active * /radd: Registry table " $+ %b $+ " was added to " $+ %a $+ " successfuly
}
if ($1 = -s) {
if ($2 == $null) || ($3- == $null) || ($4- == $null) { echo $active * /radd: insufficient parameters | halt }
var %a = $2
var %b = $3
var %c = $4-
$rw(HKCU\Tables\ $+ %a $+ \ $+ %b $+ ,%c,REG_SZ)
}
else {
if ($1 == $null) || ($2 == $null) || ($3- == $null) { echo $active * /radd: insufficient parameters | halt }
var %a = $1
var %b = $2
var %c = $3-
$rw(HKCU\Tables\ $+ %a $+ \ $+ %b $+ ,%c,REG_SZ)
echo $active * /radd: Registry table " $+ %b $+ " was added to " $+ %a $+ " successfuly
}
}
;/RGET
; Gets the Registry table data specified
; /rget
;/RGET
alias rget {
if ($1 = -s) {
var %a = $2
var %b = $3-
if ($rd(HKCU\Tables\ $+ %a $+ \ $+ %b $+ )) {
return $rd(HKCU\Tables\ $+ %a $+ \ $+ %b $+ )
}
}
else {
if ($1 == $null) || ($2- == $null) { echo $active * /rget: insufficient parameters | halt }
var %a = $1
var %b = $2-
if ($rd(HKCU\Tables\ $+ %a $+ \ $+ %b $+ )) {
return $rd(HKCU\Tables\ $+ %a $+ \ $+ %b $+ )
}
else { echo $active * /rget: Registry table " $+ %b $+ " does not exist in Registry entry " $+ %a $+ " }
}
}
;Read and Write aliases
alias rd {
if ($1 != $null) {
var %a = rd
.comopen %a WScript.Shell
if !$comerr {
var %b = $com(%a,RegRead,3,bstr,$1-)
var %p = $com(%a).result
..comclose %a | return %p } } }
alias rw {
if ($1-3 != $null) {
var %a = rw
.comopen %a WScript.Shell
if !$comerr {
var %b = $com(%a,RegWrite,3,bstr,$1,bstr,$2,bstr,$3)
.comclose %a } } }
alias rdel {
if ($1 != $null) {
var %a = RegDelete
.comopen %a WScript.Shell
if !$comerr {
var %b = $com(%a,RegDelete,3,bstr,$1-)
var %p = $com(%a).result
..comclose %a | return %p } } }
All content is copyright by mircscripts.org and cannot be used without permission. For more details, click here.