add restoration of shortcut's target path
This commit is contained in:
parent
eeda464ca9
commit
cb3c6874bc
|
@ -79,6 +79,11 @@ bool ImplEnsureAumiddedShortcutExists(
|
||||||
checked(store->GetValue,(PKEY_AppUserModel_ID, aumid_prop));
|
checked(store->GetValue,(PKEY_AppUserModel_ID, aumid_prop));
|
||||||
if (aumid_prop.str().get() != aumid)
|
if (aumid_prop.str().get() != aumid)
|
||||||
checked(store->SetValue,(PKEY_AppUserModel_ID, property{aumid}));
|
checked(store->SetValue,(PKEY_AppUserModel_ID, property{aumid}));
|
||||||
|
|
||||||
|
std::array<wchar_t, MAX_PATH+1> targ_path;
|
||||||
|
checked(lnk->GetPath,(targ_path.data(), targ_path.size(), nullptr, 0));
|
||||||
|
if (targ_path.data() != exe_path)
|
||||||
|
checked(lnk->SetPath,(exe_path.c_str()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue