General discussion


registry repair

By eNub ·
i came across this site offering free registry repair of my pc.
it's a good program, the registry can be a big problem. well mine can
be, that's for sure - and the last thing anyone wants is an 'inexperienced'
user fiddling around inside the registry.

if, say, i wanted to write a similar program, or rather,
a program which did a similar thing as other registry repair software,
how would i check for redundant Windows registry keys and files?

i'd want it to be running a registry clean and registry fix
of window registry, that type of thing - just how to check for redundant settings?

i am using Visual Basic.

if you know how i might do this
i'd be greatful to know also, thanks

This conversation is currently closed to new comments.

16 total posts (Page 1 of 2)   01 | 02   Next
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Re: free registry repair

by TeenTown In reply to registry repair

you can download free modules from the internet to slot into your application, you can probably find some on freevbcode or planetsourcecode, my fav is freevbcode - you'll probably want to pick th Advanced listings.

But i'd say it's been done before - error nuker is a handy tool. if you want to better it, you'd need to stretch to more than clean and fix in your app.

Collapse -

write image to boot disk ?

by TeenTown In reply to Re: free registry repair

I used to have a little program that let me write an image to the boot sector of a floppy disk. when anyone booted from the disk, it would bring up a picture on the screen.

Anyone know where i can get another copy of this ?

Collapse -

registry read write module in VB

by GoGetIt In reply to registry repair

Here are a couple of functions for you to read and write to and from the registry using HKEYS. It's a start...

Just paste the below into your module.
(code is by Agent Smith on PSC)

Declare Function RegEnumValue Lib "advapi32.dll" Alias "RegEnumValueA" (ByVal hKey As Long, ByVal dwIndex As Long, ByVal lpValueName As String, lpcbValueName As Long, ByVal lpReserved As Long, lpType As Long, ByVal lpData As String, lpcbData As Long) As Long

Declare Function RegOpenKeyEx Lib "advapi32" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As Long

Declare Function RegSetValueEx Lib "advapi32" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, ByVal szData As String, ByVal cbData As Long) As Long

Declare Function RegCloseKey Lib "advapi32" (ByVal hKey As Long) As Long

Declare Function RegCreateKeyEx Lib "advapi32" Alias "RegCreateKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal Reserved As Long, ByVal lpClass As String, ByVal dwOptions As Long, ByVal samDesired As Long, lpSecurityAttributes As SECURITY_ATTRIBUTES, phkResult As Long, lpdwDisposition As Long) As Long

#If Win32 Then

Public Const HKEY_CLASSES_ROOT = &H80000000
Public Const HKEY_CURRENT_USER = &H80000001
Public Const HKEY_LOCAL_MACHINE = &H80000002
Public Const HKEY_USERS = &H80000003
Public Const KEY_ALL_ACCESS = &H3F
Public Const REG_CREATED_NEW_KEY = &H1
Public Const ERROR_SUCCESS = 0&
Public Const REG_SZ = (1)
#End If


nLength As Long
lpSecurityDescriptor As Long
bInheritHandle As Boolean
End Type


Public Function bSetRegValue(ByVal hKey As Long, ByVal lpszSubKey As String, ByVal sSetValue As String, ByVal sValue As String) As Boolean

On Error Resume Next
Dim phkResult As Long
Dim lResult As Long
Dim lCreate As Long
RegCreateKeyEx hKey, lpszSubKey, 0, "", REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, SA, phkResult, lCreate
lResult = RegSetValueEx(phkResult, sSetValue, 0, REG_SZ, sValue, CLng(Len(sValue) + 1))
RegCloseKey phkResult
bSetRegValue = (lResult = ERROR_SUCCESS)

End Function

Public Function bGetRegValue(ByVal hKey As Long, ByVal sKey As String, ByVal sSubKey As String) As String

Dim lResult As Long
Dim phkResult As Long
Dim dWReserved As Long
Dim szBuffer As String
Dim lBuffSize As Long
Dim szBuffer2 As String
Dim lBuffSize2 As Long
Dim lIndex As Long
Dim lType As Long
Dim sCompKey As String

lIndex = 0
lResult = RegOpenKeyEx(hKey, sKey, 0, 1, phkResult)

Do While lResult = ERROR_SUCCESS And Not (bFound)
szBuffer = Space(255)
lBuffSize = Len(szBuffer)
szBuffer2 = Space(255)
lBuffSize2 = Len(szBuffer2)
lResult = RegEnumValue(phkResult, lIndex, szBuffer, lBuffSize, dWReserved, lType, szBuffer2, lBuffSize2)

If (lResult = ERROR_SUCCESS) Then
sCompKey = Left(szBuffer, lBuffSize)

If (sCompKey = sSubKey) Then
bGetRegValue = Left(szBuffer2, lBuffSize2 - 1)
End If
End If
lIndex = lIndex + 1

RegCloseKey phkResult
End Function

'now you can call the module from your form.

Collapse -

registry fixer

by eNub In reply to registry read write modul ...

Thanks for the post GoGetIt

i want to make a registry fixer like others online and want to know how you do the registry fix. Its the registry repair part really.

Collapse -


by TheChas In reply to registry repair

I have not tried the specific registry repair program you came across.

I have used Norton Win Doctor and V-Com Fix-It.
IMHO, Fix-It works a little bit better than Win Doctor.

As far as writing your own, you need to first learn how the registry functions, and how to validate the keys before starting to write code.

O'Reilly Media has several good books on the registry. They will help you understand how the keys interact, and what they do.

The simplest registry checkers just verify that all linked files exist. Going deeper involves having a table of the "proper" registry keys for specific applications and Windows versions.
You also want to check the syntax of all keys.

The ad-ware and spy-ware detection programs all read the registry looking for specific keys.

Keep in mind that the registry is structured a little differently in each different version of Windows. So, you need to design and test your code on on each version that you wish to support.


Collapse -

Re: My Own Free Registry Repair

by eNub In reply to Learn

Firstly, thank you very much for your post Chas, it was great!
Some good points and sounds like some good advice.

Back on my quest to make a good registry cleaner, like the one in initial discussion (which is more of a registry mechanic really when thinking about it, as in your previous reply, checking for specific words and redundant links etc)
I need to find a good window registry diagram/map/information, start at the top.

Will check on microsoft for registry info


Collapse -

by US_Indus In reply to registry repair

hey this is a cool application, thanks

Collapse -

Another registry repair registry fix application

by SmartStuff In reply to

Here's another good registry repair or regitry fixer application..


Collapse -

registry repair

by meyerz In reply to registry repair

hi, i used pc rescue buy to fix my registry and it worked real well. i think the website address i used was

Collapse -

More on registry repair

by Info-Safety, LLC In reply to registry repair

System Mechanic is another excellent tool for repairing your registry.

Back to Desktop Forum
16 total posts (Page 1 of 2)   01 | 02   Next

Related Discussions

Related Forums