Some systems to not have a %windir%\ShellNew directory, so here are some links and observations on ShellNew entries in the registry.
Originally, I needed this for Creating a blank Visual Studio solution without a directory, and sln Format Version numbers but found a default installation did not have a %windir%\ShellNew directory.
A similar Windows 8.1 system had these files there:
EXCEL12.XLSXMSPUB.PUB
On the Windows 10 system, these files were in C:\Program Files (x86)\Microsoft Office\root\vfs\Windows\SHELLNEW, so apparently, Windows 10 has moved more into a Virtual File System structure.
Machine wide registered extensions
The key HKEY_CLASSES_ROOT\.zip\CompressedFolder\ShellNew on both systems has the below values, indicating you do not need a file template: a binary template in the registry suffices:
DatahavingREG_BINARYcontent of a 22-byte empty .zip fileItemNamehaving aREG_EXPAND_SZcontent pointing to@%SystemRoot%\system32\zipfldr.dll,-10194
The key HKEY_CLASSES_ROOT\.rtf\ShellNew on both systems has the below values, indicating you do not need a file template: a text template in the registry suffices:
DatahavingREG_SZcontent of a 7 character file content{\rtf1}ItemNamehaving aREG_EXPAND_SZcontent pointing to@%ProgramFiles%\Windows NT\Accessories\WORDPAD.EXE,-213
The key HKEY_CLASSES_ROOT\.bmp\ShellNew on both systems has the below values, indicating you do not need a file template: a zero byte template in the registry suffices:
NullFilehaving an emptyREG_SZItemNamehaving aREG_EXPAND_SZcontent pointing to@%systemroot%\system32\mspaint.exe,-59414
User wide registered extensions
At HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders, is a value named Templates having an absolute path which can be expanded from %AppData%\Microsoft\Windows\Templates.
That directory was empty, but it is connected to the HKEY_CURRENT_USER\Software\Classes counterpart of HKEY_CLASSES_ROOT (the latter is an alias for HKEY_LOCAL_MACHINE\SOFTWARE\Classes).
So in stead of putting template files in %WinDir%\ShellNew plus registering them underHKEY_CLASSES_ROOT, you can put them in %AppData%\Microsoft\Windows\Templates and register them under HKEY_CURRENT_USER\Software\Classes.
Empty Visual Studio solution files for the current user
Since people have requested empty solution files to be created without creating a directory for a long time ([WayBack] create solution without folder – Visual Studio) and Visual Studio still does not allow you to do that, I have amended the %WinDir%\ShellNew based solution I created some 7 years ago at Creating a blank Visual Studio solution without a directory, and sln Format Version numbers, to a current user based one:
[WayBack] jeroenp / wiert.me / commit / 01e4430712a6 — Bitbucket:
Amend empty Visual Studio templates to support%AppData%\Microsoft\Windows\Templates referenced from HKEY_CURRENT_USER\Software\Classes
Future
I might be able to morph this into a registry-only solution by using REG_MULTI_SZtyped values containing the actual .sln template content as multi-line strings separated by zero bytes. Some starting links on this for future reading:
- [WayBack] batch file – How to add a linebreak using REG command in a MULTI_SZ value type? – Stack Overflow
- [WayBack] windows – How do I add a multline REG_SZ string to the registry from the command line? – Stack Overflow
- [WayBack] Registry editing via command line – multiline string datatype | TRIBE FORUM
Related
- [WayBack] Menu New → Text document is missing when not administrator in Windows 7 – Super User
- [WayBack] where in the registry does Windows store, with which program to open certain file types? – Super UserThe open with associations are all stored in
HKEY_CLASSES_ROOT.This is a special registry hive that combines the local user’s associations inHKEY_CURRENT_USER\Software\Classeswith the system’s associations inHKEY_LOCAL_MACHINE\Software\Classes.
–jeroen







