Script to List Control Panel Items With Path and GUID

Here is a small VBScript written for Windows XP, that lists Control Panel items with Path or GUID for each item. This script does not work well in Windows Vista.

Set WshShell = CreateObject("Wscript.Shell")
Set objShell = CreateObject("Shell.Application")
Set fso = Wscript.CreateObject("Scripting.FilesystemObject")
sFileName= WshShell.SpecialFolders("Desktop") & "\CPLItems.txt"
set b = fso.CreateTextFile (sFileName,true)
Set objFolder = objShell.Namespace(&H3&)
Set objFolderItem = objFolder.Self
Set colItems = objFolder.Items
sCPLList = string(9,"*") & vbCrLf & "Namespace" & _
vbCrLf & string(9,"*") & vbCrLf
sCPLList2 = string(4,"*") & vbCrLf & "CPLs" & _
vbCrLf & string(4,"*") & vbCrLf

For Each objItem In colItems
If objItem.Name <> objItem.Path Then
If InStr(1,objItem.Path,"{") > 0 Then
sCPLList = sCPLList & objItem.Name & _
" – " & Right(objItem.Path,38) & vbCrLf
Else
sCPLList = sCPLList & objItem.Name & _
" – " & objItem.Path & vbCrLf
End If
Else
sCPLList2 = sCPLList2 & objItem.Name & vbCrLf
End If
Next

b.Writeline sCPLList
b.Writeline sCPLList2
b.close
WshShell.Run "notepad " & sFileName, 1,True
Set fso = Nothing
set WshShell = Nothing

Copy the above code to Notepad, and save the file with .VBS extension. Double-click the file to run it. The list of CPL items are saved to a text file in your Desktop.

SEE ALSO

How to remove invalid icons from Control Panel

How to remove duplicate icons from Control Panel

Scripts for Windows Vista

Scripts for Windows XP

Other Scripts @ The Winhelponline Blog

Bookmark this Page!

BlinkList | del.icio.us | Digg it | Furl | reddit | Spurl | StumbleUpon |

Related Posts


Email SubscriptionPrefer an E-mail subscription?

Enter your email address:

Delivered by FeedBurner

Leave a Reply