Registering Extensions/Associations - two methods
#1
Posted 25 January 2005 - 01:41 PM
Registering File Extensions Unattended (Fortunately, I had it in my history so I was able to get the link).
Anyway, I was looking at this post and comparing it with the alternative method:
Gosh's Unattended Tips And Tricks: Trick #3: Associate file types
To me, using the ASSOC command and FTYPE seems to be a cleaner way of doing it than lots of registry stuff.
I'd like to know ppls opinions on this. Is there a prefered method?
#2
Posted 25 January 2005 - 04:12 PM
If you are starting from a situation where you KNOW that your app doesn't already have any entries in the registry, and its YOU who has to do it all, then the .REG method is good.
#3
Posted 25 January 2005 - 05:22 PM
As a test I took my favorite editor (EditPlus) and copied it to my Clean VPC install.
I then did the following:
C:\>ftype editplus=c:\editplus\editplus.exe %1 %* editplus=c:\editplus\editplus.exe %1 %* C:\>assoc .txt=editplus .txt=editplus
I then double-clicked a txt file and viola! it loaded EditPlus with the txt file. Have I missed something? Icons maybe?
#4
Posted 25 January 2005 - 05:53 PM
OriginalSinner, on Jan 26 2005, 04:52 AM, said:
editplus=c:\editplus\editplus.exe %1 %*
If you are comfortable with batch-files, it is far easier to do it that way. Dump the .reg way.
Oh, and its a good idea to NOT use absolute paths. Always use system variables. For example,
Quote
ftype editplus=%systemroot%\editplus\editplus.exe %1 %* ---> is good
Also, if you are able to use this method itself for all associating all your extensions, then announce your findings in the "Registering File Extensions Unattended (REG)" thread. Probably they might be interested to move over to a less-complex method.
#5
Posted 25 January 2005 - 07:43 PM
#6
Posted 26 January 2005 - 03:33 AM
prathapml, on Jan 25 2005, 05:53 PM, said:
Oh of course it was only an example my scripts never have absolute paths in. Sorry I should follow the rules ALL the time. Call myself a programmer. Pah! Slap those wrists
#7
Posted 26 January 2005 - 04:28 AM
I'll make any issues I come across known. Thanks again.
#8
Posted 26 January 2005 - 01:05 PM
#9
Posted 26 January 2005 - 01:35 PM
#10
Posted 17 June 2005 - 07:22 AM
assoc .dat=VCDMovie ftype VCDMovie="%programfiles%\vlc\vlc.exe" %%1 %%*
Like a file "c:\Music\My videos\my saved video.dat" doesn't open in VLC, but a file without name space can be opened.
#12
Posted 18 June 2005 - 02:50 AM
This post has been edited by clavicle: 18 June 2005 - 02:52 AM



Help

Back to top









