From e80785b8dabbefd70dc831ebfa9b340fa5378160 Mon Sep 17 00:00:00 2001 From: dmex Date: Mon, 4 May 2020 02:54:12 +1000 Subject: [PATCH] SetupTool: Fix shortcut properties --- tools/CustomSetupTool/util.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/tools/CustomSetupTool/util.c b/tools/CustomSetupTool/util.c index 5b68b1ee8..3c30b8253 100644 --- a/tools/CustomSetupTool/util.c +++ b/tools/CustomSetupTool/util.c @@ -977,19 +977,24 @@ VOID SetupCreateLink( if (SUCCEEDED(IShellLinkW_QueryInterface(shellLinkPtr, &IID_IPropertyStore, &propertyStorePtr))) { - PROPVARIANT appIdPropVar; + PROPVARIANT propValue; - PropVariantInit(&appIdPropVar); + PropVariantInit(&propValue); + propValue.vt = VT_LPWSTR; + propValue.pwszVal = AppId; - appIdPropVar.vt = VT_BSTR; - appIdPropVar.bstrVal = SysAllocString(AppId); - - if (SUCCEEDED(IPropertyStore_SetValue(propertyStorePtr, &PKEY_AppUserModel_ID, &appIdPropVar))) - { - IPropertyStore_Commit(propertyStorePtr); - } - - PropVariantClear(&appIdPropVar); + IPropertyStore_SetValue(propertyStorePtr, &PKEY_AppUserModel_ID, &propValue); + + PropVariantClear(&propValue); + //PropVariantInit(&propValue); + //propValue.vt = VT_CLSID; + //propValue.puuid = GUID; + // + //IPropertyStore_SetValue(propertyStorePtr, &PKEY_AppUserModel_ToastActivatorCLSID, &propValue); + // + //PropVariantClear(&propValue); + + IPropertyStore_Commit(propertyStorePtr); IPropertyStore_Release(propertyStorePtr); }