Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File Association Oddity 1

Status
Not open for further replies.

SeanDotson

Programmer
Aug 1, 2004
16
US
I recently reinstalled XP pro on one of my machines. When I double click on a non-associated extension (such as ASP or PHP) it asks (as expected) what i want to associated it with.

I select WordPad for example and check the box "Always use selected program to open..." The file opens. However the next time I try I am asked to associate it again.

In the top of this window I notice it lists the file name. It lists it in 8.3 format with a extra quote mark after the filename.

e.g. hgygtr~1.php" or thisfile.php"

In my file association list it lists one for PHP and another for PHP"

any clues?
 
I believe I have a clue. Somehow the number of quotation marks passed in the command string were wrong when the association was made. In Windows Explorer, Tools, Folder Options, use the Advanced Tab after double-clicking each entry.

The entry under Open should look like:
"C:\Program Files\Windows NT\Accessories\wordpad.exe" "%1"
-or-
C:\WINDOWS\WORDPAD.EXE "%1"

See:
You might consider using a freeware PHP specific editor. See:
 
The open and edit lines are fine. The extra quote is actually in the filename. It lists the filename as fname.php" or fname.asp"

In the file assocation menu (folder options) it lists:

.php and .php"
.asp and .asp"

Somehow it's bringing a " with the filename.

Very odd. None of my other XP boxes show this problem. I have formatted and reinstalled XP 2 times now.
 
For a file association, the Win2k/XP syntax differs from Win9x/ME/NT:

On Windows 95/98/Millenium/NT, the Registry Editor automatically encloses the value within quotation marks. When you click OK, the (Default) value should look exactly like this:

""%1" %*"

On Windows 2000/XP, the additional quotation marks will not appear. When you click OK, the (Default) value should look exactly like this:

"%1" %*

If the association is created using the Win9x/ME/NT syntax, the extra quotation mark appears.

If it helps you any, Service Pack 2 RC2, includes a new and updated Wordpad.exe that supports long file names, not just short file names as the older version did.

I suspect rather than re-installing XP if you would use the new version (file date June 6, 2004) with long filename support and re-associated the problem would disappear.


 
I'll take a look at the new SP. Strange that I've never seen this before.

Any idea if it could have to do with the disk being formatted FAT32 vs NTFS?

Also strange that checking the box won't make the file assoc. "stick".
 
Not a FAT32 v. NTFS issue.
I suspect the fault lies squarely with Wordpad and short filename support.

 
But the problem is the same for other file type. For example mp3 won't play on Media PLayer when I delete the association the try to reassociate. Same for jpeg files.

It's a filename issue IMO.
 
Yep.. been there. Fixes some of them but there is still some fundamental issue.
 
Last thought:

Start, Run, regsvr32 /i shell32.dll
 
Well why didn't you just say that first? ;)

Worked. Wonderful! Thanks for suffering through this with me. A well deserved star for you!!!!
 
Just being difficult I guess.

Glad you got the issue sorted.

Best,
Bill Castner
 
You know I was kidding right? Thanks again for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top