|
-
Sep 10th, 2001, 07:55 AM
#1
Thread Starter
Lively Member
DeleteSetting() No API's Please..
How do I programmatically delete the key:
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Policies/Ratings
Using the DeleteSetting() function?
-
Sep 10th, 2001, 08:22 AM
#2
Fanatic Member
You Can't. DeleteSetting() Only allows you to alter the
HKEY_CURRENT_USER\Software\VB and VBA Program Settings \
Section
-
Sep 10th, 2001, 08:25 AM
#3
Mr. Smith is correct.
The only way you can programmatically delete the key you have specified is by using an API.
-
Sep 10th, 2001, 11:09 AM
#4
Thread Starter
Lively Member
Ok, thanks for the info. Here's what I am up to. I want use Microsoft Word 97's programming capability (VBA) to delete the registry key I mentioned. Can I do that?
-
Sep 11th, 2001, 03:24 AM
#5
Fanatic Member
Aah, if you are using MS Word then according to http://msdn.microsoft.com/library/de...wdstoreval.asp
You can set and retrieve information from the Windows registry by using the PrivateProfileString property.
The PrivateProfileString property has three arguments: FileName, Section, and Key. To return a setting from the Windows registry, the FileName argument must be an empty string (""). The Section name should be the complete path to the registry key. The Key should be the value in the key specified by Section.
You can also set information in the Windows registry by using the following PrivateProfileString syntax:
System.PrivateProfileString(FileName, Section, Key) = setting
I have never used this function and unfortunately this page doesn't state whether you can also delete registry entries, but I suppose you could set them to "" even if you can't.
For more info also see http://msdn.microsoft.com/library/de...filestring.asp
-
Sep 11th, 2001, 03:56 AM
#6
Or you could use the RegTools5 dll, which is a nice object wrapper round the registry API.
- gaffa
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|