Mhmmm... Thanks for posting credits... Or you can just disable task manager, though that will make them suspect something.. Will try out later. Thank you.
(Apr 20, 2010 06:58 PM)jaikrishna Wrote: Yeah, Hiding is better than disabling Never said it wasn't just saying or you could do that.... I even said what was the flaw with the other option..
OT: Looks like a lot of source.
Thanks for sharing. Will try it out later.
(Apr 20, 2010 07:04 PM)Vice Wrote: Just a note, the original source states that this doesn't work for Vista/7.
JUST A NOTE: to anyone using this code, as Vice posted, in the original source it states that this doesn't work for Vista/7, but you can fix this very easy by subing or adding one to the list number, i do not have my source here so can not remember, but you need to just test for Vista/7 if so, sub or add 1 to the list number.
For example when you use it in Vista/7, it remove the name above (or bellow) the one you want to hide.
So it a easy fix.
I can not think why the original code could not fix it.
Don't work in WinXP SP3 !
(Apr 20, 2010 10:01 PM)Stylis Wrote: Don't work in WinXP SP3 !
I will try on SP3 🤝
-------------------------------
Yeah don't work on SP3, no process list, and selected process to hide is visible. :(
(Apr 21, 2010 04:20 AM)Eprouvez Wrote: Someone want to test this? I made it shorter and a lot easier to read:
Code Public Class Form1
Dim x As New Threading.Thread(AddressOf Hidez)
Public Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
x.Start()
End Sub
Private Sub Form1_Closed(ByVal sender As Object, ByVal e As System.EventArgs)
x.Abort()
End Sub
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal ClassName As String, ByVal WindowName As String) As Int32
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal Handle1 As Int32, ByVal Handle2 As Int32, ByVal Lpsz1 As String, ByVal Lpsz2 As String) As Int32
Private Declare Function EnableWindow Lib "user32" Alias "EnableWindow" (ByVal Handle As Int32, ByVal Enable As Int32) As Boolean
Private Declare Function GetMenu Lib "user32" Alias "GetMenu" (ByVal Handle As Int32) As Int32
Private Declare Function GetSubMenu Lib "user32" Alias "GetSubMenu" (ByVal Menu As Int32, ByVal Pos As Int32) As Int32
Private Declare Function GetMenuItemID Lib "user32" Alias "GetMenuItemID" (ByVal Menu As Int32, ByVal Pos As Int32) As Int32
Private Declare Function EnableMenuItem Lib "user32" Alias "EnableMenuItem" (ByVal Menu As Int32, ByVal IDEnableItem As Int32, ByVal Enable As Int32) As Int32
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal Window As Int32, ByVal Message As Int32, ByVal wParam As Int32, ByVal lParam As String) As Int32
Private Declare Function GetDesktopWindow Lib "user32" Alias "GetDesktopWindow" () As Int32
Private Declare Function LockWindowUpdate Lib "user32" Alias "LockWindowUpdate" (ByVal HandleLock As Int32) As Int32
Private Sub Hidez()
HideProcess("notepad", True)
End Sub
Private Sub HideProcess(ByVal Name As String, Optional ByVal Hide As Boolean = True)
Dim GetManager As Int32 = FindWindow(Nothing, "Windows Task Manager")
Dim Dialog As Int32 = 0 : Dim ProcessList As Int32 = 0 : Dim ProcessHeader As Int32 = 0
While True : Select Case Hide : Case True
For I As Int32 = 1 To 7
Dialog = FindWindowEx(GetManager, Dialog, Nothing, Nothing)
If ProcessList = 0 Then ProcessList = FindWindowEx(Dialog, 0, "SysListView32", "Processes")
If ProcessHeader = 0 Then ProcessHeader = FindWindowEx(ProcessList, 0, "SysHeader32", Nothing)
Next
Dim Index As Integer = Nothing : Dim List As New List(Of Process)
For Each Proc As Process In Process.GetProcesses : Index += 1 : List.Add(Proc) : Next
For x As Int32 = 0 To Index - 1
If List(x).ProcessName = Name Then Index = x
Next
Dim Menu As Int32 = GetMenu(GetManager) : Dim SubMenu As Int32 = GetSubMenu(Menu, 2) : Dim SubSubMenu As Int32 = GetSubMenu(SubMenu, 1)
SendMessage(GetManager, &H111, GetMenuItemID(SubSubMenu, 3), 0) : EnableMenuItem(Menu, GetMenuItemID(SubMenu, 0), &H1)
EnableMenuItem(Menu, GetMenuItemID(SubSubMenu, 0), &H1) : EnableMenuItem(Menu, GetMenuItemID(SubSubMenu, 1), &H1)
EnableMenuItem(Menu, GetMenuItemID(SubSubMenu, 2), &H1) : EnableMenuItem(Menu, GetMenuItemID(SubSubMenu, 3), &H1)
EnableWindow(ProcessHeader, 0)
LockWindowUpdate(ProcessList) : SendMessage(GetManager, &H111, GetMenuItemID(SubSubMenu, 0), 0)
SendMessage(ProcessList, (&H1000 + 48), 0, Nothing) : SendMessage(ProcessList, (&H1000 + 8), Index, 0)
LockWindowUpdate(False) : If GetManager = 0 Then System.Threading.Thread.Sleep(800) Else System.Threading.Thread.Sleep(2500)
Case False
For I As Int32 = 1 To 7
Dialog = FindWindowEx(GetManager, Dialog, Nothing, Nothing)
If ProcessList = 0 Then ProcessList = FindWindowEx(Dialog, 0, "SysListView32", "Processes")
If ProcessHeader = 0 Then ProcessHeader = FindWindowEx(ProcessList, 0, "SysHeader32", Nothing)
Next
Dim Menu As Int32 = GetMenu(GetManager) : Dim SubMenu As Int32 = GetSubMenu(Menu, 2) : Dim SubMenu_ As Int32 = GetSubMenu(SubMenu, 1)
EnableMenuItem(Menu, GetMenuItemID(SubMenu, 0), &H0) : EnableMenuItem(Menu, GetMenuItemID(SubMenu_, 0), &H0)
EnableMenuItem(Menu, GetMenuItemID(SubMenu_, 1), &H0) : EnableMenuItem(Menu, GetMenuItemID(SubMenu_, 2), &H0)
EnableMenuItem(Menu, GetMenuItemID(SubMenu_, 3), &H0) : SendMessage(GetManager, &H111, GetMenuItemID(SubMenu_, 1), 0)
SendMessage(GetManager, &H111, GetMenuItemID(SubMenu, 0), 0) : EnableWindow(ProcessHeader, 1)
End Select : End While
End Sub
End Class
Don't work on WinXP SP3, sorry 😕
the idea is not bad. but i don't like how you get the window handle from it's title. get it from
process.getprocessByname("taskmgr").mainwindow. cuz it's not always in english.
(Apr 21, 2010 07:37 AM)Miharbi-DoNo Wrote: the idea is not bad. but i don't like how you get the window handle from it's title. get it from
process.getprocessByname("taskmgr").mainwindow. cuz it's not always in english.
Yeah thats a good point.
(Apr 21, 2010 07:37 AM)Miharbi-DoNo Wrote: the idea is not bad. but i don't like how you get the window handle from it's title. get it from
process.getprocessByname("taskmgr").mainwindow. cuz it's not always in english.
+1 😉
i have windows 7 x64 bits and it is still not working :(
It doenst hide anything !
lawl this looks good to remove this i use Hide all process, but if i can get this to work might just use this :)
(Apr 21, 2010 10:53 AM)FaNaTiC Wrote: lawl this looks good to remove this i use Hide all process, but if i can get this to work might just use this :)
post a link of the project to learn from, plz !
Thanks !
i might post it later tonight ima sleep now :/
|