|
-
Oct 10th, 2000, 05:10 AM
#1
Thread Starter
Junior Member
I posted a question early last week , in which i asked if anybody knew how to make an app start with Windows ...
go here for the thread : http://www.vbforums.com/showthread.php?threadid=33933
anyway , as you will see if you went to the thread , somedody replied and said i must mail them and they will send me the control that allows the program to be set as a service , NT style.
Now I have sent that guy like 3 mails over the course of last week and he doesnt come back , how is the cheek on that!
So , if anybody has such a control or knows of another way to do what i need to do , can they please reply urgently.
Thank you
Go Luke , and may the source be with you.
-
Oct 10th, 2000, 05:23 AM
#2
Fanatic Member
For NT use: App.TaskVisible = False
For 95/98/ME Use:
Const RSP_SIMPLE_SERVICE = 1
Const RSP_UNREGISTER_SERVICE = 0
Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Private Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long
Public Sub MakeMeService()
Dim pid As Long, reserv As Long
'Get the current process ID
pid = GetCurrentProcessId()
'Register as service
regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
End Sub
Public Sub UnMakeMeService()
Dim pid As Long, reserv As Long
'Get the current process ID
pid = GetCurrentProcessId()
'Unregister as service
regserv = RegisterServiceProcess(pid, RSP_UNREGISTER_SERVICE)
End Sub
Private Sub Form_Load()
'KPD-Team 1999
'URL: http://www.allapi.net/
'E-Mail: [email protected]
MakeMeService
'Right now, you're program is hidden from the CTRL-ALT-DEL-list
End Sub
Private Sub Form_Unload(Cancel As Integer)
UnMakeMeService
End Sub
'from the API-Guide ALLAPI.NET
Crispin
VB6 ENT SP5
VB.NET
W2K ADV SVR SP3
WWW.BLOCKSOFT.CO.UK
[Microsoft Basic: 1976-2001, RIP]
-
Oct 10th, 2000, 06:12 AM
#3
Thread Starter
Junior Member
ok , thnx for the help crispin
but i have already disabled the windows key combinations
therefore ctrl=alt+del will not work.
I still need help though , because i need the app to start up with Windows.
eg I run prog.
on form load event of main form i write to registry so that app starts with windows.
now if user presses reset button then app must start with windows .
All is fine until here , because the user can just hold shift while windows loads and then the prog wont start.
That defeats the point because this is a security app that locks the user's PC when he runs it (are u following me ?)
Go Luke , and may the source be with you.
-
Oct 10th, 2000, 06:25 AM
#4
_______
<?>
I have no idea if this will work for you or not. I saw it in the postings and thought that perhaps you might want to give it a shot.
Code:
Public Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Public Declare Function GetCurrentProcess Lib "kernel32" () As Long
Public Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long
'make an app not accessable throught the task list
'the app must be an executable for it to work.
Public Sub MakeMeService()
Dim pid As Long
Dim reserv As Long
pid = GetCurrentProcessId()
regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
End Sub
Public Sub UnMakeMeService()
Dim pid As Long
Dim reserv As Long
pid = GetCurrentProcessId()
regserv = RegisterServiceProcess(pid, RSP_UNREGISTER_SERVICE)
End Sub
Private Sub Form_Load()
MakeMeService
End Sub
Private Sub Form_Unload(Cancel As Integer)
UnMakeMeService
End Sub
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Oct 10th, 2000, 06:42 AM
#5
Fanatic Member
Im not 100% sure of this, but give it a go:
lob a registry key in:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
with the full path of your app, this might not get supressed with SHIFT on startup.
Be interested to know if it works or not...
Crispin
VB6 ENT SP5
VB.NET
W2K ADV SVR SP3
WWW.BLOCKSOFT.CO.UK
[Microsoft Basic: 1976-2001, RIP]
-
Oct 10th, 2000, 07:22 AM
#6
Thread Starter
Junior Member
Originally posted by crispin
Be interested to know if it works or not...
hope you werent too interested , because i have tried it before you suggested it and it does work , except for holding in shift , which still disables the app startup
<bzzzzz> , "Wrong Answer , Please try again" 
thanx anyway
anybody else wanna try ?
Go Luke , and may the source be with you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|