Skip to content

Commit 1b703ae

Browse files
committed
StartMenu: add ARM64 support
1 parent c7d9a92 commit 1b703ae

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Src/StartMenu/StartMenu.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,10 @@ bool WasOsUpgrade()
296296
// UAC dialog is shown to ensure it will run with administrator privileges
297297
void RunOsUpgradeTaskAsAdmin()
298298
{
299-
#ifdef _WIN64
299+
#if defined(_M_AMD64)
300300
wchar_t path[_MAX_PATH] = L"%windir%\\System32\\StartMenuHelper64.dll";
301+
#elif defined(_M_ARM64)
302+
wchar_t path[_MAX_PATH] = L"%windir%\\System32\\StartMenuHelperARM64.dll";
301303
#else
302304
wchar_t path[_MAX_PATH] = L"%windir%\\System32\\StartMenuHelper32.dll";
303305
#endif
@@ -321,8 +323,10 @@ DWORD PerformOsUpgradeTask(bool silent)
321323
regKey.SetDWORDValue(L"WinVersion", g_winVer);
322324

323325
// run regsvr32 StartMenuHelper
324-
#ifdef _WIN64
326+
#if defined(_M_AMD64)
325327
wchar_t cmdLine[_MAX_PATH] = L"regsvr32 /s \"%windir%\\System32\\StartMenuHelper64.dll\"";
328+
#elif defined(_M_ARM64)
329+
wchar_t cmdLine[_MAX_PATH] = L"regsvr32 /s \"%windir%\\System32\\StartMenuHelperARM64.dll\"";
326330
#else
327331
wchar_t cmdLine[_MAX_PATH] = L"regsvr32 /s \"%windir%\\System32\\StartMenuHelper32.dll\"";
328332
#endif

0 commit comments

Comments
 (0)