The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

    • RT @michaelbolton: 1) Your periodic reminder: a test is not something we *write*. We write text and programs. A test is an experiment you *… 2 hours ago
    • RT @BiancaPrins: Voor ons allemaal, een #draadje om tot het einde te lezen..... Juist nu (Volgt nog meer in de komende dagen) https://t.co… 2 hours ago
    • RT @McKayMSmith: 90) His entire life, Ben has chosen to place his faith in the law. “Law, not war” has been his motto for decades. “I hav… 2 hours ago
    • RT @McKayMSmith: 82) “It's possible to take the most fundamental, strongly held ideas and change them. What makes people change? Sometimes… 2 hours ago
    • RT @McKayMSmith: 65) “Now I will tell you something very profound, which I have learned after many years. War makes murderers out of otherw… 2 hours ago
  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,640 other followers

Archive for the ‘Windows Explorer / Windows Shell’ Category

Copy the full path of a file from Windows Explorer

Posted by jpluimers on 2019/06/14

Every now and then, I learn a “new” feature that has existed for a very long time.

This time it is about the Copy as Path feature from Windows Explorer context menu:

  1. hold the shift key, then right click any file or directory
  2. select Copy as Path

This was introduced in Windows Vista ([WayBack] How to Get Windows Vista and 7’s “Copy as Path” Option in Windows XP Context Menu? – AskVG).

By default the Copy as Path is not in the context menu: you have to press the shift key. In the past, I used tools like ClipName from the PC TimeWatch people – Freeware « The Wiert Corner – irregular stream of stuff.

Seems I do not use that any more for just copying one filename, only for copying multiple.

Related:

–jeroen

Posted in Power User, Windows, Windows Explorer / Windows Shell | Leave a Comment »

Some links on ShellNew: a user local place (registry and file system) to have Visual Studio templates for Blank Solution files

Posted by jpluimers on 2019/05/14

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.XLSX
  • MSPUB.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:

  • Data having REG_BINARY content of a 22-byte empty .zip file
  • ItemName having a REG_EXPAND_SZ content 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:

  • Data having REG_SZ content of a 7 character file content {\rtf1}
  • ItemName having a REG_EXPAND_SZ content 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:

  • NullFile having an empty REG_SZ
  • ItemName having a REG_EXPAND_SZ content 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:

Related

–jeroen

Posted in Power User, Windows, Windows Explorer / Windows Shell | Leave a Comment »

 
%d bloggers like this: