Jump to content
Sign in to follow this  

Newbe - Edit file type

Recommended Posts


I am looking for a way to automatically change the application used to launch a file type. The same way by going into folder options, file types, edit file type, editing action for type. I need to change settings in the DDE Message and the DDE Application Not Running. Any ideas?

Share this post

Link to post
Share on other sites

Welcome to the forum.

I think that all of that info is just written to the registry like in this post:


Take a look in the help file under RegWrite.

You can use any one of a number of registry monitoring tools to determine what data changes before and after you manually make the changes you are interested in - then mimic those changes via AutoIt's RegWrite function.



Share this post

Link to post
Share on other sites
The Kandie Man

Use FTYPE and ASSOC to set file associations.

Run(@ComSpec & " /c " & 'FTYPE txtfile=%SystemRoot%\system32\NOTEPAD.EXE %1', "", @SW_HIDE)
Run(@ComSpec & " /c " & 'ASSOC .txt=txtfile', "", @SW_HIDE)

By doing this you create a class of filetype that can be opened by a program you specify. Once you create that class of filetype, in this case, a text file, you can then add extensions that are text file extensions to the class. On the next line you see me add .txt files to the txtfile class which is opened with notepad.

I find using FTYPE and ASSOC much safer than directly editing the registry.

- The Kandie Man ;-)

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.