Damn Winblows and File Associations

GEC: Discuss gaming, computers and electronics and venture into the bizarre world of STGODs.

Moderator: Thanas

Post Reply
User avatar
Wicked Pilot
Moderator Emeritus
Posts: 8972
Joined: 2002-07-05 05:45pm

Damn Winblows and File Associations

Post by Wicked Pilot »

OK, here's the deal, everytime I update Winblows, it goes in and fucks up all my media file associations. It makes Media Player the default viewer for all my mp3, wav, avi, mpg, etc files. It also fucks up the icons I use to identify those said files. Is there any way to cement my associations so that they aren't screwed with everytime I update? If not, is there any file I can possibly back up to preserve my settings whenever I update? It insanely pisses me off to have to go back manually and change everything back the way it was before.
The most basic assumption about the world is that it does not contradict itself.
User avatar
phongn
Rebel Leader
Posts: 18487
Joined: 2002-07-03 11:11pm

Post by phongn »

There is an option (under the File Type tab in Tools->Options) to set WMP's file settings. Deselecting them should force them to the previous application, if you're using Winamp you can also have it enforce its file associations as well.
User avatar
SyntaxVorlon
Sith Acolyte
Posts: 5954
Joined: 2002-12-18 08:45pm
Location: Places
Contact:

Post by SyntaxVorlon »

About to say the same.
User avatar
Slartibartfast
Emperor's Hand
Posts: 6730
Joined: 2002-09-10 05:35pm
Location: Where The Sea Meets The Sky
Contact:

Post by Slartibartfast »

Any program can take over any association at any time. A lot of programs take over assocs. when installed, and others can do it afterwards with an option. Some will take over it everytime it's run no matter what.

I think both WM and WA can be told NOT to take over assocs.
Image
User avatar
Xon
Sith Acolyte
Posts: 6206
Joined: 2002-07-16 06:12am
Location: Western Australia

Post by Xon »

What OS do you have?

If it is Win9x (Win95, Win98, Win98se, WinME) then your out of luck.

If you have a WinNT derivitive (WinNT, Win2k, WinXP, Win2k3) and are willing todo a bit of registary hacking you can make so no application can change your file associations.

A few terms:
Key:These make up the structure on the righthand side of RegEdit
Value:Name & value pair on the lefthand side of RegEdit

Run regedit, select HKEY_CLASS_ROOT, then find the file association (".mp3", ".doc" etc).

Then right click on the key name, select permisions->Advanced->Select the "Allow Administrators(<your computer name>\Administrators) ... " line. Then Click 'Edit' Then click on the Deny check box for the following enteries: "Delete", "Set value", "Create subkey". Then hit "OK", then check the checkbox "Replace permisions entries on all child objects with entries shown here that apply to child objects", then hit apply.

There should be a value called "Default", which contains a text string. Search for that string, and it should find another key. Apply the same steps as seen above to it.

Also, you might want to change every user EXCEPT "System" (This user represents the KERNAL, so you may damage basic functionality by altering it ) which has "Full Controll" to be denyed write acess.

WARNING
Altering the registery permisions settings can irreversibly trash your windows install. Exporting & importing registry data will not fix trash permission settings.

