Where's the error please ?


  1. Posts : 4
    Windows 7 Ultimate x64
       #1

    Where's the error please ?


    Sorry to bother you again

    But when I try this code it gives me an error. Where's the error please ?

    ---

    Sub test()

    Dim readValue As String

    readValue = My.Computer.Registry.GetValue _
    ("\Local Computer Policy\User Configuration\Administrative Templates\System\Ctrl+Alt+Del Options\", "Remove Task Manager", Nothing)

    MsgBox ("The value is " & readValue)


    End Sub
      My Computer


  2. Posts : 8,608
    Windows 7 Ultimate 32bit SP1
       #2
      My Computer

  3.    #3

    I haven't written in BASIC for a long time, and never really bothered with it. C++ is more my kind of thing, and I've only recently decided to start catching up on what I've forgotten.

    The method (or function) doesn't supply a registry key, so it's probably not going to find anything. Furthermore, doesn't the last parameter require you to pass a object?
      My Computer


  4. Posts : 4
    Windows 7 Ultimate x64
    Thread Starter
       #4

    Thanks for you reply.

    I am not used at working with registy keys. In previous replies to my thread I was referred to functions dealing with registry keys. But I was asking about local group policy. So I am a little bit confused since I am wondering if addressing those is really the same then addressing the registry keys.
      My Computer

  5.    #5

    You pass a string as the first argument; the name of the registry key which you wish to search for. Your searching for a folder path.

    Have you checked Jacee's link?
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 17:16.
Find Us