The Wiert Corner – irregular stream of stuff

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

  • My badges

  • Twitter Updates

  • 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,769 other followers

Archive for May 14th, 2019

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 »

On the Effectiveness of Static Typing in Detecting Public Bugs

Posted by jpluimers on 2019/05/14

Cool research paper from a while back but still soo relevant:

The project page for an ICSE’17 paper, To Type or Not to Type: Quantifying Detectable Bugs for JavaScript

JavaScript is also a dynamically typed language for which static type systems, notably Facebook’s Flow and Microsoft’s TypeScript, have been written. What benefits do these static type systems provide?

Source: [Archive.isOn the Effectiveness of Static Typing in Detecting Public Bugs

 

Other saved links:

–jeroen

via: [WayBack/Archive.is] Slashdot drew my attention to this ressearch … http://ttendency.cs.ucl.ac.uk/projects/type_study/ An argument for languages like Delphi. – Roland Kossow – Google+

Posted in Development, JavaScript/ECMAScript, Scripting, Software Development, TypeScript | Leave a Comment »

if statement – How to ask for batch file user input with a timeout – Stack Overflow

Posted by jpluimers on 2019/05/14

The trick is to use the choice command; see [WayBackif statement – How to ask for batch file user input with a timeout – Stack Overflow

–jeroen

Posted in Batch-Files, Development, Microsoft Surface on Windows 7, Power User, Scripting, Software Development, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1, Windows 9, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, Windows Vista, Windows XP | Leave a Comment »

 
%d bloggers like this: