What is land survey


surveyshop.net keyword stats



Most current MSN search phrases:

bluetooth sales statistics survey equipment sighting compass

VBScript - Working with the Windows Registry

The script below demonstrates the write, readTest"strValueName = "Binary
and deletion for each type of value in theTest"objRegistry.GetBinaryValue
Windows  registry.HKEY_CURRENT_USER,strKeyPath,strValueName,arr
Values
The  registry  value  types  are:
For  Each  strValue  In  arrValues
- String (REG_SZ): A fixed-length text
string.Wscript.Echo  strValueName & " = " & strValue
- Binary (REG_BINARY): Raw binary data. MostNext
hardware component information is stored as
binary data and is displayed in Registry'Delete Binary valuestrKeyPath = "Registry
Editor  in  hexadecimal  format.Test"strValueName = "Binary
Test"objRegistry.DeleteValue
- DWORD (REG_DWORD): Data represented by aHKEY_CURRENT_USER,strKeyPath,strValueName
number that is 4 bytes long (a 32-bit
integer). Many parameters for device drivers'Set DWORD valuestrKeyPath = "Registry
and services are this type and are displayedTest"strValueName = "DWORD Test"intValue =
in Registry Editor in binary, hexadecimal, or123objRegistry.SetDWORDValue
decimal  format.HKEY_CURRENT_USER,strKeyPath,strValueName,int
Value
- Multi-String (REG_MULTI_SZ): A multiple
string. Values that contain lists or multiple'Get DWORD valuestrKeyPath = "Registry
values in a form that people can read areTest"strValueName = "DWORD
generally this type. Entries are separated byTest"objRegistry.GetDWORDValue
spaces,  commas,  or  other  marks.HKEY_CURRENT_USER,strKeyPath,strValueName,int
Value
- Expandable String (REG_EXPAND_SZ): A
variable-length data string. This data typeWscript.Echo  strValueName & " = " & intValue
includes variables that are resolved when a
program  or  service  uses  the  data.'Delete DWORD valuestrKeyPath = "Registry
Test"strValueName = "DWORD
Option  ExplicitTest"objRegistry.DeleteValue
HKEY_CURRENT_USER,strKeyPath,strValueName
Const  HKEY_CLASSES_ROOT =  &H80000000
'Set Multi-String valuestrKeyPath = "Registry
Const  HKEY_CURRENT_USER =  &H80000001Test"strValueName = "Multi-String
Test"arrValues =
Const  HKEY_LOCAL_MACHINE =  &H80000002Array("Test1","Test2","Test3")objRegistry.Set
MultiStringValue
Const  HKEY_USERS =  &H80000003HKEY_CURRENT_USER,strKeyPath,strValueName,arr
Values
Const  HKEY_CURRENT_CONFIG =  &H80000005
'Get Multi-String valuestrKeyPath = "Registry
Dim  strComputerTest"strValueName = "Multi-String
Test"objRegistry.GetMultiStringValue
Dim  objRegistryHKEY_CURRENT_USER,strKeyPath,strValueName,arr
Values
Dim  strKeyPath
For  Each  strValue  In  arrValues
Dim  strValueName
Wscript.Echo  strValueName & " = " & strValue
Dim  strValue
Next
Dim  arrValues
'Delete Multi-String valuestrKeyPath =
Dim  intValuestrComputer  =  ".""Registry Test"strValueName = "Multi-String
Test"objRegistry.DeleteValue
SetHKEY_CURRENT_USER,strKeyPath,strValueName
objRegistry=GetObject("winmgmts:{impersonatio
nLevel=impersonate}!" & strComputer &'Set Expandable String valuestrKeyPath =
"rootdefault:StdRegProv")"Registry Test"strValueName = "Expandable
String Test"strValue =
'Create KeystrKeyPath = "Registry"123"objRegistry.SetExpandedStringValue
Test"objRegistry.CreateKeyHKEY_CURRENT_USER,strKeyPath,strValueName,str
HKEY_CURRENT_USER,strKeyPathValue
'Set String valuestrKeyPath = "Registry'Get Expandable String valuestrKeyPath =
Test"strValueName = "String Test"strValue ="Registry Test"strValueName = "Expandable
"123"objRegistry.SetStringValueString
HKEY_CURRENT_USER,strKeyPath,strValueName,strTest"objRegistry.GetExpandedStringValue
ValueHKEY_CURRENT_USER,strKeyPath,strValueName,str
Value
'Get String valuestrKeyPath = "Registry
Test"strValueName = "StringWscript.Echo  strValueName & " = " & strValue
Test"objRegistry.GetStringValue
HKEY_CURRENT_USER,strKeyPath,strValueName,str'Delete Expandable String valuestrKeyPath =
Value"Registry Test"strValueName = "Expandable
String Test"objRegistry.DeleteValue
Wscript.Echo  strValueName & " = " & strValueHKEY_CURRENT_USER,strKeyPath,strValueName
'Delete String valuestrKeyPath = "Registry'Delete KeystrKeyPath = "Registry
Test"strValueName = "StringTest"objRegistry.DeleteKey
Test"objRegistry.DeleteValueHKEY_CURRENT_USER,strKeyPath
HKEY_CURRENT_USER,strKeyPath,strValueName
Set  objRegistry  =  Nothing
'Set Binary valuestrKeyPath = "Registry
Test"strValueName = "Binary Test"arrValues =Please  note:
Array(1,2,3,4,5,6,7,8,9,10)objRegistry.SetBin
aryValueThe above script write, read and delete
HKEY_CURRENT_USER,strKeyPath,strValueName,arrvalues in the HKCU hive but can easily be
Valuesmodified to write to any of the registry
hives.
'Get Binary valuestrKeyPath = "Registry



1 A B C D 56 57 58 59 60 61 62 63 64 65 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104