Open folder in VS Code from Windows Explorer

TLDR Save this contents to a new .reg file: Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\shell\VSCode] @=”Open with Code” “Icon”=”\”%LocalAppData%\\Programs\\Microsoft VS Code\\Code.exe\”” [HKEY_CLASSES_ROOT\Directory\shell\VSCode\command] @=hex(2):22,00,25,00,4c,00,6f,00,63,00,61,00,6c,00,41,00,70,00,70,00,44,00,61,\ 00,74,00,61,00,25,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,73,00,\ 5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,20,00,56,00,53,\ 00,20,00,43,00,6f,00,64,00,65,00,5c,00,43,00,6f,00,64,00,65,00,2e,00,65,00,\ 78,00,65,00,22,00,20,00,22,00,25,00,56,00,22,00,00,00 Run the file and that’s it. Detailed The answer from @dqureshiumar is correct, if you already checked that option during VS Code installation. But maybe you haven’t checked … Read more

How can a batch file run a program and set the position and size of the window?

Here is an alternate way with nircmd util from http://www.nirsoft.net/utils/nircmd.html Examples: nircmd win move ititle “cmd.exe” 5 5 10 10 nircmd win setsize ititle “cmd.exe” 30 30 100 200 nircmd cmdwait 1000 win setsize ititle “cmd.exe” 30 30 1000 600 Here are the contents of SetEnv.cmd: Explorer /n,c:\develop\jboss-4.2.3.GA\server\default\deploy nircmd wait 1000 win setsize ititle “something” … Read more

How do I display a file’s Properties dialog from C#?

Solution is: using System.Runtime.InteropServices; [DllImport(“shell32.dll”, CharSet = CharSet.Auto)] static extern bool ShellExecuteEx(ref SHELLEXECUTEINFO lpExecInfo); [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] public struct SHELLEXECUTEINFO { public int cbSize; public uint fMask; public IntPtr hwnd; [MarshalAs(UnmanagedType.LPTStr)] public string lpVerb; [MarshalAs(UnmanagedType.LPTStr)] public string lpFile; [MarshalAs(UnmanagedType.LPTStr)] public string lpParameters; [MarshalAs(UnmanagedType.LPTStr)] public string lpDirectory; public int nShow; public IntPtr hInstApp; public IntPtr … Read more

Configure Windows Explorer Folder Options through Powershell

Keith’s answer didn’t work for me out of the box. The only thing that took to the registry value modification was ShowSuperHidden. Both the Hidden (Show hidden files…) and HideFileExt (hide file extension) reverted back to their previous values as soon as I opened the View tab in Folder Settings. Here’s my solution, which I … Read more