You are here: PSPad forum > English discussion forum > PSPad 5.4.5 (2346) change New Text Document.txt into New Text Document.TXT on Windows Vista

PSPad 5.4.5 (2346) change New Text Document.txt into New Text Document.TXT on Windows Vista

Goto Page: 1 2 Next

#1 PSPad 5.4.5 (2346) change New Text Document.txt into New Text Document.TXT on Windows Vista

Posted by: But Thep | Date: 04/10/2009 18:26 | IP: IP Logged

Dear all,

I have just found an issue in PSPad 5.4.5 (2346) running on Windows Vista (but not in XP):

After closing PSPad, it changes [HKEY_CLASSES_ROOT\.txt] registry key into [HKEY_CLASSES_ROOT\.TXT] (Uppercase TXT), and the second launch of the "New > Text Document" command using the context menu in Window Explorer creates a file name "New Text Document.TXT" instead of "New Text Document.txt". This is an annoying extension!

If I change [HKEY_CLASSES_ROOT\.TXT] to [HKEY_CLASSES_ROOT\.txt], then the issue is solved until the next start and exit of PSPad.

Any help would be appreciated.

But Thep.

Options: Reply | Quote | Up ^


#2 Re: PSPad 5.4.5 (2346) change New Text Document.txt into New Text Document.TXT on Windows Vista

Posted by: pspad | Date: 04/11/2009 17:05 | IP: IP Logged

