Indarnav
asked on
Run Defined Processes
VC++ code that keep running, allow only those processes to run which are defined in code, terminate all other processes as soon as they start. I know XP need certain processes for smooth operation, so assume all those will be added along with processes of my choice.
ASKER
i understand ur concern, but still i insist please provide me let me try that too
You can use the system() function provided in the stdlib header file to call a system function.
Check
http://www.cplusplus.com/reference/clibrary/cstdlib/system.html
The system functions you will need to call are as follows:
1) processes can be listed using tasklist.exe. I think this exists only on Win XP. Check the output of this command.
2) If you know the users on your system then
you can kill processes of a particular user as follows:
taskkill /F /FI "USERNAME eq Quinn"
Also check the below discussion for more info
http://www.tech-recipes.com/rx/446/xp_kill_windows_process_command_line_taskkill/
Check
http://www.cplusplus.com/reference/clibrary/cstdlib/system.html
The system functions you will need to call are as follows:
1) processes can be listed using tasklist.exe. I think this exists only on Win XP. Check the output of this command.
2) If you know the users on your system then
you can kill processes of a particular user as follows:
taskkill /F /FI "USERNAME eq Quinn"
Also check the below discussion for more info
http://www.tech-recipes.com/rx/446/xp_kill_windows_process_command_line_taskkill/
ASKER
your all methods are inverse of what i m looking for. it is not possible to implement those for me. so please provide what i want.
ASKER
jkr, you are right, but that was in vbs and this i asked in vc++, anyway as u wish.
ASKER
ok
ASKER
dear admin,
please ask some one to provide me code in vc++ for the query raised, so many days passed no suitabler reply received. it is getting delayed.
please ask some one to provide me code in vc++ for the query raised, so many days passed no suitabler reply received. it is getting delayed.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
If you are trying to stop users from running rogue/unauthorised software this is not going to work.
e.g., you will need to allow the System to run, using various system calls I can get the system to run my program as a thread which is not visible in the process table and which is not even started as a .exe
There is a good document here: http://www.interhack.net/pubs/email-trojan/
You need to educate your users, if they have access they can run whatever they want. unless you introduce a code-signing system and lock the OS right down using the built in security.
-Rowan