Write a program to control application on Windows
-
Hi all, i'm newbit and i want to write a program to control application on Windows.
For example :
I have application GameFastF installed on Windows.
GameFastF only run from 18h-20h pm.
Other time it will been disabled, blocked cannot run.
Which function or command to block this?
Thank you! -
Hi all, i'm newbit and i want to write a program to control application on Windows.
For example :
I have application GameFastF installed on Windows.
GameFastF only run from 18h-20h pm.
Other time it will been disabled, blocked cannot run.
Which function or command to block this?
Thank you!@gold said in Write a program to control application on Windows:
Other time it will been disabled, blocked cannot run.
Which function or command to block this?Hello and welcome.
We have no idea what the answer to this might be. Above all, what connection does this have to Qt anything?
-
I want to write a program Qt run on Windows.
Example : a program QT name : ManagerTimerApp
When run ManagerTimerApp i set dialog to choose this file
"C:\Program Files (x86)\Game\GameFastF .exe"
GameFastF will cannot run.
So i don't know api function Qt to block GameFastF .
Could you please help me? -
I want to write a program Qt run on Windows.
Example : a program QT name : ManagerTimerApp
When run ManagerTimerApp i set dialog to choose this file
"C:\Program Files (x86)\Game\GameFastF .exe"
GameFastF will cannot run.
So i don't know api function Qt to block GameFastF .
Could you please help me?@gold
Hi
There is nothing in Qt to block another exe from starting,For that you need to write a low level driver like a virus scanner and block it there.
It is possible to block apps via the registry
https://www.wikihow.com/Block-an-Application-or-.EXE-from-Running-in-WindowsHowever, when you lock or unlock this way, the OS has to be restarted.
I think the same applies to AppLocker
https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-defender-application-control/applocker/applocker-overviewBUt I don't know for sure.
-
Hi all, i'm newbit and i want to write a program to control application on Windows.
For example :
I have application GameFastF installed on Windows.
GameFastF only run from 18h-20h pm.
Other time it will been disabled, blocked cannot run.
Which function or command to block this?
Thank you! -
Running the application GameFastF.exe is something done by the CreateProcessW API call (or similar) on Windows, and equivalents on other platforms. Qt provides QProcess to give you a cross-platform way to start another process.
It is not clear whether your are saying that the GameFastF.exe program does not start when you use QProcess to launch it, or whether you you want your Qt-based program to somehow stop the GameFastF.exe from running no matter how it is started.
In the first case, you would have to show your code and the QProcess::error(), exitStatus(), and anything else that relates to the problem.
In the second case; whether the operating system will allow a specific executable to run is outside the control of Qt. If you want to blacklist certain executables then AppLocker or Windows Defender Application Control (WDAC) may be places to look.
-
@gold said in Write a program to control application on Windows:
i found solution.
Two things please:
- Could it be possible you share the solution you found?
- After sharing, don't forget to mark this post as solved!
Thanks.