DexterMorgan Posted February 2, 2008 Share Posted February 2, 2008 I know this may sound a little noobish (thus explaining my name) I am trying to make a script that stops task manager from working it goes like this : #NoTrayIcon _ReduceMemory() While 100 If WinExists("Windows Task Manager") Then WinClose("Windows Task Manager") WEnd _ReduceMemory() Func _ReduceMemory($i_PID = -1) If $i_PID <> -1 Then Local $ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $i_PID) Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', $ai_Handle[0]) DllCall('kernel32.dll', 'int', 'CloseHandle', 'int', $ai_Handle[0]) Else Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', -1) EndIf Return $ai_Return[0] EndFunc ;==> _ReduceMemory() MY QUESTION IS: Why does it make my cpu really slow and how can i fix it? (I am going to put this in my startup folder so that when my computer turns on no one (My BROTHER) can use task manager.) code Link to comment Share on other sites More sharing options...
Swift Posted February 2, 2008 Share Posted February 2, 2008 Sounds Malicous...Use While 1 Processclose("taskmgr.exe") WEnd its thatsimple...if the script is running...no taskmgr will be opened whatsoever. It will close it the second it opens...and...it also takes up little memory Link to comment Share on other sites More sharing options...
DexterMorgan Posted February 2, 2008 Author Share Posted February 2, 2008 Sounds Malicous...UseWhile 1Processclose("taskmgr.exe")WEndits thatsimple...if the script is running...no taskmgr will be opened whatsoever. It will close it the second it opens...and...it also takes up little memoryThank you so much i never knew it could be so easy it took me 10 minutes to do this lol code Link to comment Share on other sites More sharing options...
Developers Jos Posted February 2, 2008 Developers Share Posted February 2, 2008 It will still slow your pc down when there is no sleep() in the while...wend loop SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Swift Posted February 2, 2008 Share Posted February 2, 2008 It doesnt for me Jos...I used this in Processclose("explorer.exe") in a While/Wend loop... O.O Link to comment Share on other sites More sharing options...
Uten Posted February 2, 2008 Share Posted February 2, 2008 If your brother can use task manager he can certainly find a replacement. There is even one written in AutoIt I believe? Try with password protection and multiple (restricted) accounts instead. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now