Wijono Posted July 25, 2006 Posted July 25, 2006 To be frank I don’t remember what I have done.In one of the Win98SE, I can only have file extension of not more than 3 characters, e.g., if I associate a file with the name CRAZY.CRAZY to a certain program, in the registry it will be taken under HKCR as .CRA file. Whereas in another Win98SE PC, it can be taken full as .CRAZY file.Could someone help to enlighten me, what could possibly be causing that different behavior?
Wijono Posted July 25, 2006 Author Posted July 25, 2006 Additional information, when I right-click the file CRAZY.CRAZY and select "Open With...", the dialog box will say: "Click the program you want to use to open the file 'CRAZY~1.CRA'. Meaning the truncation already takes place in the "Open With" dialog box!Help me please ... what could cause that truncation???
MDGx Posted July 25, 2006 Posted July 25, 2006 Possibly this ?http://www.mdgx.com/newtip9.htm#NUMTAILOr you may have used scandskw /o :http://www.mdgx.com/newtip18.htm#SHS
Wijono Posted July 26, 2006 Author Posted July 26, 2006 Thanks a lot MDGX for your effort trying to help.It seems like a bit misunderstanding. What I need is the other way around, i.e., I want to keep long filename, not converting long filename into 8.3 format.Any hint??
Wijono Posted July 26, 2006 Author Posted July 26, 2006 Finally I found the culprit myself.If the default command in the registry key [HKEY_CLASSES_ROOT\*\Shell\Open With...\command] is:rundll32.exe shell32.dll,OpenAs_RunDLL %1then when I right-click the file Crazy.crazy and select "Open With...", the dialog box will say: "Click the program you want to use to open the file 'CRAZY~1.CRA'". I.e., the LFN is truncated into 8.3 format.If I change the default command into:C:\Windows\rundll32.exe shell32.dll,OpenAs_RunDLL %1then the message in "Open With..." dialog box is now:"Click the program you want to use to open the file 'Crazy.crazy'", meaning no more truncation!It is really hard to believe but true. My only assumption is that the command line mentioned earlier will somehow start rundll32.exe in 16-bit mode, hence the truncation. Anyone has a better explanation?
MDGx Posted July 27, 2006 Posted July 27, 2006 (edited) Thanks for your work finding this bug + fix.Have you tried changing that registry value to:C:\\WINDOWS\\rundll32.exe C:\\WINDOWS\\SYSTEM\\shell32.dll,OpenAs_RunDLL %1Make sure the backslash is doubled for all drive + directory paths in the registry.Single backslash is interpreted by the registry as Escape character.More info here [look towards the bottom of the topic]:http://www.mdgx.com/reg.htm#RFSeparators and delimiters used in REG files on path name lines to separatedrive letters, directory (folder) names and file names, or used on commandline parameters lines etc... MUST be typed as DOUBLE backslash marks (\\).Here the first backslash (treated by the Registry as Escape character) is usedto tag ("mark") the next character, the second backslash in this case. Regeditinterprets in fact these two backslashes as a single one, and only the secondbackslash is processed as such. The first one is ignored.Exception: Registry (Sub)Key path names used in REG files MUST be separated bySINGLE backslash marks (\).FYI:All those who have Windows 98/ME installed in any other location than C:\WINDOWS *must* adapt path names to match their setups.HTH Edited July 27, 2006 by MDGx
Wijono Posted July 28, 2006 Author Posted July 28, 2006 Hi MDGx,Thanks for your message.It works also fine with the command you mentioned, i.e.:C:\WINDOWS\rundll32.exe C:\WINDOWS\SYSTEM\shell32.dll,OpenAs_RunDLL %1I know that we need double-backslash in the REG file, as you could see from my other post here:http://www.msfn.org/board/index.php?showtopic=79277#What I meant in the messages above is those command that we see in and change manually with REGEDIT.I have the feeling that it is somehow a little bug of RUNDLL32.EXE, it behaves like a 16-bit application if we call it in the following command:rundll32.exe shell32.dll,OpenAs_RunDLL %1Agree?Anyway thank you so much.
MDGx Posted July 29, 2006 Posted July 29, 2006 Thanks for the tips, Wijono.Good find.Theoretically this shouldn't happen.1 more bug in M$ OS, I guess.
MDGx Posted August 1, 2006 Posted August 1, 2006 I remember trying this fix a while back in Win98SE + ME, with mixed results.You may want to try it too [similar to yours]:-------snip-------REGEDIT4[HKEY_LOCAL_MACHINE\Software\CLASSES\*\shell\openas\command]@="RUNDLL32.EXE C:\\WINDOWS\\SYSTEM\\SHELL32.DLL,OpenAs_RunDLL %1"[HKEY_LOCAL_MACHINE\Software\CLASSES\Unknown\shell\openas\command]@="RUNDLL32.EXE C:\\WINDOWS\\SYSTEM\\SHELL32.DLL,OpenAs_RunDLL %1"-------snip-------Change C:\\WINDOWS if different on your computer.Save as REG file in Notepad and then run it.HTH
Wijono Posted August 1, 2006 Author Posted August 1, 2006 Basically it is sufficient to do it only at one location, because the system will automatically copy it in the other location.What I mean is, if we for example add following key:[HKEY_LOCAL_MACHINE\Software\CLASSES\*\Shell\Open With...\command]@="C:\\Windows\\rundll32.exe shell32.dll,OpenAs_RunDLL %1"then the system will automatically add following key:[HKEY_CLASSES_ROOT\*\Shell\Open With...\command]@="C:\\Windows\\rundll32.exe shell32.dll,OpenAs_RunDLL %1"and vice-versa.If we apply what you mentioned, i.e.,[HKEY_LOCAL_MACHINE\Software\CLASSES\*\shell\openas\command]@="RUNDLL32.EXE C:\\WINDOWS\\SYSTEM\\SHELL32.DLL,OpenAs_RunDLL %1"then the long filename in the "Open With..." pop-up will be truncated.Whereas, as I have mentioned else where, I have renamed (not delete) following keY:[HKCR\Unknown] into [HKCR\Unknown-]in order to avoid double "Open With..." in the context menu for unknown file extension. Deleting either [HKCR\Unknown] or [HKLM\Software\CLASSES\Unknown] is also fine if you do not intend to revert back to it one day.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now