Vindicator209 Posted January 14, 2008 Share Posted January 14, 2008 Where in the registry can I change the icon for a specific file extention? For example, if I want the file extension ".msd" to be something like "icon.ico" how can I do this through the registry? [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center] Link to comment Share on other sites More sharing options...
BrettF Posted January 14, 2008 Share Posted January 14, 2008 HKCR- You'll need to see the defaul entry for your extention, then go to that key in HKCR where it is under \DefaultIcon Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
BrettF Posted January 14, 2008 Share Posted January 14, 2008 Example: Quick and dirty. #include "Array.au3" $filepath = "C:\WINDOWS\system32\user32.dll" _ArrayDisplay (FileGetIcon ($filepath)) Func FileGetIcon ($file, $opt = 1) $string = StringSplit ($file, ".") If Not IsArray ($string) Then Return SetError (0, 0, 0) $ext = "." & $string[$string[0]] $key = RegRead ("HKCR\" & $ext, "") If @error Then Return SetError (0, @extended, 0) $icon = RegRead ("HKCR\" & $key & "\DefaultIcon", "") If @error Then Return SetError (0, @extended, 0) If $opt = 1 Then Local $arr[2] $ret2 = StringSplit ($icon, ",") $arr[0] = $ret2[1] $arr[1] = $ret2[2] Else $arr = $icon EndIf Return SetError (1, 0, $arr) EndFunc Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now