Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


January 03, 2001

VBScripting Solutions: The Registry’s Data Types


RSS
View this exclusive article with VIP access -- click here to join |
See More Registry Articles Here | Reprints | Or sign up for our VIP Monthly Pass!

The Windows registry contains data of different types. The set of supported data types is larger than most people realize. As Table 1, page 6, shows, the registry's programming interface accepts 12 data types. This set is significantly larger than most people need. In most cases, you need only three data types: strings (REG_SZ), 32-bit integers (REG_DWORD), and binary streams (REG_BINARY). In addition, two more data types are worth mentioning, even though they're infrequently used. These data types are multiple strings (REG_MULTI_SZ) and expandable strings (REG_EXPAND_SZ). Before I discuss how these data types differ, let's look at how you typically handle them in scripts.

Accessing and Manipulating Data Types
To identify the registry's data types in code, you use the names I've listed in the first column of Table 1. If you use Windows Script Host (WSH) to access the registry, you can use only the REG_BINARY, REG_DWORD, REG_EXPAND_SZ, and REG_SZ data types. This limitation is intrinsic to the RegRead, RegWrite, and RegDelete methods of the WshShell object that WSH exposes to work with the registry. If you use another set of COM objects to access the registry, you can use more data types. . . .


Already a VIP member?
Please log on to view the full article

Why become a VIP member?

VIP-only online access
VIP CD delivered twice a year: offline access to the entire Windows IT Pro article library
Monthly issue of your choice of Windows IT Pro or SQL Server Magazine

Subscribe Now
Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

WinInfo Short Takes: Week of November 9, 2009

An often irreverent look at some of the week's other news, including some more Windows 7 sales momentum, some Sophos stupidity, Microsoft's cloud computing self-loathing, more whining from the browser makers, Zoho's "Fake Office," and much, much more ...

Understanding File-Size Limits on NTFS and FAT

A general confusion about files sizes on FAT seems to stem from FAT32's file-size limit of 4GB and partition-size limit of 2TB. ...


Scripting Whitepapers From Development to Production: Streamlining SharePoint Deployment with DocAve Deployment Manager

Related Events WinConnections and Microsoft® Exchange Connections

Deep Dive into Windows Server 2008 R2 presented by John Savill

Check out our list of Free Email Newsletters!

Scripting eBooks Keeping Your Business Safe from Attack: Encryption and Certificate Services

Best Practices for Managing Linux and UNIX Servers

Building an Effective Reporting System

Related Scripting Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement