Results 1 to 5 of 5

Thread: Creating Registry Sting Key with Pathname.

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Creating Registry Sting Key with Pathname.

    I have done this two different ways now but get the same result.

    I need to create a string key entry in the registry.
    The problem is that the Key name and the Key value are both file paths.

    When I create the key I get a list of subdirectories under the key. Probably because the Key Name is a path.

    Can anyone suggest how I get around this?

    Code:
    Registry.RegWrite "HKEY_CURRENT_USER\Software\Adobe\Acrobat Distiller\PrinterJobControl", "C:\Program Files\Microsoft Visual Studio\VB98\VB6.EXE", "C:\Test.pdf*"
    Attached Images Attached Images  

  2. #2
    Frenzied Member longwolf's Avatar
    Join Date
    Oct 2002
    Posts
    1,343

    Re: Creating Registry Sting Key with Pathname.

    why not use something like:
    Code:
    private sub SavePath(byref sPath as string)
        SaveSetting App.Title, "Settings", "Path", sPath
    end sub
    'and
    private Function GetPath() as string
        GetPath= GetSetting(App.Title, "Settings", "Path", "")
    end function

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2006
    Location
    London, UK
    Posts
    817

    Re: Creating Registry Sting Key with Pathname.

    I need to save it in HKEY_CURRENT_USER\Software\Adobe\Acrobat Distiller\PrinterJobControl
    It's not a key I need to create for my application but one under Acrobat Distiller.
    How would I create a key in this exact path?

  4. #4
    Frenzied Member longwolf's Avatar
    Join Date
    Oct 2002
    Posts
    1,343

    Re: Creating Registry Sting Key with Pathname.

    I can't remember how.
    But I believe I found some code for making diff types of keys on PSC once.

  5. #5
    Fanatic Member schoolbusdriver's Avatar
    Join Date
    Jan 2006
    Location
    O'er yonder
    Posts
    1,020

    Re: Creating Registry Sting Key with Pathname.

    WSH won't let you create a value name that contains backslashes (it's a bit limited) - you'll have to use the APIs or WMI.
    Last edited by schoolbusdriver; Nov 10th, 2008 at 02:15 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width