Results 1 to 8 of 8

Thread: many times

  1. #1

    Thread Starter
    Fanatic Member zmerlinz's Avatar
    Join Date
    May 2000
    Location
    in a world where the sun always shines on the bloody tv!!
    Posts
    604
    i know people ask this questions many times including me, but no one responds to it ?

    HOW DO YOU HIDE YOUR PROGRAM FROM THE CTRL - ALT- DEL MENU ?

    please help

    also check this one out aswell please

    http://<br /> <a rel="nofollow" hre...9171</a><br />

    cheers to all that can help

    Merlin

    Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
    -- Linus Torvalds

    [Galahtech.com] | [My Site] | [Fishsponge] | [UnixForum.co.uk]

  2. #2
    Hyperactive Member marnitzg's Avatar
    Join Date
    Oct 2000
    Location
    South Africa
    Posts
    372

    This straight from vb-world

    Code:
    Hiding Your Program in the Ctrl-Alt-Del list
    
    To do this, your must register your program as a service. This is done by passing the process ID of your application to the RegisterService API.
    
    Declarations
    
    Copy the following code into the declarations section of a module:
    
    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
    
    Public Const RSP_SIMPLE_SERVICE = 1
    Public Const RSP_UNREGISTER_SERVICE = 0
    Procedures
    
    To remove your program from the Ctrl+Alt+Delete list, call the MakeMeService procedure:
    
    Public Sub MakeMeService()
    Dim pid As Long
    
    Dim reserv As Long
    
    pid = GetCurrentProcessId()
    regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
    End Sub
    To restore your application to the Ctrl+Alt+Delete list, call the UnMakeMeService procedure:
    
    Public UnMakeMeService()
    Dim pid As Long
    Dim reserv As Long
    
    pid = GetCurrentProcessId()
    regserv = RegisterServiceProcess(pid, _
    RSP_UNREGISTER_SERVICE)
    'End Code
    Don't forget to unregister your application as a service before it closes to free up system resources by calling UnMakeMeService.

  3. #3

    Thread Starter
    Fanatic Member zmerlinz's Avatar
    Join Date
    May 2000
    Location
    in a world where the sun always shines on the bloody tv!!
    Posts
    604
    cheers marnitzg, that is what i needed

    any suggestions about the link

    Merlin

    Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
    -- Linus Torvalds

    [Galahtech.com] | [My Site] | [Fishsponge] | [UnixForum.co.uk]

  4. #4
    Hyperactive Member marnitzg's Avatar
    Join Date
    Oct 2000
    Location
    South Africa
    Posts
    372
    Link? Seems all your questions were answered there? Or have I missed something?

  5. #5

    Thread Starter
    Fanatic Member zmerlinz's Avatar
    Join Date
    May 2000
    Location
    in a world where the sun always shines on the bloody tv!!
    Posts
    604
    i still can't find a way to check that a key ina specific place is present in the registry

    Merlin

    Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
    -- Linus Torvalds

    [Galahtech.com] | [My Site] | [Fishsponge] | [UnixForum.co.uk]

  6. #6
    Hyperactive Member marnitzg's Avatar
    Join Date
    Oct 2000
    Location
    South Africa
    Posts
    372

    Talking Sorry for delay

    After searching for it for half an hour I decided to code it myself. (I really need to sort out my vb progs!)

    Code:
    'Declares
    Private Declare Function RegOpenKey Lib "advapi32.dll" _
    Alias "RegOpenKeyA" (ByVal hKey As Long, ByVal lpSubKey _
    As String, phkResult As Long) As Long
    
    Private Declare Function RegQueryValueEx Lib "advapi32.dll" _
    Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName _
    As String, ByVal lpReserved As Long, lpType As Long, lpData _
    As Any, lpcbData As Long) As Long
    
    Private Declare Function RegCloseKey Lib "advapi32.dll" _
    (ByVal hKey As Long) As Long
    
    'Dump this code wherever you want it
    Dim Handl As Long, Return_Result As Long
    
    RegOpenKey &H80000002,Software\Microsoft\Windows\CurrentVersion\Run", Handl
    Return_Result = RegQueryValueEx(Handl, NAME HERE, 0&, 0&, ByVal 0&, 0&)
    
    If Return_Result <> 0 Then
        MsgBox "It's not there!"
    Else: MsgBox "It's there!"
    End If
    Hope this works for you!

  7. #7
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    Taipei
    Posts
    318
    marnitzg,

    I tried your code and I works fine for Win95/98

    But when I run it under Win2k, it come out error with the
    RegisterServiceProcess.

    Would you mind to help?

  8. #8
    Hyperactive Member marnitzg's Avatar
    Join Date
    Oct 2000
    Location
    South Africa
    Posts
    372
    Hmm. Sounds like it doesn't work in 2k. Sorry I don't have 2k installed at the moment so I can't test. Try post a new thread with the problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width