Results 1 to 14 of 14
  1. #1
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Dis-associate file? (WinXP)

    This may be a dumb question, but I would like to know:
    If I have a file that is not associated with a program, the file displays that typical windows icon in win. explorer. If I double click it / or right click and choose open with; I can associate it with a program. This is all fine, but say I want to now dis-associate it again so that it doesn't use the program I choose to keep opening the file. How do I do this? I was told that you need to use the registry to do this. Is there an easier way!!!???
    Regards,
    Rudi

  2. #2
    5 Star Lounger st3333ve's Avatar
    Join Date
    May 2003
    Location
    Los Angeles, California, USA
    Posts
    705
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Dis-associate file? (WinXP)

    From the Explorer menus: Tools --> Folder Options --> File Types.

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Dis-associate file? (WinXP)

    I tried to do what you mentioned st3333ve; and I do not find an SQL extention!!!
    Also, if I were able to change the association, would this action not change the association of all SQL files?
    The file in question (in the attachment) is a file I experimented on. I assigned an XLS association to it, and now I cannot dis-associate it! <img src=/S/confused.gif border=0 alt=confused width=15 height=20>. There was no association in the dialog box to reverse the action!
    Regards,
    Rudi

  4. #4
    5 Star Lounger st3333ve's Avatar
    Join Date
    May 2003
    Location
    Los Angeles, California, USA
    Posts
    705
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Dis-associate file? (WinXP)

    Maybe I'm misunderstanding. As far as I know, you can't associate a specific file with a program; you can only associate file extensions with programs, and the association applies to all files with that same extension. From the picture in your post, I'm guessing maybe the name of the file may be NorthwindCS.SQL.XLS, and that you're not seeing the .XLS because you've checked "Hide extensions for known file types" under Tools-->Folder Options-->View.

    Is this true? If so, (1) the way to un-associate that file from Excel would be to remove the .XLS extension, and (2) our man Woody (among others) strongly recommends that you keep "Hide extensions for known file types" un-checked at all times, for a variety of reasons, one of which is that checking it makes it easier for nefarious types to get you to activate viruses that you mistakenly believe to be some other type of file.

  5. #5
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Dis-associate file? (WinXP)

    I hear what you say st3333ve!
    In the attachment.... If you look at the NWIND9.CNT file, it is currently not associated, while the NorthwindCS.SQL is now associated with an Excel spreadsheet due to my earlier actions. (BTW > the .SQL is the extention, ie my extentions are visible!). I just want to know how I can dis-associate the file so that it returns to its original file format, which is no association! It is probably a ridiculous question, but I do not want it to associate with excel anymore!
    Sorry for being so irritating, and thanx for your patience in trying to help! If there is no logical answer for this I will understand. I'm not in a crisis about this, but I thought I might find an answer for this scenario, as it puzzled me. A friend of mine said it could possibly be done in the registry, but I'm not sure about that.

    There must be some answer though...? All I want to do is dis-associate it from any known file type to bring it back to what it was? (Weird)???
    Regards,
    Rudi

  6. #6
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Dis-associate file? (WinXP)

    Morning Hans,

    Sorry, I do not want to labour on this point...but I do not have a .sql key in the registry...
    I'm assuming that is why the original file was not associated in the first place.?
    Regards,
    Rudi

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Dis-associate file? (WinXP)

    If .SQL is not listed in the File Types tab of Tools | Folder Options... (which is strange, it should be listed if you associated it with an application), you will have to edit the registry: locate the .sql key under HKEY_LOCAL_MACHINE and delete it.

    Note: HKEY_CLASSES_ROOT is easier - it is an alias for HKEY_LOCAL_MACHINESOFTWAREClasses

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Dis-associate file? (WinXP)

    That there is no .sql key in HKEY_CLASSES_ROOT (or the equivalent HKEY_LOCAL_MACHINESOFTWAREClasses) fits with the fdact that there is no SQL item in the File Types tab of Tools | Folder Options. But it would mean that the .sql extension is not associated with any application - What happens if you double click an .sql file in Windows Explorer?

  9. #9
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Dis-associate file? (WinXP)

    > What happens if you double click an .sql file in Windows Explorer?

    Thats a problem too now! All the .sql files are now associated to excel! If I double click them, they open up in excel!
    Regards,
    Rudi

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Dis-associate file? (WinXP)

    I'm still puzzled, but try the following:
    - Right-click an .sql file in Windows Explorer.
    - Select Open With | Choose Program...
    - Select Notepad (probably in the 'Other Programs' section)
    - Tick the 'Always use the selected program ...' check box.
    - Click OK.
    Files with extension .sql should now open in Notepad (the default if I'm not mistaken)

  11. #11
    5 Star Lounger st3333ve's Avatar
    Join Date
    May 2003
    Location
    Los Angeles, California, USA
    Posts
    705
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Dis-associate file? (WinXP)

    As a follow-up, I'm running XP Pro SP-2 and SQL didn't show up in my associations list either (but, as Hans recalled, SQL files opened in Notepad by default). Just for kicks I associated .SQL with WordPad (using Hans's technique, in the Open With-->Choose Program dialog) and at that point it showed up in the list. Then I tried deleting the association in the File Types dialog. At that point, rather than reverting to the default (opening with Notepad), double-clicking on an SQL file caused Windows to tell me there was no association. Now I've re-associated SQL files with Notepad (using the Open With-->Choose Program dialog), and SQL shows up in the File Types list.

    Does anyone know why Windows keeps certain default associations from showing up in the File Types list?

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Dis-associate file? (WinXP)

    On my system (XP Home SP-2 at this moment), SQL is not listed in the File Types tab of Tools | Folder Options. The .sql extension does occur in HKEY_CLASSES_ROOT, however, and this key has an entry named "PerceivedType" with value "text". Further down in the registry, the "text" type is associated with Notepad in HKEY_CLASSES_ROOTSystemFileAssociations. That key aparently tells the system what to do with it as long as there is no explicit association for .sql itself. When you associate .sql with WordPad, the PerveivedType entry is probably deleted, and it doesn't get restored automatically if you remove the association with WordPad, so then .sql is an orphan.

  13. #13
    5 Star Lounger st3333ve's Avatar
    Join Date
    May 2003
    Location
    Los Angeles, California, USA
    Posts
    705
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Dis-associate file? (WinXP)

    Thanks for that extra background. Maybe I'll use it to restore the default set-up (with the PerceivedType key), which makes a certain amount of sense, although I guess ideally Microsoft might have figured out a way to display those indirect associations in the File Types dialog.

    LATER UPDATE TO POST: I believe I've restored the original set-up. In case Rudi or anyone else is interested:

    1. I went to the HKEY_CLASSES_ROOT.sql key and (a) changed the Default value to nothing (i.e., I just blanked the box), and ([img]/forums/images/smilies/cool.gif[/img] added a new REG_SZ value (i.e., string value) named PerceivedType, with "text" (without the quotation marks) as its Data.

    2. I deleted the HKEY_CLASSES_ROOTsql_auto_file key (and its subkeys).

  14. #14
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Dis-associate file? (WinXP)

    Thanx for all your comments Steve and Hans. I picked up a lots of extra tips through out this thread!
    Steve, i think you answered my original suspitions regarding de-associating a file...according to your findings "I went to the HKEY_CLASSES_ROOT.sql key and (a) changed the Default value to nothing...: it seems that you need to use the registry to de-associate effectively...returning the default to NOTHING.
    My questions are answered, thnx again!
    Regards,
    Rudi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •