mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-17 20:44:38 +03:00
feat: vpn hide console
This commit is contained in:
9
3rdparty/WinCommander.cpp
vendored
9
3rdparty/WinCommander.cpp
vendored
@@ -44,7 +44,8 @@ Returns the return value of the executed command
|
||||
*/
|
||||
uint WinCommander::runProcessElevated(const QString &path,
|
||||
const QStringList ¶meters,
|
||||
const QString &workingDir, bool aWait) {
|
||||
const QString &workingDir,
|
||||
bool hide, bool aWait) {
|
||||
uint result = 0;
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
@@ -75,7 +76,7 @@ uint WinCommander::runProcessElevated(const QString &path,
|
||||
shex.lpParameters = pszParameters;
|
||||
shex.lpDirectory = pszDirectory;
|
||||
// https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-showwindow
|
||||
shex.nShow = SW_SHOWMINIMIZED;
|
||||
shex.nShow = hide ? SW_HIDE : SW_SHOWMINIMIZED;
|
||||
|
||||
ShellExecuteEx(&shex);
|
||||
if (shex.hProcess)
|
||||
@@ -109,6 +110,6 @@ execution or wait for the exit of the launched process
|
||||
Returns the return value of the executed command
|
||||
*/
|
||||
uint WinCommander::runProcessElevated(const QString &path, const QString ¶meters, const QString &workingDir,
|
||||
bool aWait) {
|
||||
return runProcessElevated(path, QStringList() << parameters, workingDir, aWait);
|
||||
bool hide, bool aWait) {
|
||||
return runProcessElevated(path, QStringList() << parameters, workingDir, hide, aWait);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user