mirror of
https://github.com/AxioDL/boo.git
synced 2025-12-14 15:46:19 +00:00
removed libwdi.. too much UAC headaches..
users will use zadig just like with dolphin
This commit is contained in:
@@ -59,11 +59,39 @@ public:
|
||||
}
|
||||
|
||||
#if _WIN32
|
||||
extern "C" int genWin32ShellExecute(const wchar_t* AppFullPath,
|
||||
const wchar_t* Verb,
|
||||
const wchar_t* Params,
|
||||
bool ShowAppWindow,
|
||||
bool WaitToFinish);
|
||||
static int genWin32ShellExecute(const wchar_t* AppFullPath,
|
||||
const wchar_t* Verb,
|
||||
const wchar_t* Params,
|
||||
bool ShowAppWindow,
|
||||
bool WaitToFinish)
|
||||
{
|
||||
int Result = 0;
|
||||
|
||||
// Setup the required structure
|
||||
SHELLEXECUTEINFO ShExecInfo;
|
||||
memset(&ShExecInfo, 0, sizeof(SHELLEXECUTEINFO));
|
||||
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
|
||||
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
|
||||
ShExecInfo.hwnd = NULL;
|
||||
ShExecInfo.lpVerb = Verb;
|
||||
ShExecInfo.lpFile = AppFullPath;
|
||||
ShExecInfo.lpParameters = Params;
|
||||
ShExecInfo.lpDirectory = NULL;
|
||||
ShExecInfo.nShow = (ShowAppWindow ? SW_SHOW : SW_HIDE);
|
||||
ShExecInfo.hInstApp = NULL;
|
||||
|
||||
// Spawn the process
|
||||
if (ShellExecuteEx(&ShExecInfo) == FALSE)
|
||||
{
|
||||
Result = -1; // Failed to execute process
|
||||
} else if (WaitToFinish)
|
||||
{
|
||||
WaitForSingleObject(ShExecInfo.hProcess, INFINITE);
|
||||
}
|
||||
|
||||
return Result;
|
||||
}
|
||||
|
||||
#include <libwdi/libwdi.h>
|
||||
static void scanWinUSB()
|
||||
{
|
||||
@@ -81,7 +109,7 @@ static void scanWinUSB()
|
||||
!strcmp(device->driver, "HidUsb"))
|
||||
{
|
||||
printf("GC adapter detected; installing driver\n");
|
||||
|
||||
genWin32ShellExecute(L"WinUsbInstaller.exe", L"", L"", false, true);
|
||||
}
|
||||
}
|
||||
wdi_destroy_list(list);
|
||||
|
||||
Reference in New Issue
Block a user