'Author : Dennis Mueller 'Description : Based on a script by Ramesh Srinivasan - Microsoft MVP (http://windowsxp.mvps.org) 'Description2 : Changes the default editor for images within explorer. 'Website : http://dennismueller.org 'Created on : August 8, 2009 'Applies To : Microsoft Windows Vista 'Requirement : Needs Administrative privileges in Windows Vista (Run as Administrator) Set WshShell = CreateObject("WScript.Shell") Set fs = CreateObject("Scripting.FileSystemObject") Dim MyKey, EditorName, KeyToAdd, rtn, MyKeySelf MyKey = Inputbox("Type the application name with full path - Run As Administrator", "Change the Default Image Editor", "C:\Program Files\Adobe\Adobe Photoshop CS4\Photoshop.exe") if trim(MyKey) = "" then WScript.Quit MyKeySelf = """" + MyKey + """" & " " & """" + "%1" + """" if not fs.fileexists(MyKey) then rtn = msgbox("Specified file is missing, do you want to continue anyway?", 36, "Add a HTML Editor") if rtn = 6 then Call SetAsDefaultEditor else WScript.Quit end if else Call SetAsDefaultEditor end if Sub SetAsDefaultEditor() On Error resume next KeyToAdd = "HKCR\SystemFileAssociations\image\shell\edit\command\" WshShell.RegWrite KeyToAdd,MyKeySelf,"REG_EXPAND_SZ" end sub Set WshShell = Nothing Set fs = Nothing