Science Forums
User Name
Password
Science Social Network
home    members    help/rules    who is online    contact   

Go Back   Science Forums > Physical Sciences Forums > Computer Science > Tutorials
Become a science forums sponsor today
Comment
 
LinkBack Tutorial Tools
Published by alexander 08-28-2008
Win admin by day, i have to deal with this crap sometimes, so i wrote up a, what i believe to be a neat tutorial, though its not the type of stuff i would post on my website, it would fit fine here

This works as well for Terminal Server (and i wrote this for that reason) as it does on your regular home system, commands are the same, principals are too, and so forth.

File association on Windows Server or other operating system is a global setting, thus has to be approached very carefully and thoughtfully.

There are two utilities to assist you with this (both command line):
assoc and ftype

assoc - associates an extension to a association defined in ftype
ftype - associates an ftype name to a program

Why two utilities? Simple, one ftype can point to many associated extensions, DWF viewer, for example points to both a .dwf file and .dwfx, thus you will likely have more associations then file types.

How to facilitate associating a file:

First you want to look at what kind of values, the extension is associated with. Open up command prompt and run assoc (no arguments). You are now presented with the list of all of the extensions your computer/server knows. Scroll up or down to find the one in question, or lack thereof.

If you find the extension, note where it points.
ex: .txt=TextFile

Now run ftype (no arguments); this will list the association of the second part of the previous command, to the actual program. Scroll up/down to find your file type association.
ex: TextFile=WinWord.exe "%1"

Now the fun stuff:
If you want to disassociate an extension, simply run assoc with the extension equal to nothing
ex: assoc .txt=

if you want to change the associated program, run ftype with the already named association and point it to a different application, note follow the program with a "%1" which will, upon execution of the command, insert the first argument (aka the file name) and append it to the end of the command.

ex: ftype TextFile="C:\Program Files\Crazy Text Editor\editor.exe" "%1"

If you want to create a new extension, or change another one, you can now point to the program association
ex: assoc .text=TextFile

Any file that ends with .text, and .txt will now be opened in the "Crazy Text Editor"

Note: BE EXTREMELY CAREFUL WITH THIS, YOU CAN REALLY MESS UP YOUR SYSTEM!!!
  #1  
By DougF on 08-28-2008
Lightbulb Re: Windows File Association Tutorial

Thanks for the information alexander,
I really want to understand the inter most workings of my computer.
Reply With Quote
  #2  
By alexander on 08-28-2008
Re: Windows File Association Tutorial

Lol then switch to Linux, because you will understand the inner workings a lot more, if you deal with them for a while

when you start reading up on paging algorithms, on file systems, on memory management, on preemptive algorithms, oh, also subscribe to the Linux Journal and read their df -u section, and research anything you dont understand in it (its all about upcoming changes and projects within the linux kernel)
Reply With Quote
  #3  
By Buffy on 08-28-2008
Re: Windows File Association Tutorial

Quote:
Originally Posted by alexander View Post
Note: BE EXTREMELY CAREFUL WITH THIS, YOU CAN REALLY MESS UP YOUR SYSTEM!!!
Uh, yup!

...which is really why I'd tell anyone who did not have some significant OS expertise to forget everything that alex just said, and just go to Windows Explorer and select Tools -> Folder Options -> File Types and then use the interactive interface, which although not terribly intuitive, does all the same stuff.

Just don't delete anything or change anything without double checking what the existing associations are!

Beware of programmers who carry screwdrivers,
Buffy
Reply With Quote
  #4  
By alexander on 08-29-2008
Re: Windows File Association Tutorial


Quote:
Windows Explorer and select Tools -> Folder Options -> File Types and then use the interactive interface, which although not terribly intuitive, does all the same stuff.
it does, until you reach a terminal server and do a ftype to find out that pdf points to f0000e3 and then you go, oh so that's why the file association was not working for everyone.... oookay then... lets me fix it the right way
Reply With Quote
Comment

Bookmarks

Tags
assoc, association, file, ftype, server, tutorial, windows


Currently Active Users Viewing This Tutorial: 1 (0 members and 1 guests)
 
Tutorial Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Tutorial Tutorial Starter Category Comments Last Post
Does mankind have a positive association to the environment ? clapstyx Environmental Studies 4 04-02-2008 02:12 AM
Problem creating file Mercedes Benzene Computer Science 11 01-21-2008 10:02 AM
Fullbright Association Tarantism Watercooler 3 06-11-2006 02:49 PM
PHP Tutorial AGThePoet Computer Science 3 12-24-2003 07:14 PM


All times are GMT -8. The time now is 04:06 PM.

Hypography?

Hypography [n.]: A combination of "hyperlink" and "bibliography" - ie, a list of links to electronic documents. Comparable to discography and bibliography, but not cartography.

We have been online since May 2000, and aim to be the best place to find and share science-related content of all kinds.

Share the love!

Please add more science to your life. Use our RSS feeds on your blog, your portal, or your favorite feedreader!

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. Copyright © 2000-2008 Hypography
Part of the Hypography - Science for Everyone Network
Powered by GARS © 2005-2008