Windows 8.1 – Programmatically refresh the start menu

In the last days I was working on a VDI deployment with Horizon View and AppVolumes. I had the need to be able to programmatically refresh the Start Menu/Start Screen. The problem is that sometimes when an AppStack is mounted the start menu won’t display the shortcuts to the applications in the AppStack and a user can’t launch them form the start menu.

I execute this code via GP and this causes a refresh of the start menu, displaying all new links. Here is the downlodable RefreshStartMenu.exe application, use it at your own risk 😀

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;

namespace ConsoleApplication1
{

	class Program
	{
		private const int SHCNE_UPDATEDIR = 0x00001000;
		private const int SHCNF_IDLIST = 0x0000;
		private const int CSIDL_COMMON_STARTMENU = 0x0016;
		private const int CSIDL_STARTMENU = 0x000b;
		[DllImport("shell32.dll")]
		static extern void SHChangeNotify(int wEventId, int uFlags, IntPtr dwItem1, IntPtr dwItem2);
		[DllImport("shell32.dll")]
		static extern Int32 SHGetFolderLocation(IntPtr hwndOwner, Int32 nFolder, IntPtr hToken, UInt32 dwReserved, out IntPtr ppidl);

		static void Main(string[] args)
		{

			IntPtr pidlCSM;
			IntPtr pidlSM;

			SHGetFolderLocation(IntPtr.Zero, CSIDL_COMMON_STARTMENU, IntPtr.Zero, 0, out pidlCSM);
			SHChangeNotify(SHCNE_UPDATEDIR, SHCNF_IDLIST, pidlCSM, IntPtr.Zero);
			SHGetFolderLocation(IntPtr.Zero, CSIDL_STARTMENU, IntPtr.Zero, 0, out pidlSM);
			SHChangeNotify(SHCNE_UPDATEDIR, SHCNF_IDLIST, pidlSM, IntPtr.Zero);
		}
	}
}

RDP fix for XP Clients connecting to new Windows releases – MS15-031 Freak

Some XP desktop can no longer connect via Remote Desktop to newer windows releases where the patch  MS15-031 (KB 3046049) was installed. I was able to restore connectivity by specifying a GPO setting.

Run gpedit.msc and find “Computer Configuration – Administrative templates – Network – SSL Configuration Settings – SSL Cipher Suite Order

Enable the setting and paste those values:

TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_RC4_128_SHA,TLS_RSA_WITH_3DES_EDE_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA_P256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA_P384,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256_P256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256_P256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384_P384,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384_P384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA_P256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA_P384,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA_P256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA_P384,TLS_DHE_DSS_WITH_AES_128_CBC_SHA256,TLS_DHE_DSS_WITH_AES_128_CBC_SHA,TLS_DHE_DSS_WITH_AES_256_CBC_SHA256,TLS_DHE_DSS_WITH_AES_256_CBC_SHA,TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA,TLS_RSA_WITH_RC4_128_MD5,SSL_CK_RC4_128_WITH_MD5

YMMV, try not to enable  SSL or TLS ciphers that are to weak for your environment.