If you use Classic Shell (Windows 8/10 Start menu replacement) every time you upgrade Windows your users will get hit with the message “Classic Shell needs to configure itself for the new operating system”. If you are not an administrator on the machine, you will be prompted to enter an admin name and password in order to make the necessary changes. If you are like me you hopefully have your users restricted to protect them from the internet and themselves. If you do, then they will get this message over and over again until an administrator signs on and fixes the issue.
I have an easier way that I have used for some time now with Classic Shell. Run this however you want. If you use SCCM you can run this after Windows has upgraded in your Task Sequence or as a separate Task Sequence that runs after an upgrade. If you are on a domain, you can just push out the registry key with the correct value and ONLY apply the GPO to the correct version of Windows 10. Each version will have a different value. This must be ran as an admin or as system for it to make the needed registry changes.
@echo off rem * ---------------------------------------------------------------------------------------------------------------------- rem * ###################################################################################### rem * # AUTHOR : Mark Scarberry - https://technology.wayneschoolswv.org # rem * # DATE : 07-01-2016 # rem * # COMMENT : Automated repair of Classic Shell due to upgrading Windows # rem * # Checks and changes registry value based on Windows Build number # rem * # Tested up to Windows 1809 on Classic Shell as of 2/2/19 # rem * ###################################################################################### rem * rem * With every new version of Windows the following registry key needs to be changed "WinVersion"=dword:somenumber rem * You need to set the value WinVersion in HKEY_LOCAL_MACHINE\SOFTWARE\IvoSoft\ClassicShell to match the Windows rem * build that is installed. It corresponds to the AU version. rem * If this number doesn't match the current Windows version then auto-upgrade behavior will kick in and you rem * will get the "Classic Shell needs to configure itself" popup after you log in. rem * Below are some decimal values of windows version. Install the new windows version and get the value of the rem * above key and update the reg file manually or use my script! rem * Windows 1607 - 167786553 Windows 1703 - 167787223 Windows 1709 - 167782746 Windows 1803 - 167789294 etc. rem * rem * --------------------------------------------------------------------------------------------------------------------- SETLOCAL ENABLEDELAYEDEXPANSION if exist %windir%\System32\StartMenuHelper64.dll ( rem File exists, 64Bit goto :Begin ) if exist %windir%\System32\StartMenuHelper32.dll ( rem File exists, 32bit goto :Begin ) echo * No Classic Shell found goto :eof :Begin set valCurrentBuild= set valCalcCurrentBuild= set valClassicWinVersion= rem * Get Current Windows Build for /f "tokens=1,2,3" %%i in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" ^| find "CurrentBuild"') do set valCurrentBuild=%%k echo * Windows Build %valCurrentBuild% set /a valCalcCurrentBuild=16777216*10+%valCurrentBuild% rem * Check if Classic Shell value matches for /f "tokens=1,2,3" %%i in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\IvoSoft\ClassicShell" ^| find "WinVersion"') do set /a valClassicWinVersion=%%k if Not Defined valClassicWinVersion ( echo * No Classic Shell WinVersion number found goto :eof ) echo * Calculated value for Classic Shell %valCalcCurrentBuild% echo * Registry value for Classic Shell %valClassicWinVersion% rem * Fix Classic Shell WinVersion registry value rem * If you want to always update this value and re-register dll file then change NEQ to GTR below if %valCalcCurrentBuild% NEQ %valClassicWinVersion% ( echo * Changing value to HKEY_LOCAL_MACHINE\SOFTWARE\IvoSoft\ClassicShell\WinVersion = %valCalcCurrentBuild% reg add "HKEY_LOCAL_MACHINE\SOFTWARE\IvoSoft\ClassicShell" /v "WinVersion" /t REG_DWORD /d %valCalcCurrentBuild% /f if exist %windir%\System32\StartMenuHelper64.dll ( regsvr32 /s %SystemRoot%\System32\StartMenuHelper64.dll ) if exist %windir%\System32\StartMenuHelper32.dll ( regsvr32 /s %SystemRoot%\System32\StartMenuHelper32.dll ) ) else ( echo * Classic Shell WinVersion is OK. ) goto :eof :eof
I found this blogpost after preparation of Win 10 Upgrade in a domain environment – but we are using Classic Shell’s successor Open-Shell, so the script needs some modification
– in line 45 the reg key has to be replaced by: “HKEY_LOCAL_MACHINE\SOFTWARE\OpenShell\OpenShell”
– the value calculated in the script is too high by one compared to the official way of upgrading Open-Shell, so add “-1” at the end of line 42
– the official method to upgrade is “%programfiles%\Open-Shell\StartMenu.exe” -upgrade (optional parameter: -silent)
– the official method replaces line 56 to 63, according you don’t need to check the OS architecture and can leave out line 23 to 27 and replace the filename in line 22 with the path to StartMenu.exe.
Mixed your solution with https github com /Open-Shell/Open-Shell-Menu/issues/167
Thanks Martin for the info. The Winversion numbers listed in the script matched what was in the registry for each version of windows up to the time of the post after installing the program. I’m not sure why it would be off by one now when it wasn’t then.
I have since just used the following command to fix the issue.
You can run this as a step in a task sequence if you are using Microsoft SCCM or just run it via a GPO after an upgrade.
cmd.exe /c “%ProgramFiles%\Open-Shell\StartMenu.exe” -upgrade -silent