Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    File Association - .sam

    Hi:
    I need some corroboration, as I did something stupid. I associated .sam with Word (accidentally <img src=/S/blush.gif border=0 alt=blush width=15 height=15>). I then deleted the .sam file in File Types & deleted it. .sam extension is not assocated with anything, now.

    Question 1:
    Other than Ami Professional Document (which I don't have), is .sam associated by default in Win98SE? (so I can reassociate it, if necessary).

    I do have files like:
    host.sam
    lmhost.sam
    & convert files in C:Program FilesMicrosoft OfficeOfficeConvert1033

    Question 2:
    If I create a file in Word & save it with a .sam extension, it will now open in Word with a double click in Explorer. Even holding the Shift key down doesn't bring up the option of "Open with...". Anyone know what key I should delete or change in the registry to bring this back?

    Thanks in advance.

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: File Association - .sam

    Phil,

    I don't know that you need to change the extension's association, necessarily. The LMHOSTS and HOSTS files with the SAM extension are simply SAMples.

    You can remove the association entirely, if you like - and you don't need the registry to do it. You can open an Explorer window, and then (depending on your version of Windows) hit View - Folder Options or Tools - Folder Options. There you will find your file extensions, where you can easily edit the actions and applications that work with various file types.

    Hope that helps,
    -Mark

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: File Association - .sam

    Thanks, Mark. I already removed the association...before I even checked to see if .sam had been associated with anything before. If it wasn't, then I don't need to restore any associations. Just wasn't sure what changes I made accidentally...& why filename.sam will now open with Word if it's a Word file. <img src=/S/confused.gif border=0 alt=confused width=15 height=20>

  4. #4
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: File Association - .sam

    If it's any help, I just had a look on my system, which runs Windows 98 SE and Office 2000. There is no association for .SAM

    StuartR

  5. #5
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: File Association - .sam

    Phil,
    Can you right_click on a .sam file created in Word and bring up the Properties of it?
    Does it show that it was created by Word?
    If so, I suspect the OS may be smart enough to read this info and act on it.
    (Have you done a re-boot since removing the association?)

  6. #6
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: File Association - .sam

    Thanks to everyone. Leif, if I right click & choose properties on a ".sam" file created by Word, the dialog box has all the tabs of a Word document & the context menu is the same as a Word document. Only the icon is different. I just renamed a normal Word document to filename.zzz, just to test it. It behaved just like a Word document, with no option to Open With... choice, if I held the Shift key down & right clicked.

    I created another file in Word & named it test.zzz. It behaved the same way. I could have sworn that holding down the shift key & right clicking a file with an unassociated extension always brought up a context menu with an Open with... command, but maybe I was dreaming. Funny, a regular .doc file can have an Open with... appear on the context menu, but a file created by Word (with a different extension) can't. This would mean that you can easily open a Word document with a .doc extension with Wordpad, but not if it has another extension. <img src=/S/confused.gif border=0 alt=confused width=15 height=20>

  7. #7
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    England
    Posts
    1,306
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: File Association - .sam

    <hr>.....holding down the shift key & right clicking a file with an unassociated extension always brought up a context menu with an Open with... command <hr>
    Only if there's an Open With...key (with a list of files to be used) in the null file key in the Registry. You may need to do a bit of hacking in the HKEY_CLASSES_ROOT section. Use the .doc key as a template, and add the Open with... key to whatever does not have it atm.

    btw: in mine .sam relates to AmiPro documents and nothing else.

  8. #8
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: File Association - .sam

    Hey Phil, I just had a thought that wasn't posted yet (if it is I need stronger coffee).

    Have you checked to make sure that Windows is showing you all file extensions? That could explain a lot of things. <img src=/S/hmmn.gif border=0 alt=hmmn width=15 height=15>
    Attached Images Attached Images
    -Mark

  9. #9
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Long Beach, California, USA
    Posts
    1,912
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: File Association - .sam

    Without AmiPro there is no association for .sam in Win98SE. Or I should say no COMPLETED association for .sam. This is my default Win98 .sam entry:

    [HKEY_CLASSES_ROOT.sam]

    [HKEY_CLASSES_ROOT.samAmiProDocument]

    [HKEY_CLASSES_ROOT.samAmiProDocumentShellNew]
    "FileName"="amipro.sam"

    This is a NON-functional entry and seems to only serve the purpose of notifying you that .sam can be associated with AmiPro. BUT, since there is NO (Default) entry under .sam, this entry is not associating .sam with anything.
    __________________________________________________ ____________

    If you want to see how your .sam entry is associated in the registry, open regedit and look under HKEY_Classes_Root. First look for the .sam entry. The (Default) value for this will be something like "samfile" -- or "sam_auto_file". For simplicity, let's assume it is "samfile". Notice that my above example does not have a (Default) value -- but yours will.

    Next look under HKCRsamfile -- or whatever your (Default) value for .sam is. You will find these sub-keys:

    shellopencommand

    The (Default) entry for 'command' entry is the path to the program that will open the ".sam" files. The "association" is between HKCR.sam and HKCR'samfile'shellopencommandpath. To eliminate the association, you could delete either -- or both -- of these two keys.

    On a new version of Win98 the HKCRsamfile key does not exist -- the .sam files are left un-associated. The simplest way to revert your computer back to its original state is to delete the HKCR'samfile' key.

  10. #10
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: File Association - .sam

    Thanks to everyone, again.
    rm: I already deleted my .sam extension under HKCR, so I have nothing there.
    Mel: Under .doc extension, I couldn't find an Open key or Open with key, but I do have one under doc_auto_file which has a Shell/Open/Command.
    Mark: I do have extensions showing.

    What I should have done at the time is simply restore the previous registry from my backup (or Wndows automatic backup), but I may have waited too long now. At this point, I don't see any harm (I don't have AmiPro).

  11. #11
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Long Beach, California, USA
    Posts
    1,912
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: File Association - .sam

    There will be no "Open" sub-key under the .doc key. The .doc key (Default) value will point to the appropriate "File Type" key. In your case, it appears that it should point to "doc_auto_file". This is NOT the usual File Type association for the .doc extension. Any file type that has that "xxx_auto_file" name is one that has been created by the "Open With..." dialog box having the "Always use this program..." box checked.

    The usual (Default) File Type association for the .doc extension is "Word.Document.X" -- where "X" is a number like 8 or 9 -- depending on your version of MS Word. Under the "HKCRWord.Document.X" key is the appropriate "shellopencommand" sub-key tree that dictates how a .doc file is opened. With MS Office files like these, there will also be "DDE" (Dynamic Data Exchange) sub-keys as well (ddeexecAplication | Topic).

    There is likely no harm in deleting the bogus ".sam" key. If there is a "sam_auto_file" key(or "samfile"), you could delete that as well as it serves no purpose without the corresponding .sam key.

  12. #12
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: File Association - .sam

    Hi rm:
    Thanks for the information. I'm even more puzzled as to my registry entries. Although I have Office 2000 Pro, the HKCR.doc shows Word.Document.8 under the Default value. It also has a subkey called Word.Document.8 which has a subkey of ShellNew, listing winword8.doc. I didn't upgrade from '97 either; I upgraded from Word 7. Although everything seems to be working OK, I'm wondering if I should reregister the .doc extension.

  13. #13
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Long Beach, California, USA
    Posts
    1,912
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: File Association - .sam

    Ooops! Sorry, I meant to enlighten, not confuse. The (Default) entry is all that counts. Windows checks the (Default) entry for any file extension, then moves to that result and finds out what executable is associated with that extension.

    For example, if you double-click on a .doc file, Windows "queries" HKCR.doc. It reads the (Default) value -- in your case, Word.Document.8. It then queries the HKCRWord.Document.8 key and reads the path listed as the (Default) value in HKCRWord.Document.8shellopencommand. For Windows98 it would be: "C:Program FilesMicrosoft OfficeOfficewinword.exe" /n. I suspect a similar entry would be there for Windows2K.

    Back to the HKCR.doc key... The "ShellNew" entries there are *fine*. They specify that "Microsoft Word Document" will appear on the "New" list when you right-click and select "New >".

    No, I don't think you need to do anything with the .doc extension. I suspect the doc_auto_file is not doing anything of significance -- at least not for files with a .doc extension.

  14. #14
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: File Association - .sam

    Hi rm:
    Thanks for all the information. I shall consider myself enlightened. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  15. #15
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Long Beach, California, USA
    Posts
    1,912
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: File Association - .sam

    A picture is worth a thousand words -- and probably two thousand of my words!! Below is an image of what Windows creates if you start with a NEW and unassociated file extension, and then use the "Open With..." dialog box to create an association.

    I began with a bogus file called "junk.dxc". The DXC extension did not exist previously on my computer. I right-clicked on it and selected Open With..., then I selected "winword" to be the program to "Always use..."

    1. A new file extension key was created in HKCR named ".dxc". The (Default) value was made "dxc_auto_file".
    2. A second key was created in HKCR named "dxc_auto_file". The sub-tree under this is the expected shellopencommand which ends in a (Default) value path to "winword".
    3. Since this was created with the Open With... box, there is no DDE entries, no Print entries, no "ShellEx" (shell extension) entries -- it is just a simple association between the .dxc extension and winword.exe.
    Attached Images Attached Images

Page 1 of 2 12 LastLast

Posting Permissions

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