String progpath = env::GetProgPath();
String packagepath = paths::ConcatPath(progpath, _T("WinMergeContextMenuPackage.msix"));
if (!unregister)
- cmd = strutils::format(_T("powershell -c \"Add-AppxPackage '%s' -ExternalLocation '%s'\""), packagepath, progpath);
+ cmd = strutils::format(_T("powershell -c \"Add-AppxPackage '%s' -ExternalLocation '%s'; if (!$?) { pause }\""), packagepath, progpath);
else
- cmd = _T("powershell -c \"Get-AppxPackage -name WinMerge | Remove-AppxPackage\"");
+ cmd = _T("powershell -c \"Get-AppxPackage -name WinMerge | Remove-AppxPackage; if (!$?) { pause }\"");
STARTUPINFO stInfo = { sizeof(STARTUPINFO) };
stInfo.dwFlags = STARTF_USESHOWWINDOW;