Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. REG_SZ String Value

REG_SZ String Value

Scheduled Pinned Locked Moved C#
tutorialwindows-adminlinuxjsonhelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mjmim
    wrote on last edited by
    #1

    Hey guys, I am writing a program that works with the registry. I have the following problem when I want to read REG_SZ values. I don't know how to separate the values correctly. Example: Key - HKEY_LOCAL_MACHINE\Software\Classes\AviFile\Shell\Play\Command ValueName - (Default) C:\Program Files\Windows Media Player\wmplayer.exe /prefetch:8 /Play "%L" Might appear also as "c:\program files\windows\media player\wmplayer.exe" /prefetch:8 /Play "%L" If I split the string using '"' or ' ' it won't work in all of the cases. It's not like with parsing command line arguments where you know that a path with spaces in it will have the correct punctuation. How does microsoft know how to parse these strings correctly?

    L 1 Reply Last reply
    0
    • M mjmim

      Hey guys, I am writing a program that works with the registry. I have the following problem when I want to read REG_SZ values. I don't know how to separate the values correctly. Example: Key - HKEY_LOCAL_MACHINE\Software\Classes\AviFile\Shell\Play\Command ValueName - (Default) C:\Program Files\Windows Media Player\wmplayer.exe /prefetch:8 /Play "%L" Might appear also as "c:\program files\windows\media player\wmplayer.exe" /prefetch:8 /Play "%L" If I split the string using '"' or ' ' it won't work in all of the cases. It's not like with parsing command line arguments where you know that a path with spaces in it will have the correct punctuation. How does microsoft know how to parse these strings correctly?

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      mjmim wrote:

      How does microsoft know how to parse these strings correctly?

      I cannot confirm this but I read once that they have software developers working there.

      led mike

      M 1 Reply Last reply
      0
      • L led mike

        mjmim wrote:

        How does microsoft know how to parse these strings correctly?

        I cannot confirm this but I read once that they have software developers working there.

        led mike

        M Offline
        M Offline
        mjmim
        wrote on last edited by
        #3

        :). Any real answers?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups