Sign in to follow this  
Followers 0
possmkngdm

creating file associations

3 posts in this topic

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

Share this post


Link to post
Share on other sites



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].

Share this post


Link to post
Share on other sites

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].

<{POST_SNAPBACK}>

just have to say i love the sig man, that gave me a good laugh at work..

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0