Skip to content

Commit

Permalink
Removed invalid shortcut generation code
Browse files Browse the repository at this point in the history
  • Loading branch information
acidicoala committed Mar 29, 2021
1 parent c91cd0c commit b60990e
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions IntegrationWizard/src/winmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,38 +160,6 @@ void askForAction(
}
}

bool createShortcut(string target, string linkFile)
{
IShellLink* pShellLink = NULL;
auto result = CoInitializeEx(NULL, NULL);
if(result == S_OK)
{
HRESULT hRes = E_INVALIDARG;

hRes = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (LPVOID*) &pShellLink);
if(SUCCEEDED(hRes))
{
/* Set the fields in the IShellLink object */
hRes = pShellLink->SetPath(stow(target).c_str());
hRes = pShellLink->SetDescription(L"Desc");

/* Use the IPersistFile object to save the shell link */
IPersistFile* pPersistFile = NULL;
hRes = pShellLink->QueryInterface(IID_IPersistFile, (LPVOID*) &pPersistFile);
if(SUCCEEDED(hRes))
{
hRes = pPersistFile->Save(stow(linkFile).c_str(), TRUE);
pPersistFile->Release();
return true;
}
pShellLink->Release();
}
}

CoUninitialize();
return false;
}

int APIENTRY wWinMain(
_In_ HINSTANCE hInstance,
_In_opt_ HINSTANCE hPrevInstance,
Expand Down Expand Up @@ -230,7 +198,6 @@ int APIENTRY wWinMain(
case Action::INSTALL_INTEGRATIONS:
case Action::REMOVE_INTEGRATIONS:
IntegrationWizard::alterPlatform(action, platformID, platforms);
createShortcut(getConfigPath().string(), getDesktopPath().string());
break;
case Action::NOTHING_TO_INSTALL:
MessageBox(NULL, L"Koalageddon did not find any installed platforms.", L"Nothing found", MB_ICONINFORMATION);
Expand Down

0 comments on commit b60990e

Please sign in to comment.