![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | replace registry entry Hi I am relatively new to vbs. I want to find and change all instances of a CLSID in the "HKEY_CLASSES_ROOT" of the registry. Can I use wildcard * for the keys? I am unsure of the best way to loop thru the registry and the exact language to replace the CLSID's. Any help is much appreciated. Alan |
My System Specs![]() |
| | #2 (permalink) |
| | Re: replace registry entry Allj wrote: Quote: > I want to find and change all instances of > a CLSID in the "HKEY_CLASSES_ROOT" of the registry. Can I use wildcard > * for the keys? I am unsure of the best way to loop thru the registry > and the exact language to replace the CLSID's. Any help is much > appreciated. Alan I do registry-searches-and-fixes, but I don't use the usual recommendations you will find here: i.e., the (scripting) regread/write, or the WMI registry class. I use regedit. First off, I dump the registry to a temp file, like this: oShell.Run "regedit /e /a " & sRegDump, , True ' note: the /a enables export as Ansi for WinXP That gives me everything in the registry, as a text file. Then I can search "the registry" (the text) using a normal text search (which I find easier than directly searching the registry. To make changes, I again use regedit. I make up a text file with the changes, and give it a "reg" (reg file) extension. You can google reg file to get the details of what it should look like, but here is an example: --- <reg file example> --- REGEDIT4 ; repair net framework registry entries, jw 19Oct06 ; ------------------------------------------------ [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Components\FE0B727870194D115A24000972A8B18B] "0C2E8944F1F80D14DA3B0CB0E234FF95"="c:\\WINDOWS\\Microsoft.Net\\FrameworkSDK_v1.0.2204\\Lib\\libcmtd.pdb" [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Components\9E0B727870194D115A24000972A8B18B] "0C2E8944F1F80D14DA3B0CB0E234FF95"="c:\\WINDOWS\\Microsoft.Net\\FrameworkSDK_v1.0.2204\\Lib\\libcmt.pdb" [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Components\CE0B727870194D115A24000972A8B18B] "0C2E8944F1F80D14DA3B0CB0E234FF95"="c:\\WINDOWS\\Microsoft.Net\\FrameworkSDK_v1.0.2204\\Lib\\libcd.pdb" [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Components\6E0B727870194D115A24000972A8B18B] "0C2E8944F1F80D14DA3B0CB0E234FF95"="c:\\WINDOWS\\Microsoft.Net\\FrameworkSDK_v1.0.2204\\Lib\\libc.pdb" [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Components\E817A37130464D115AF3000972A8B18B] "0C2E8944F1F80D14DA3B0CB0E234FF95"="c:\\WINDOWS\\Microsoft.Net\\FrameworkSDK_v1.0.2204\\Bin\\al.exe" [HKEY_LOCAL_MACHINE\Software\Microsoft\COMPlus] "sdkInstallRoot"="c:\\WINDOWS\\Microsoft.Net\\FrameworkSDK_v1.0.2204\\" [HKEY_LOCAL_MACHINE\Software\Microsoft\COMPlus] "sdkSamplesRoot"="c:\\WINDOWS\\Microsoft.Net\\FrameworkSDK_v1.0.2204\\Samples" --- <end reg sample> --- N.B. That "REGEDIT4" key word applies to win98, and for NT,XP,Vista I believe the keyword is "REGEDIT". Anyway, as you can see, the "data" in the reg file consists of the "hive" information (i.e., where to place the data), and then the actual registry entries you wish to insert. This may sound more complicated that it is in reality. Finally, I use shell.run to run regedit again, with the reg file as a parameter, to put the desired registry changes in place. btw, I adapted the registry search I use from code by Bill James: http://billsway.com/vbspage/ although if he could see what I have done with his code he would most likely throw up, and completely disown any connection. cheers, jw ____________________________________________________________ You got questions? WE GOT ANSWERS!!! ..(but, no guarantee the answers will be applicable to the questions) |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
how to list particular entry from registry ??? | General Discussion | |||
| registry entry missing!!! | Vista General | |||
| Deleted Registry Entry | Vista hardware & devices | |||
| Logic One entry in registry | Vista General | |||
| deleting registry entry | Vista General | |||