cumminbk Posted September 17, 2006 Share Posted September 17, 2006 i would like to set all my file types for all my media programs, winamp, real player, wmp10 ect through the registry so i don't have to set them up after each fresh install. what keys do i need to change to set file types. any suggestions on the easyest way to do this? Link to comment Share on other sites More sharing options...
Speeddymon Posted September 17, 2006 Share Posted September 17, 2006 (edited) Your best bet is to do a fresh install of windows, setup all of your filetypes and then export keys pertaining to your filetypes underneath HKEY_LOCAL_MACHINE\Software\ClassesSo if you want to maintain winamp as your player for mp3 files, you would need to export 2 keys.The first key to export is:HKEY_LOCAL_MACHINE\Software\Classes\.mp3Then you need to look at either the exported file, or look in the registry at that entry. Under the first value (Default), you want to export whatever it says there:HKEY_LOCAL_MACHINE\Software\Classes\<Default's value>Example:Under most systems, the default value for HKLM\Software\Classes\.mp3 is mp3file, so under most systems you would export HKLM\Software\Classes\mp3file, however on my system, because I have installed Yahoo Music Jukebox, the dafult value for HKLM\Software\Classes\.mp3 is YMP.Media, so on my system I need to export HKLM\Software\Microsoft\Classes\YMP.MediaHope that helps.[EDIT]NOTE: You should import this registry file at GUIRunOnce, so that the keys are setup _after_ the programs are all installed[/EDIT] Edited September 17, 2006 by Speeddymon Link to comment Share on other sites More sharing options...
gunsmokingman Posted September 17, 2006 Share Posted September 17, 2006 (edited) You could also try the Assoc.exe using cmd promtDisplays or modifies file extension associationsASSOC [.ext[=[fileType]]] .ext Specifies the file extension to associate the file type with fileType Specifies the file type to associate with the file extensionType ASSOC without parameters to display the current file associations.If ASSOC is invoked with just a file extension, it displays the currentfile association for that file extension. Specify nothing for the filetype and the command will delete the association for the file extension.Cmd to associate mp3 with winampassoc .mp3=Winamp media fileHere is a VBS script that demo the assoc 1:\ It run the assoc cmd on this made up extention .zzt2:\ Checks for a file called Demo_ZZT.zzt3:\ If it not there then it makes the file4:\ Run the file5:\ Removes the assco from the zzt extention and deletes the fileSave As Demo_Assoc.vbsDim Act : Set Act = CreateObject("Wscript.Shell") Dim Fso : Set Fso = CreateObject("Scripting.FileSystemObject") Dim Ts'/-> Assoc ZZT Extention Act.Run("%Comspec% /c Assoc .zzt=txtfile"),0,True Act.Popup "The file extention .zzt is now associated with txtfile", 5, "Completed", 0 + 32 + 4096 '/-> Checks For The Demo_ZZT.zzt Exists If Not Fso.FileExists("Demo_ZZT.zzt") Then Set Ts = Fso.CreateTextFile("Demo_ZZT.zzt") : Ts.WriteLine "Demo Assoc File type .ZZT" : Ts.Close Act.Run("Notepad.exe Demo_ZZT.zzt"),1, True End If '/-> Remove Assoc From ZZT Extention Then Deletes The File Act.Run("%Comspec% /c Assoc .zzt="),0,True : Fso.DeleteFile("Demo_ZZT.zzt") Edited September 18, 2006 by gunsmokingman 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