Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
yaira2 committed Dec 20, 2024
1 parent 29fcb06 commit 69b75ce
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Files.App.Launcher/FilesLauncher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
LocalFree(szArglist);

WCHAR szBuf[MAX_PATH];
ExpandEnvironmentStringsW(L"%LOCALAPPDATA%\\Microsoft\\WindowsApps\\files-dev.exe", szBuf, MAX_PATH - 1);
ExpandEnvironmentStringsW(L"%LOCALAPPDATA%\\Microsoft\\WindowsApps\\files-preview.exe", szBuf, MAX_PATH - 1);
std::wcout << szBuf << std::endl;
if (_waccess(szBuf, 0) == -1)
{
Expand Down Expand Up @@ -172,7 +172,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
swprintf(args, _countof(args) - 1, L"\"%s\" -select \"%s\"", szBuf, item.c_str());
}

std::wstring uriWithArgs = L"files-dev:?cmd=" + str2wstr(wstring_to_utf8_hex(args));
std::wstring uriWithArgs = L"files-preview:?cmd=" + str2wstr(wstring_to_utf8_hex(args));

std::wcout << L"Invoking: " << args << L" = " << uriWithArgs << std::endl;

Expand All @@ -187,7 +187,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
{
std::wcout << L"Protocol error: " << GetLastError() << std::endl;

//ShExecInfo.lpFile = L"files-dev.exe";
//ShExecInfo.lpFile = L"files-preview.exe";
//ShExecInfo.lpParameters = args;
//if (!ShellExecuteEx(&ShExecInfo))
//{
Expand All @@ -202,13 +202,13 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
SHELLEXECUTEINFO ShExecInfo = { 0 };
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOASYNC | SEE_MASK_FLAG_NO_UI;
ShExecInfo.lpFile = L"files-dev:";
ShExecInfo.lpFile = L"files-preview:";
ShExecInfo.nShow = SW_SHOW;

if (!ShellExecuteEx(&ShExecInfo))
{
std::wcout << L"Protocol error: " << GetLastError() << std::endl;
//ShExecInfo.lpFile = L"files-dev.exe";
//ShExecInfo.lpFile = L"files-preview.exe";
//if (!ShellExecuteEx(&ShExecInfo))
//{
//std::wcout << L"Command line error: " << GetLastError() << std::endl;
Expand Down

0 comments on commit 69b75ce

Please sign in to comment.