다음을 통해 공유


reg (Windows CE 5.0)

Send Feedback

This command returns a string representing the contents of a registry value on the client.

reg [key] [value]

Parameters

  • key
    The registry key containing the value of interest.
  • value
    Name of the value of interest.

Example Code

The following example shows how you can use the command to examine a registry key in a conditional statement.

; *******************************************
; retrieving registry values
; *******************************************
if string `reg "HKEY_LOCAL_MACHINE\Comm\ApplicationDownload" "Version"` == "1.09.3615.1008"
  echo "correct client version"
else 
  echo "wrong client version!!"
endif

Remarks

This command outputs a string representing the contents of a particular registry value and is typically used within backticks ( ` ) to perform command substitution.

Do not use the abbreviated versions of base registry keys with this command. The valid base keys are:

  • HKEY_CURRENT_USER
  • HKEY_CLASSES_ROOT
  • HKEY_LOCAL_MACHINE
  • HKEY_USERS

See Also

Environment Commands

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.