I don't create any registry association during PSPad start.
I check code and when I associate TXT (user request in Program settings). In this case I check (and if it doesn't exists) I create .txt (not .TXT) key.

Look for problem in Vista, not in PSPad or use some registry monitor to check your registry activity.

Options: Reply | Quote | Up ^


#3 Re: PSPad 5.4.5 (2346) change New Text Document.txt into New Text Document.TXT on Windows Vista

Posted by: But Thep | Date: 04/13/2009 06:08 | IP: IP Logged

pspad:
I don't create any registry association during PSPad start.
I check code and when I associate TXT (user request in Program settings). In this case I check (and if it doesn't exists) I create .txt (not .TXT) key.

Look for problem in Vista, not in PSPad or use some registry monitor to check your registry activity.

Dear PSPad,

Thanks for your instant reply!
Maybe you are right. However, I don't have the same issue when using other editors.

Can you reproduce the issue in your installation of Windows Vista?

Regards,
But Thep.

Edited 1 time(s). Last edit at 04/13/2009 06:08 by But Thep.

Options: Reply | Quote | Up ^


#4 Re: PSPad 5.4.5 (2346) change New Text Document.txt into New Text Document.TXT on Windows Vista

Posted by: Programmer | Date: 04/13/2009 21:55 | IP: IP Logged

A new file is based on your default file type, or current open selected file (unless you select the option New Default: Always This Type). If you open FILE.txt then select File > New you get New1.txt. If you open FILE.TXT then select File > New you get New1.TXT.

These files New.TXT and New.txt are viewed exactly the same by Windows (of any version). Both files cannot exist at the same time. If you open a DOS window and type DIR /ON you get a directory listing by filename, case insensitive. If you open a Windows Explorer window and sort the files by name, it is case insensitive. If Windows Explorer tells you the generic file type, it will show the uppercase "EXT File". If you create file "New.TXT" then call a method which asks Windows "Does New.txt exist?" it will return YES.

Options: Reply | Quote | Up ^


#5 Re: PSPad 5.4.5 (2346) change New Text Document.txt into New Text Document.TXT on Windows Vista

Posted by: But Thep | Date: 04/14/2009 20:29 | IP: IP Logged

Programmer:
A new file is based on your default file type, or current open selected file (unless you select the option New Default: Always This Type). If you open FILE.txt then select File > New you get New1.txt. If you open FILE.TXT then select File > New you get New1.TXT.

These files New.TXT and New.txt are viewed exactly the same by Windows (of any version). Both files cannot exist at the same time. If you open a DOS window and type DIR /ON you get a directory listing by filename, case insensitive. If you open a Windows Explorer window and sort the files by name, it is case insensitive. If Windows Explorer tells you the generic file type, it will show the uppercase "EXT File". If you create file "New.TXT" then call a method which asks Windows "Does New.txt exist?" it will return YES.

Maybe, you don't understand what I said in the first post.

The problem does not happen with File -> New in PSPad, but happen with Right Click on Desktop (for example) -> New -> Text Document:

1. The first time, right after exiting PSPad: the file is "New Text Document.txt".

2. The second time: the file is "New Text Document(2).TXT".

3. The third time: "New Text Document(3).TXT"

...
Check Registry, I found that [HKEY_CLASSES_ROOT\.txt] was changed to [HKEY_CLASSES_ROOT\.TXT]

If I change [HKEY_CLASSES_ROOT\.TXT] back to [HKEY_CLASSES_ROOT\.txt], and try to repeat the above file creation, then

1. The first time, right after exit PSPad: the file is "New Text Document.TXT".

2. The second time: the file is "New Text Document(2).txt".

3. The third time: "New Text Document(3).txt"
...

But if I start and exit PSPad again, the problem will repeat as described above.

Note that this problem does not happen with Windows XP. Additionally, the user is a regular administrator, not the built-in Administrator. If I run PSP as administrator, the above problem does not happen.

I'm looking forward to your resolution.
Regards,
BT.

Good news: I have just found a resolution to the problem by changing
[HKEY_CURRENT_USER\Software\Classes\.TXT] to [HKEY_CURRENT_USER\Software\Classes\.txt]

Edited 7 time(s). Last edit at 04/14/2009 21:13 by But Thep.

Options: Reply | Quote | Up ^


#6 Re: PSPad 5.4.5 (2346) change New Text Document.txt into New Text Document.TXT on Windows Vista

Posted by: Programmer | Date: 04/15/2009 15:48 | IP: IP Logged

I see. That explains it then. File extensions must have an override from HKCU. Normally they're only specified in HKEY_USERS or HKLM. The case shown in that key should match the case you specified in PSPad menu option Settings > Program Settings > Registered File Types.

Options: Reply | Quote | Up ^


#7 Re: PSPad 5.4.5 (2346) change New Text Document.txt into New Text Document.TXT on Windows Vista

Posted by: pspad | Date: 04/15/2009 17:30 | IP: IP Logged

PSpad can't write into HKLM, because there isn't access for USERS
HKCR is virtual key, created from Classes Root in HKLM and HKCU.
I can check if PSPad creates uppercase entries if you use register file types

Options: Reply | Quote | Up ^


#8 Re: PSPad 5.4.5 (2346) change New Text Document.txt into New Text Document.TXT on Windows Vista

Posted by: Programmer | Date: 04/15/2009 20:24 | IP: IP Logged

Programmer:
I see. That explains it then. File extensions must have an override from HKCU. Normally they're only specified in HKCR or HKLM. The case shown in that key should match the case you specified in PSPad menu option Settings > Program Settings > Registered File Types.

Is there no edit option on this forum to fix a post you made previously?
I meant to say HKCR. HKEY_USERS contains defaults for create new user which doesn't normally have any extension associations.

That is interesting that you can write values under HKCU and they get combined into HKCR along with the HKLM, but is it necessary? I'm running XP Pro with limited user access and I have rights to modify HKLM\Software\Classes keys. If it's possible these keys can be restricted and we just don't do that, then writing the updates to HKCU could be a good idea (would they conflict with HKLM values?).

Options: Reply | Quote | Up ^


#9 Re: PSPad 5.4.5 (2346) change New Text Document.txt into New Text Document.TXT on Windows Vista

Posted by: pspad | Date: 04/15/2009 23:23 | IP: IP Logged

Up to Vista was possible to write directly into HKCR. In vista it's possible too, but it take a long time.
As I wrote, HKCR is virtual key, created from HKLM and HKCU. HKCU has higher priority then HKLM. If you have same type registration under HKLM and HKCU, Windows will use HKCU registration

Options: Reply | Quote | Up ^


#10 Re: PSPad 5.4.5 (2346) change New Text Document.txt into New Text Document.TXT on Windows Vista

Posted by: But Thep | Date: 04/16/2009 12:11 | IP: IP Logged

pspad:
Up to Vista was possible to write directly into HKCR. In vista it's possible too, but it take a long time.
As I wrote, HKCR is virtual key, created from HKLM and HKCU. HKCU has higher priority then HKLM. If you have same type registration under HKLM and HKCU, Windows will use HKCU registration

You are right!

It seems that Vista merges the same key in HKLM and HKCU, with the precedence given to HKCU.

Options: Reply | Quote | Up ^


Goto Page: 1 2 Next





Editor PSPad - freeware editor, © 2001 - 2014 Jan Fiala
Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák