Where's the error please ?

ydbydb

New member
Local time
7:24 PM
Messages
4
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

Computer type
PC/Desktop
OS
Windows 7 Ultimate x64

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Bruce ... somewhere in his 40's
OS
Windows 7 Ultimate 32bit SP1
CPU
Intel(R) Core(TM)2 Quad CPU @ 2.40GHz, 2400 MHz
Motherboard
INTEL/D975XBX2
Memory
4 GB
Graphics Card(s)
ATI Radeon HD 2600 Pro
Monitor(s) Displays
Samsung SyncMaster 914v
Screen Resolution
1280 x 1024
Hard Drives
2/500GB each ... ST3500630AS ATA Device.
One is not connected
PSU
Rocketfish 700 W
Case
G.Skill Gigabyte Chassis
Keyboard
Standard PS/2 Keyboard
Mouse
Microsoft PS/2 Mouse
Internet Speed
DSL
Antivirus
Avira Internet Security
Browser
IE 11
Other Info
ATI HDMI Audio
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

Computer type
Laptop
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

Computer type
PC/Desktop
OS
Windows 7 Ultimate 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 Computer

Computer type
Laptop
Back
Top