Also it might be a good idea to deny wrire access to anyone the following registery entries:
HKEY_CLASS_ROOT\.exe
HKEY_CLASS_ROOT\exefile
HKEY_CLASS_ROOT\.bat
HKEY_CLASS_ROOT\batfile
HKEY_CLASS_ROOT\.scr
HKEY_CLASS_ROOT\scrfile
And any other executable file types(I'm fairly sure I missed some).

You can get away with denying write access to the entire HKEY_CLASS_ROOT branch, to all users (except "SYSTEM" or other users representing the OS itself)
"Okay, I'll have the truth with a side order of clarity." ~ Dr. Daniel Jackson.
"Reality has a well-known liberal bias." ~ Stephen Colbert
"One Drive, One Partition, the One True Path" ~ ars technica forums - warrens - on hhd partitioning schemes.
User avatar
Crayz9000
Sith Apprentice
Posts: 7329
Joined: 2002-07-03 06:39pm
Location: Improbably superpositioned
Contact:

Post by Crayz9000 »

By the way, ggs, denying write access to exe files can wreak havoc with Microsoft Office.
A Tribute to Stupidity: The Robert Scott Anderson Archive (currently offline)
John Hansen - Slightly Insane Bounty Hunter - ASVS Vets' Assoc. Class of 2000
HAB Cryptanalyst | WG - Intergalactic Alliance and Spoof Author | BotM | Cybertron | SCEF
User avatar
Xon
Sith Acolyte
Posts: 6206
Joined: 2002-07-16 06:12am
Location: Western Australia

Post by Xon »

Crayz9000 wrote:By the way, ggs, denying write access to exe files can wreak havoc with Microsoft Office.
Microsoft Office runs fine under a limited user, which does not have write access to HKEY_CLASS_ROOT OR the actual exe it self.

And this is only denying write access to the exe file extension.

So any info on how this wreak havoc with Microsoft Office?

Of course it would depends on the version. The version for win9x probable would crap up.
"Okay, I'll have the truth with a side order of clarity." ~ Dr. Daniel Jackson.
"Reality has a well-known liberal bias." ~ Stephen Colbert
"One Drive, One Partition, the One True Path" ~ ars technica forums - warrens - on hhd partitioning schemes.
User avatar
Wicked Pilot
Moderator Emeritus
Posts: 8972
Joined: 2002-07-05 05:45pm

Post by Wicked Pilot »

phongn wrote:There is an option (under the File Type tab in Tools->Options) to set WMP's file settings. Deselecting them should force them to the previous application, if you're using Winamp you can also have it enforce its file associations as well.
I use the old Media Player 6 for mp3, wav, avi, and mpg associations. It loads much faster and is less cluttered than the more recent WMP. It does not have the option you described.

Is there any way I can backup whatever file controls the file associations and icons?
The most basic assumption about the world is that it does not contradict itself.
User avatar
Slartibartfast
Emperor's Hand
Posts: 6730
Joined: 2002-09-10 05:35pm
Location: Where The Sea Meets The Sky
Contact:

Post by Slartibartfast »

Damn, I just remembered (after managing to install Basilisk) one of the things that ruled about the Macintosh. Instead of extensions, you had a 4 letter tag identifying the file (so it didn't have to be called something.jpg, just have JPEG as the tag somewhere in the file info - just like a file has a "date"). Not only that, but there was an aditional 4 letter tag called "Creator", which basically identified the default program that should open it (the one that saved it, typically). Dragging and dropping was also neat, because if an app didn't support a certain file type, you couldn't drag the file onto it.

So in theory you could have MP3 files that default to Media Player, others that default to Winamp... don't remember what happened when you downloaded a file, say with Mozilla, because it wouldn't make sense to make a MP3 file with a Mozilla tag, because Mozilla isn't exactly a player... I think it just puts a blank tag, and the system chooses the first app that it finds.
Image
User avatar
Exonerate
Sith Marauder
Posts: 4454
Joined: 2002-10-29 07:19pm
Location: DC Metro Area

Post by Exonerate »

Once one of my friends was screwing around with the registry, and messed up the file assocation for .exe files.

Needless to say, he was fucked. Couldn't even run RedEdit to fix his mistake.

BoTM, MM, HAB, JL
User avatar
Crayz9000
Sith Apprentice
Posts: 7329
Joined: 2002-07-03 06:39pm
Location: Improbably superpositioned
Contact:

Post by Crayz9000 »

Exonerate wrote: Needless to say, he was fucked. Couldn't even run RedEdit to fix his mistake.
I wish Microsoft made a real-mode DOS Registry editor, and I'm not talking about a pathetic backup tool.
A Tribute to Stupidity: The Robert Scott Anderson Archive (currently offline)
John Hansen - Slightly Insane Bounty Hunter - ASVS Vets' Assoc. Class of 2000
HAB Cryptanalyst | WG - Intergalactic Alliance and Spoof Author | BotM | Cybertron | SCEF
User avatar
phongn
Rebel Leader
Posts: 18487
Joined: 2002-07-03 11:11pm

Post by phongn »

Slartibartfast wrote:So in theory you could have MP3 files that default to Media Player, others that default to Winamp... don't remember what happened when you downloaded a file, say with Mozilla, because it wouldn't make sense to make a MP3 file with a Mozilla tag, because Mozilla isn't exactly a player... I think it just puts a blank tag, and the system chooses the first app that it finds.
This was known as the resource fork. There were two fields, one that identified file type and the other that identified application association. There were various tools (ResEdit being the most famous) that allowed you to modify them. If you downloaded an MP3, the type and application tags usually would be blank but various extensions to MacOS allowed recognition of DOS-style extensions.

Unfortunately, Apple appears to be abandoning metadata.
User avatar
phongn
Rebel Leader
Posts: 18487
Joined: 2002-07-03 11:11pm

Post by phongn »

Wicked Pilot wrote:I use the old Media Player 6 for mp3, wav, avi, and mpg associations. It loads much faster and is less cluttered than the more recent WMP. It does not have the option you described.
In WMP6.4, go to View->Options and select the 'Formats' tab.
Is there any way I can backup whatever file controls the file associations and icons?
Yeah, but I don't remember what registry keys control that.
User avatar
Crayz9000
Sith Apprentice
Posts: 7329
Joined: 2002-07-03 06:39pm
Location: Improbably superpositioned
Contact:

Post by Crayz9000 »

phongn wrote:
Wicked Pilot wrote:Is there any way I can backup whatever file controls the file associations and icons?
Yeah, but I don't remember what registry keys control that.
All file associations are under the HKEY_CLASSES_ROOT branch. Once you expand that, you have a list of the extensions, which only contain a reference to the handling class. Then you scroll down to the handlers, which tell you what program to use.

That way, you can change what handler the file type points without losing the previous handler.

Special things like folder styles and odd Windows settings are stored under HKEY_CLASSES_ROOT\CLSID.
A Tribute to Stupidity: The Robert Scott Anderson Archive (currently offline)
John Hansen - Slightly Insane Bounty Hunter - ASVS Vets' Assoc. Class of 2000
HAB Cryptanalyst | WG - Intergalactic Alliance and Spoof Author | BotM | Cybertron | SCEF
User avatar
Slartibartfast
Emperor's Hand
Posts: 6730
Joined: 2002-09-10 05:35pm
Location: Where The Sea Meets The Sky
Contact:

Post by Slartibartfast »

phongn wrote:This was known as the resource fork. There were two fields, one that identified file type and the other that identified application association.
I know about the resource fork, but from what I remember, the type and creator weren't part of it. They were "directory info" data, just like the date or the file name.
Image
User avatar
phongn
Rebel Leader
Posts: 18487
Joined: 2002-07-03 11:11pm

Post by phongn »

Slartibartfast wrote:I know about the resource fork, but from what I remember, the type and creator weren't part of it. They were "directory info" data, just like the date or the file name.
I'm almost positive the creator and type flags were in the resource fork. Metadata rocks :D
User avatar
Xon
Sith Acolyte
Posts: 6206
Joined: 2002-07-16 06:12am
Location: Western Australia

Post by Xon »

phongn wrote:
Slartibartfast wrote:I know about the resource fork, but from what I remember, the type and creator weren't part of it. They were "directory info" data, just like the date or the file name.
I'm almost positive the creator and type flags were in the resource fork. Metadata rocks :D
NTFS supports metadata, but its called 'streams' and can be referenced by index or name. Nothing actually uses it however(but the OS supports the functionalty).

You can use it to hid the image name of the running process, since taskmanager reports the physical file's name not what stream the process is from.

And since Explorer and probable every other Shell replacement isnt stream aware (it only sees the 1st stream, and ignores everything else) you can have a 'empty' file (1st stream is has a length of zero), but all your hhd space is used up by some other streams.
"Okay, I'll have the truth with a side order of clarity." ~ Dr. Daniel Jackson.
"Reality has a well-known liberal bias." ~ Stephen Colbert
"One Drive, One Partition, the One True Path" ~ ars technica forums - warrens - on hhd partitioning schemes.
User avatar
Xon
Sith Acolyte
Posts: 6206
Joined: 2002-07-16 06:12am
Location: Western Australia

Post by Xon »

Crayz9000 wrote:
Exonerate wrote: Needless to say, he was fucked. Couldn't even run RedEdit to fix his mistake.
I wish Microsoft made a real-mode DOS Registry editor, and I'm not talking about a pathetic backup tool.
I learned that the hardway when I prevented all 16-bit & 32-bit programs from running under Win98.

And it took me a while to remember the registry key to alter (dump a chunk of the registry, look for the key, find the right key, then change itt, import altered key back in).

That was painfull.
"Okay, I'll have the truth with a side order of clarity." ~ Dr. Daniel Jackson.
"Reality has a well-known liberal bias." ~ Stephen Colbert
"One Drive, One Partition, the One True Path" ~ ars technica forums - warrens - on hhd partitioning schemes.
User avatar
phongn
Rebel Leader
Posts: 18487
Joined: 2002-07-03 11:11pm

Post by phongn »

ggs wrote:NTFS supports metadata, but its called 'streams' and can be referenced by index or name. Nothing actually uses it however(but the OS supports the functionalty).
Actually, the old AppleTalk server used streams to preserve the resource fork. Nothing else used it, IIRC.
User avatar
Crayz9000
Sith Apprentice
Posts: 7329
Joined: 2002-07-03 06:39pm
Location: Improbably superpositioned
Contact:

Post by Crayz9000 »

Actually, I just realized a wonderful thing about Linux. Theoretically, if I (or something else) screws up the file association for .exes under Windows 98 or 2000, I can use WINE to fire up Regedit and fix the screwup :P
A Tribute to Stupidity: The Robert Scott Anderson Archive (currently offline)
John Hansen - Slightly Insane Bounty Hunter - ASVS Vets' Assoc. Class of 2000
HAB Cryptanalyst | WG - Intergalactic Alliance and Spoof Author | BotM | Cybertron | SCEF
User avatar
Slartibartfast
Emperor's Hand
Posts: 6730
Joined: 2002-09-10 05:35pm
Location: Where The Sea Meets The Sky
Contact:

Post by Slartibartfast »

phongn wrote:
Slartibartfast wrote:I know about the resource fork, but from what I remember, the type and creator weren't part of it. They were "directory info" data, just like the date or the file name.
I'm almost positive the creator and type flags were in the resource fork. Metadata rocks :D
Okay, I just checked with ResEdit, and the type & creator aren't anywhere in the resource fork. They are in the "file info". This isn't so difficult to understand, since there are files that lack a resource fork (a text document, or zipfile) and still, they have this "file info" like name, locked flag, type & creator, creation date & time, modification date & time, label and invisible tag, among others.
Image
User avatar
phongn
Rebel Leader
Posts: 18487
Joined: 2002-07-03 11:11pm

Post by phongn »

Damn it, you're right. I forgot about that.

OTOH, ZIP files are generally handled by MacOS's DOS support routines, aren't they?
Post Reply