Tag-Archive for » Windows «

Wednesday, August 08th, 2012 | Author:

If you’ve changed your standard .tex file editor to Notepad2 or Notepad++, chances are that the contextual menu entry “Create New > Document file” has disappeared.

To restore it, just save the following code as a .reg file and run it (thanks to Archos alias Limneos for posting the code on a SevenForums):

Windows Registry Editor Version 5.00
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.txt]
"PerceivedType"="text"
@="txtfile"
"Content Type"="text/plain"
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.txt\PersistentHandler]
@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"
 
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.txt\ShellNew]
"ItemName"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,\
  6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,\
  00,6e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2e,00,65,00,78,00,65,00,2c,00,\
  2d,00,34,00,37,00,30,00,00,00
"NullFile"=""

PS: in case you’re wondering what the hex code in ItemName means, it just stands for “@%SystemRoot%\system32\notepad.exe,-470″. This means that standard Windows notepad is used to create the file, but just to create it. This has no impact on the default .txt file editor and double-clicking the created file will just open it with whatever you defined as such.

Wednesday, August 08th, 2012 | Author:

I want Windows 7 to sort my files alphabetically, and I mean alphanumerically, from 0 to z, in ASCII order.

Windows 7 acts way too smart sorting files by names to my taste. On more ancient versions of Windows (e.g. Windows 2000) the sorting order would be something like this:

  • Ie4_01
  • Ie4_128
  • Ie401sp2
  • Ie5
  • Ie501sp2
  • Ie6

On Windows Vista, XP, Server 2003, or 7, however, you would get this order:

  • Ie4_01
  • Ie4_128
  • Ie5
  • Ie6
  • Ie401sp2
  • Ie501sp2

As you can see, the newer versions don’t stick to sorting, they try to interpret file names, deciding for you that Ie401sp2 is a number that should come after Ie5! This is very tedious when you try to keep your filenames organized, especially when you use alphanumeric prefixes to do so.

Luckily, a Microsoft web article gives a solution.

Open your Windows registry.

Navigate to HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Currentversion\Policies\Explorer

Add a new DWORD with  value: “NoStrCmpLogical”

Set it to 1.

That’s it. Now Windows 7 sorts your files as it should, without fancy sub-algorithms, from 0 to z.