Can someone show me where to put my application in the
registry so that it starts before task manager
my program disables CtrlAltDel when it starts, but during
load and before the visual interface, i can do CtrlAltDel
and ending its task, i do not want that to happen, Please
any suggistions,
note: my application runs on win9x,nt4,2000,xp
Comments
I think you will find a system call to keep CTL-ALT-DEL from detecting your program.
: Can someone show me where to put my application in the
: registry so that it starts before task manager
: my program disables CtrlAltDel when it starts, but during
: load and before the visual interface, i can do CtrlAltDel
: and ending its task, i do not want that to happen, Please
: any suggistions,
: note: my application runs on win9x,nt4,2000,xp
:
:
: registry so that it starts before task manager
: my program disables CtrlAltDel when it starts, but during
: load and before the visual interface, i can do CtrlAltDel
: and ending its task, i do not want that to happen, Please
: any suggistions,
: note: my application runs on win9x,nt4,2000,xp
i dunno how u can put ur program listing before 'task manager' starts up, but what u can do is disallow ur programs entry being visible in the CTRL-ALT-DEL dialog box.....
here's how.....
[code]
Public Declare Function RegisterServiceProcess Lib "kernel32.dll" (ByVal dwProcessId As Long, ByVal dwType As Long) As Long
Public Declare Function GetCurrentProcessId Lib "kernel32.dll" () As Long
Public Const RSP_SHOW = &H0
Public Const RSP_HIDE = &H1
Public Sub AppHide(Optional ByVal sh As Boolean = True)
RegisterServiceProcess GetCurrentProcessId, IIf(sh = True, RSP_HIDE, RSP_SHOW)
End Sub
[/code]
Hide: AppHide True
Show: AppHide False
if u cant see it, u cant close it!!
-sumedh
: : registry so that it starts before task manager
: : my program disables CtrlAltDel when it starts, but during
: : load and before the visual interface, i can do CtrlAltDel
: : and ending its task, i do not want that to happen, Please
: : any suggistions,
: : note: my application runs on win9x,nt4,2000,xp
:
: i dunno how u can put ur program listing before 'task manager' starts up, but what u can do is disallow ur programs entry being visible in the CTRL-ALT-DEL dialog box.....
:
: here's how.....
:
: [code]
: Public Declare Function RegisterServiceProcess Lib "kernel32.dll" (ByVal dwProcessId As Long, ByVal dwType As Long) As Long
: Public Declare Function GetCurrentProcessId Lib "kernel32.dll" () As Long
: Public Const RSP_SHOW = &H0
: Public Const RSP_HIDE = &H1
:
: Public Sub AppHide(Optional ByVal sh As Boolean = True)
:
: RegisterServiceProcess GetCurrentProcessId, IIf(sh = True, RSP_HIDE, RSP_SHOW)
:
: End Sub
: [/code]
:
:
: Hide: AppHide True
: Show: AppHide False
:
: if u cant see it, u cant close it!!
: -sumedh
:
Pretty cool to see my own code being put up as an answer by someone else! There's a very minor detail that's been skipped, however. Since the parameter is optional, you can just use (AppHide) instead of (AppHide True).
Here's an update to the code:
[code]
Public Declare Function RegisterServiceProcess Lib "kernel32.dll" (ByVal dwProcessId As Long, ByVal dwType As Long) As Long
Public Declare Function GetCurrentProcessId Lib "kernel32.dll" () As Long
Public Enum RSP_Constants
Show = &H0
Hide = &H1
End Enum
Public Sub AppHide(Optional ByVal sh As RSP_Constants = Hide)
RegisterServiceProcess GetCurrentProcessId, sh
End Sub
[/code]
And you would use it like this:
Hide:
AppHide
-or-
AppHide Hide
Show:
AppHide Show
To use the original code but with a minor change that should make it a bit faster, replace:
[code]
RegisterServiceProcess GetCurrentProcessId, IIf(sh = True, RSP_HIDE, RSP_SHOW)
[/code]
with:
[code]
RegisterServiceProcess GetCurrentProcessId, Val(sh) + 1
[/code]
And you can remove the two Public Const lines.
Hope this helps!
it on it.