Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Where's the error please ?


15 Nov 2013   #1

Windows 7 Ultimate x64
 
 
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 System SpecsSystem Spec
.

15 Nov 2013   #2
Microsoft MVP

Windows 7 Ultimate 32bit SP1
 
 

My System SpecsSystem Spec
15 Nov 2013   #3

Microsoft Community Contributor Award Recipient

Windows 7 Home Premium x86 Service Pack 1 - Linux Mint Mate 14 x64
 
 

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 System SpecsSystem Spec
.


16 Nov 2013   #4

Windows 7 Ultimate x64
 
 

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 System SpecsSystem Spec
17 Nov 2013   #5

Microsoft Community Contributor Award Recipient

Windows 7 Home Premium x86 Service Pack 1 - Linux Mint Mate 14 x64
 
 

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 System SpecsSystem Spec
Reply

 Where's the error please ?




Thread Tools




Our Sites

Site Links

About Us

Find 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 09:46 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33