'RestoreShowDesktop.vbs - Restore missing Show Desktop icon in QuickLaunch bar. 'Requires Active Desktop option (Shell32.dll Version 4.7 or higher). '© Bill James - bill@billsway.com ' revision 31 Mar 2002 ' Thanks to Doug Knox for catching this. With IE6, the version number for ' shell32.dll only has one decimal place, so revised the script accordingly Option Explicit Dim ws, fso, Title, MakeSCF, QuickLaunch Set ws = CreateObject("WScript.Shell") Set fso = CreateObject("Scripting.FileSystemObject") Title = "Restor Show Desktop Utility by Bill James" Validate 'Check Shell32.dll version and Quick Launch Folder If ws.Popup("This will create a " & chr(34) & "Show Desktop" & chr(34) & _ " shortcut in your Quick Launch bar." & vbcrlf & vbcrlf & _ "Do you want to proceed?", , Title, 4 + 32) = 7 Then ws.Popup "Cancelled by user, no changes made", 5, Title, 64 Cleanup End If With fso.OpenTextFile(fso.GetSpecialFolder(1) & "\Show Desktop.scf", 2, True) .Write("[Shell]" & vbcrlf & "Command=2" & vbcrlf & _ "IconFile=explorer.exe,3" & vbcrlf & "[Taskbar]" & vbcrlf & _ "Command=ToggleDesktop") .Close End With With ws.CreateShortcut(QuickLaunch & "\Show Desktop.lnk") .TargetPath = fso.GetSpecialFolder(1) & "\Show Desktop.scf" .Save End With ws.Popup "Finished.", 5, Title, 64 Cleanup Sub Validate Dim ShellVer, AppDataKey, AppDataPath ShellVer = CSng(Left(fso.GetFileVersion(fso.GetSpecialFolder(1) & _ "\shell32.dll"),3)) If ShellVer < 4.7 Then ws.Popup "Active Desktop Not Installed. Can Not Proceed.", , Title, 16 Cleanup End If AppDataKey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\" & _ "CurrentVersion\Explorer\Shell Folders\AppData" AppDataPath = ws.RegRead(AppDataKey) QuickLaunch = AppDataPath & "\Microsoft\Internet Explorer\Quick Launch" If NOT fso.FolderExists(QuickLaunch) Then ws.Popup "Unable to find Quick Launch Folder. Can Not Proceed.", , Title, 16 Cleanup End If End Sub Sub Cleanup Set ws = Nothing Set fso = Nothing WScript.Quit End Sub