What is land survey
 

Welcome to our land survey Archive. Have fun browsing!

 

(Browse for more articles)

 

VBScript - Working with the Windows Registry

The script below demonstrates the write, For Each strValue In arrValues
read and deletion for each type of value Wscript.Echo strValueName & " = " &
in the Windows registry. strValue
The registry value types are: Next
- String (REG_SZ): A fixed-length text 'Delete Binary valuestrKeyPath =
string. "Registry Test"strValueName = "Binary
- Binary (REG_BINARY): Raw binary data. Test"objRegistry.DeleteValue
Most hardware component information is HKEY_CURRENT_USER,strKeyPath,strValueName
stored as binary data and is displayed in 'Set DWORD valuestrKeyPath = "Registry
Registry Editor in hexadecimal format. Test"strValueName = "DWORD Test"intValue
- DWORD (REG_DWORD): Data represented by = 123objRegistry.SetDWORDValue
a number that is 4 bytes long (a 32-bit HKEY_CURRENT_USER,strKeyPath,strValueName
integer). Many parameters for device ,intValue
drivers and services are this type and 'Get DWORD valuestrKeyPath = "Registry
are displayed in Registry Editor in Test"strValueName = "DWORD
binary, hexadecimal, or decimal format. Test"objRegistry.GetDWORDValue
- Multi-String (REG_MULTI_SZ): A multiple HKEY_CURRENT_USER,strKeyPath,strValueName
string. Values that contain lists or ,intValue
multiple values in a form that people can Wscript.Echo strValueName & " = " &
read are generally this type. Entries are intValue
separated by spaces, commas, or other 'Delete DWORD valuestrKeyPath = "Registry
marks. Test"strValueName = "DWORD
- Expandable String (REG_EXPAND_SZ): A Test"objRegistry.DeleteValue
variable-length data string. This data HKEY_CURRENT_USER,strKeyPath,strValueName
type includes variables that are resolved 'Set Multi-String valuestrKeyPath =
when a program or service uses the data. "Registry Test"strValueName =
Option Explicit "Multi-String Test"arrValues =
Const HKEY_CLASSES_ROOT = &H80000000 Array("Test1","Test2","Test3")objRegistry
Const HKEY_CURRENT_USER = &H80000001 .SetMultiStringValue
Const HKEY_LOCAL_MACHINE = &H80000002 HKEY_CURRENT_USER,strKeyPath,strValueName
Const HKEY_USERS = &H80000003 ,arrValues
Const HKEY_CURRENT_CONFIG = &H80000005 'Get Multi-String valuestrKeyPath =
Dim strComputer "Registry Test"strValueName =
Dim objRegistry "Multi-String
Dim strKeyPath Test"objRegistry.GetMultiStringValue
Dim strValueName HKEY_CURRENT_USER,strKeyPath,strValueName
Dim strValue ,arrValues
Dim arrValues For Each strValue In arrValues
Dim intValuestrComputer = "." Wscript.Echo strValueName & " = " &
Set strValue
objRegistry=GetObject("winmgmts:{imperson Next
ationLevel=impersonate}!" & strComputer & 'Delete Multi-String valuestrKeyPath =
"rootdefault:StdRegProv") "Registry Test"strValueName =
'Create KeystrKeyPath = "Registry "Multi-String
Test"objRegistry.CreateKey Test"objRegistry.DeleteValue
HKEY_CURRENT_USER,strKeyPath HKEY_CURRENT_USER,strKeyPath,strValueName
'Set String valuestrKeyPath = "Registry 'Set Expandable String valuestrKeyPath =
Test"strValueName = "String Test"strValue "Registry Test"strValueName = "Expandable
= "123"objRegistry.SetStringValue String Test"strValue =
HKEY_CURRENT_USER,strKeyPath,strValueName "123"objRegistry.SetExpandedStringValue
,strValue HKEY_CURRENT_USER,strKeyPath,strValueName
'Get String valuestrKeyPath = "Registry ,strValue
Test"strValueName = "String 'Get Expandable String valuestrKeyPath =
Test"objRegistry.GetStringValue "Registry Test"strValueName = "Expandable
HKEY_CURRENT_USER,strKeyPath,strValueName String
,strValue Test"objRegistry.GetExpandedStringValue
Wscript.Echo strValueName & " = " & HKEY_CURRENT_USER,strKeyPath,strValueName
strValue ,strValue
'Delete String valuestrKeyPath = Wscript.Echo strValueName & " = " &
"Registry Test"strValueName = "String strValue
Test"objRegistry.DeleteValue 'Delete Expandable String valuestrKeyPath
HKEY_CURRENT_USER,strKeyPath,strValueName = "Registry Test"strValueName =
'Set Binary valuestrKeyPath = "Registry "Expandable String
Test"strValueName = "Binary Test"objRegistry.DeleteValue
Test"arrValues = HKEY_CURRENT_USER,strKeyPath,strValueName
Array(1,2,3,4,5,6,7,8,9,10)objRegistry.Se 'Delete KeystrKeyPath = "Registry
tBinaryValue Test"objRegistry.DeleteKey
HKEY_CURRENT_USER,strKeyPath,strValueName HKEY_CURRENT_USER,strKeyPath
,arrValues Set objRegistry = Nothing
'Get Binary valuestrKeyPath = "Registry Please note:
Test"strValueName = "Binary The above script write, read and delete
Test"objRegistry.GetBinaryValue values in the HKCU hive but can easily be
HKEY_CURRENT_USER,strKeyPath,strValueName modified to write to any of the registry
,arrValues hives.




www.surveyshop.net keyword stats [2008-02-28-2008-02-28]



Daily top traffic source : MSN
Most current MSN search phrases:

bluetooth sales statistics survey equipment sighting compass


Other search engines trends:



Other search phrases:

dt-103l motorcycle gps review
LAND SURVEY LEVEL magellan gps tracker satelite navigator
garmin bluetooth gps gps 72
land surveyors land surveyor review
handheld gps reviews new car sales statistics
landform is synonymous with topograhpy surveying GPS units
handheld gps and land surveying wireless bluetooth gps receiver
bluetooth gps navigation garmin forerunner 305 review
magellan sportrak color gps ratings of gps
sirf star iii bluetooth gps vehicle gps
pepsi sales statistics magellan roadmate 360 review
discount garmin gps palm 700w gps
magellan roadmate 360 portable gps free palm gps
texas land survey wildlife eye video system
garmin or magellan





1- A- B- C- 2- 3- 4- 5- 6- 7- 8- 9- 10- 11- 12- 13- 14- 15- 16- 17- 18- 19- 20- 21- 22- 23- 24- 25- 26- 27- 28- 29- 30- 31- 32- 33- 34- 35- 36- 37- 38- 39- 40- 41- 42- 43- 44- 45- 46- 47- 48- 49- 50- 51- 52-