Files
App-Installer-For-Windows-8…/shortcut/main.cpp
冰糖XH fe6a9a186b Enable ARM desktop SDK macro in projects
Add _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1 to PreprocessorDefinitions in multiple .vcxproj files so ARM desktop SDK partition is available at project level. Remove per-file #ifdef _M_ARM defines from several headers and source files (Stdafx.h, targetver.h, main.cpp across various modules) to avoid duplication. Also add ShowIncludes=false in pkgread.vcxproj. This centralizes the ARM macro for consistent ARM builds across modules.
2026-03-26 14:46:26 +08:00

34 lines
754 B
C++

#include <iostream>
#include <string>
#include <Windows.h>
#include <locale>
#include "../notice/notice.h"
int wmain (int argc, wchar_t **argv)
{
setlocale (LC_ALL, "");
std::wcout.imbue (std::locale ("", LC_CTYPE));
if (argc < 4 && argc > 1)
{
std::wcout << L"Error: invalid args." << std::endl;
return 1;
}
else if (argc <= 1)
{
std::wcout << L"Usage: " << std::endl <<
L"\tshortcut.exe <lnk_file_path> <target_file_path> <app_id>" << std::endl;
return 0;
}
auto res = CreateShortcutWithAppIdW (argv [1], argv [2], argv [3]);
if (SUCCEEDED (res.hr))
{
std::wcout << L"Create successfully!" << std::endl;
return 0;
}
else
{
std::wcout << L"Create failed. Reason: " << res.message << std::endl;
return 1;
}
return 0;
}