Skip to content

Instantly share code, notes, and snippets.

@NathanDai5287
Created March 31, 2023 01:32
Show Gist options
  • Save NathanDai5287/5ec0ce93f56a5641364a383fece3cf0d to your computer and use it in GitHub Desktop.
Save NathanDai5287/5ec0ce93f56a5641364a383fece3cf0d to your computer and use it in GitHub Desktop.
Create a new empty file with an arbitrary file extension in Windows
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.]
@="emptyFile"
[HKEY_CLASSES_ROOT\.\ShellNew]
"NullFile"=""
@="Empty File"
"ItemName"=""
"IconPath"="C:\\windows\\system32\\imageres.dll,2"
[HKEY_CLASSES_ROOT\.\ShellNew\Config]
"NoExtension"=""
[-HKEY_CLASSES_ROOT\emptyFile]
[HKEY_CLASSES_ROOT\emptyFile]
@="Empty File"
[HKEY_CLASSES_ROOT\emptyFile\DefaultIcon]
@="%SystemRoot%\\system32\\imageres.dll,2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment