How to create a real time refresh of windows 10 Start menu

2

1

With the help of this forum and Stack Overflow I have created a modular Powershell script that generates a start menu and taskbar XML to be used by group policy on Windows 10 Pro v1703. On it's own it works well. The next step is running this after an application is installed and update the start menu accordingly. As a result I now need to figure out a way to update the tiles/xml in real time without a restart.

Here is the process flow after an application is installed that should be on the start menu:

1) Script queries user/computer for installs apps, applications, shortcuts etc 2) Script reads list of groups and apps from a config file and query against installed apps (prevents blank spaces and question marks) 3) Script Creates a file called startmenu.xml and converts the old one to startmenuold.xml

4*) Here is where I cannot figure out an elegant solution. It should now read the new xml and update the start menu to reflect changes.

My problem is that the only two ways I have found to update the start menu so far has been a get-process explorer.exe | stop-process which is intrusive to the user or rebooting which is not an option for these devices.

Any suggestions on how to update the start menu / get it to re-read the startmenu.xml that is referenced in my group policy would be amazing!

I have already tried a standard gpupdate, gpupdate /force, updating the time stamp on the doc and then running a gpupdate (/force).

Powershelling

Posted 2018-05-14T17:44:35.350

Reputation: 21

2First of all, welcome to Super User! Honestly, from my perspective you may be devoting an extraordinary amount of time and effort to a relatively minor problem. Based upon my experience, restarting the explorer.exe process really isn't that intrusive to the user, and if the end result is beneficial then it is a very minor inconvenience for the greater good. – Run5k – 2018-05-14T18:45:33.083

I too would opt to just restart explorer. The repercussions being intrusive is subjective, and only you will truly know the environment you're in and the viable approaches. – root – 2018-05-14T19:29:40.620

I agree with you in most cases. The problem is that this is triggered after application installs. Some custom applications rely on explorer so that is out of the question. I know Microsoft is able to do this because when I install an application a new tile is able to show up. I am curious as to how? Unfortunately this is what I have been tasked with by my company... – Powershelling – 2018-05-14T19:48:21.910

Answers

1

Kill the Windows Shell Experience Host process:

Get-Process 'shellexperiencehost' | Stop-Process

This preserves the taskbar, the desktop, open Explorer windows, and hosted Explorer views, but the Start menu is reinitialized when that process automatically restarts.

Ben N

Posted 2018-05-14T17:44:35.350

Reputation: 32 973