possmkngdm Posted August 17, 2005 Share Posted August 17, 2005 I have a file type and a program to associate it with, but how would I do this through autoit script? i.e. take *.abc and associate it with myprogram.exe Link to comment Share on other sites More sharing options...
therks Posted August 17, 2005 Share Posted August 17, 2005 Decide on a name for the filetype. Using your example, something like ABCFile. Then create the registry key: RegWrite('HKCR\.abc\', '', 'REG_SZ', 'ABCFile') That's the filetype itself, then create a registry key to tell the computer how to handle the filetype RegWrite('HKCR\ABCFile\shell\open\command\', '', 'REG_SZ', 'C:\myprogram.exe') That should get you started. Have a look through your registry for some well known file types for examples. Try .txt (txtfile), .mp3 (Winamp.File), or .bmp (Paint.Picture) [these are my filetypes, yours could be different]. My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
seandisanti Posted August 17, 2005 Share Posted August 17, 2005 Decide on a name for the filetype. Using your example, something like ABCFile. Then create the registry key:RegWrite('HKCR\.abc\', '', 'REG_SZ', 'ABCFile')That's the filetype itself, then create a registry key to tell the computer how to handle the filetypeRegWrite('HKCR\ABCFile\shell\open\command\', '', 'REG_SZ', 'C:\myprogram.exe')That should get you started. Have a look through your registry for some well known file types for examples. Try .txt (txtfile), .mp3 (Winamp.File), or .bmp (Paint.Picture) [these are my filetypes, yours could be different].<{POST_SNAPBACK}>just have to say i love the sig man, that gave me a good laugh at work.. 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