Results 1 to 24 of 24

Thread: Disabling CTRL, ALT + DEL

  1. #1

    Thread Starter
    Hyperactive Member Jenova's Avatar
    Join Date
    Feb 2006
    Location
    Googleplex
    Posts
    413

    Disabling CTRL, ALT + DEL

    I have not come across any solution for this at all apart from a registry key in the registry that disables it but i am not sure where it lies. However i am using Windows XP Home Edition, Version 2004, Service Pack 2. Is there anyway i can disable it in VB, if so how? Also if there is a regsitry key that does, where is it located.

    Thank You

    Jenova

  2. #2
    Fanatic Member schoolbusdriver's Avatar
    Join Date
    Jan 2006
    Location
    O'er yonder
    Posts
    1,020

    Re: Disabling CTRL, ALT + DEL

    Found this at http://www.codeproject.com/win32/AntonioWinLock.asp

    HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr: DWORD

    Set it to 1 to disable Task Manager and 0 (or delete key) to enable it again.

    (I've not tested this...)

  3. #3
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: Disabling CTRL, ALT + DEL

    There are many ways depending on what you want.

    If you want to disable the key combination you change/create the following key:
    "Software\Microsoft\Windows\CurrentVersion\Policies\System" DisableTaskMgr = 1

    If you want to disable the task manager you could use this code
    VB Code:
    1. 'Before you lock it, make sure the task manager isn't running
    2. Open "C:\Windows\System32\taskmgr.exe" For Binary Access Read Lock Read Write As #1

  4. #4

    Thread Starter
    Hyperactive Member Jenova's Avatar
    Join Date
    Feb 2006
    Location
    Googleplex
    Posts
    413

    Re: Disabling CTRL, ALT + DEL

    TheBigB,

    Thanks for your code it works great . I was thinking of doing it through the registry way, however i only get this far.

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Settings

    The rest of the directy specified by schoolbusdriver does not exist in my registry. Is it possible that this may located in another place?

    Thanks for your help as well

    Jenova

  5. #5
    Fanatic Member schoolbusdriver's Avatar
    Join Date
    Jan 2006
    Location
    O'er yonder
    Posts
    1,020

    Re: Disabling CTRL, ALT + DEL

    You may have to create the key. I 've just tried it. It brings up a messagebox telling you task manager is disabled (by your administrator!). Merge the attached reg file if you want to try it.
    Attached Files Attached Files
    Last edited by schoolbusdriver; Jun 4th, 2006 at 02:14 PM.

  6. #6

    Thread Starter
    Hyperactive Member Jenova's Avatar
    Join Date
    Feb 2006
    Location
    Googleplex
    Posts
    413

    Re: Disabling CTRL, ALT + DEL

    Did you make that key in VB? If so can i have the source

  7. #7
    Fanatic Member schoolbusdriver's Avatar
    Join Date
    Jan 2006
    Location
    O'er yonder
    Posts
    1,020

    Re: Disabling CTRL, ALT + DEL

    No, I just used a .reg file. (Just in case...) To create it, make a plain text file (with a .reg extension) containing:-

    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System]
    "DisableTaskMgr"=dword:00000001
    Double-click on it and you'll get a messagebox asking if you want to add it to the registry.

    To remove it:-

    Code:
    Windows Registry Editor Version 5.00
    
    [-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System]
    "DisableTaskMgr"=dword:00000001
    and do the same.

    I could write a procedure to add/remove the key in VB, but someone else will probably beat me to it. Lots of API calls. I DO have it somewhwere. If nobody else has posted it before I find it....
    Last edited by schoolbusdriver; Jun 4th, 2006 at 02:39 PM.

  8. #8
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: Disabling CTRL, ALT + DEL

    i dunno what you want these things for, but there is one slight side-effect on that registry method... the problem is that you need to reboot your system, or at least log off and on again

  9. #9
    Fanatic Member schoolbusdriver's Avatar
    Join Date
    Jan 2006
    Location
    O'er yonder
    Posts
    1,020

    Re: Disabling CTRL, ALT + DEL

    In a .bas module:-
    VB Code:
    1. Option Explicit
    2.  
    3. Public Declare Function RegCreateKeyEx Lib "advapi32.dll" Alias "RegCreateKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal Reserved As Long, ByVal lpClass As String, ByVal dwOptions As Long, ByVal samDesired As Long, lpSecurityAttributes As Long, phkResult As Long, lpdwDisposition As Long) As Long
    4. Public Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
    5. Public Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As Long
    6. Public Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long         ' Note that if you declare the lpData parameter as String, you must pass it By Value.
    7.  
    8. Public Const REG_OPTION_NON_VOLATILE = 0       ' Key is preserved when system is rebooted
    9. Public Const HKEY_CURRENT_USER = &H80000001
    10. Public Const REG_DWORD = 4                      ' 32-bit number
    11. Public Const ERROR_SUCCESS = 0&
    12.  
    13. Public Const STANDARD_RIGHTS_ALL = &H1F0000
    14. Public Const KEY_QUERY_VALUE = &H1
    15. Public Const KEY_SET_VALUE = &H2
    16. Public Const KEY_CREATE_SUB_KEY = &H4
    17. Public Const KEY_ENUMERATE_SUB_KEYS = &H8
    18. Public Const KEY_NOTIFY = &H10
    19. Public Const KEY_CREATE_LINK = &H20
    20. Public Const SYNCHRONIZE = &H100000
    21.  
    22. Public Const KEY_ALL_ACCESS = ((STANDARD_RIGHTS_ALL Or KEY_QUERY_VALUE Or KEY_SET_VALUE Or KEY_CREATE_SUB_KEY Or KEY_ENUMERATE_SUB_KEYS Or KEY_NOTIFY Or KEY_CREATE_LINK) And (Not SYNCHRONIZE))

    Form:- This is just the bare bones. Needs error handling.
    VB Code:
    1. Option Explicit
    2.  
    3. Private Sub Command1_Click()
    4.    Dim RetVal As Long
    5.    Dim keyhandle As Long
    6.    Dim lretval As Long
    7.  
    8.    Const sNewKeyName = "Software\Microsoft\Windows\CurrentVersion\Policies\System"
    9.    Const dwTaskMan = "DisableTaskMgr"
    10.  
    11. 'Create and close it.
    12.    RetVal = RegCreateKeyEx(HKEY_CURRENT_USER, sNewKeyName, 0&, 0&, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, ByVal 0&, keyhandle, lretval)
    13.    RetVal = RegCloseKey(keyhandle)
    14. 'Re-open it.
    15.    RetVal = RegOpenKeyEx(HKEY_CURRENT_USER, sNewKeyName, 0&, KEY_SET_VALUE, keyhandle)
    16.    RetVal = RegSetValueEx(keyhandle, dwTaskMan, 0&, REG_DWORD, 1&, 4)
    17.    RetVal = RegCloseKey(keyhandle)
    18. 'Done. I've not put any no error checking here. It would be wise to check RetVal as you go along...
    19. End Sub

    If you need code to remove the key, it'll have to be tomorrow...

  10. #10
    Fanatic Member schoolbusdriver's Avatar
    Join Date
    Jan 2006
    Location
    O'er yonder
    Posts
    1,020

    Re: Disabling CTRL, ALT + DEL

    I just tried it, TheBigB. Didn't have to do anything except create and delete the key to disable/enable. Maybe because I'm the only user - as admin ? Dunno

  11. #11
    PowerPoster
    Join Date
    May 2006
    Posts
    2,988

    Re: Disabling CTRL, ALT + DEL

    if you email me I can send you an example project that takes control of the computer .. you click exit to gain control again .. anyway disables everything .. no registry stuff .. found the procs on the web and changed it to be reusable .. i also use the same code in a program which mimicks the desktop run in its own custom shell (not explorer.exe) and has the vbAccelerator.com menu code to create a Start Menu with Custom Programs .. i started writing a customized version of this also .. just havent finished yet .. lets you track programs you open, also shows the icons in its own system tray .. etc etc ..

  12. #12

    Thread Starter
    Hyperactive Member Jenova's Avatar
    Join Date
    Feb 2006
    Location
    Googleplex
    Posts
    413

    Re: Disabling CTRL, ALT + DEL

    The registry entry works great . Thanks alot you guys that really helped. Thanks to you to schoolbusdriver. Would you be able to post the code to delete the key please?

    Many thanks again guys

    Jenova


  13. #13
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: Disabling CTRL, ALT + DEL

    Quote Originally Posted by schoolbusdriver
    I just tried it, TheBigB. Didn't have to do anything except create and delete the key to disable/enable. Maybe because I'm the only user - as admin ? Dunno
    whoops i was doing it in local_machine

  14. #14
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Disabling CTRL, ALT + DEL

    Why do you want to disable Ctrl+Alt+Del for?

  15. #15
    Fanatic Member schoolbusdriver's Avatar
    Join Date
    Jan 2006
    Location
    O'er yonder
    Posts
    1,020

    Re: Disabling CTRL, ALT + DEL

    Ok Jenova. Here we go. I've added some basic error checking and the facility to change the key's value rather than simply deleting it - although that's there too. I've tidied it up a bit (my original code archive was for strings, not 32-bit numbers...) - it might make a bit more sense now (or as much as any api can) Take a GOOD look at the WARNING!

    .bas module
    VB Code:
    1. Option Explicit
    2.  
    3. Public Declare Function RegCreateKeyEx Lib "advapi32.dll" Alias _
    4.    "RegCreateKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, _
    5.    ByVal Reserved As Long, ByVal lpClass As String, _
    6.    ByVal dwOptions As Long, ByVal samDesired As Long, _
    7.    lpSecurityAttributes As Long, phkResult As Long, _
    8.    lpdwDisposition As Long) As Long
    9. Public Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
    10. Public Declare Function RegDeleteKey Lib "advapi32.dll" Alias "RegDeleteKeyA" _
    11.    (ByVal hKey As Long, ByVal lpSubKey As String) As Long
    12. Public Declare Function RegDeleteValue Lib "advapi32.dll" Alias "RegDeleteValueA" _
    13.    (ByVal hKey As Long, ByVal lpValueName As String) As Long
    14. Public Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" _
    15.    (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, _
    16.    ByVal samDesired As Long, phkResult As Long) As Long
    17. Public Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" _
    18.    (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, _
    19.    ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long
    20.  
    21. Public Const ERROR_SUCCESS = 0&
    22. Public Const HKEY_CURRENT_USER = &H80000001
    23. Public Const REG_DWORD = 4
    24. Public Const REG_OPTION_NON_VOLATILE = 0
    25.  
    26. Public Const KEY_QUERY_VALUE = &H1
    27. Public Const KEY_SET_VALUE = &H2
    28. Public Const KEY_CREATE_SUB_KEY = &H4
    29. Public Const KEY_ENUMERATE_SUB_KEYS = &H8
    30. Public Const KEY_NOTIFY = &H10
    31. Public Const KEY_CREATE_LINK = &H20
    32. Public Const STANDARD_RIGHTS_ALL = &H1F0000
    33. Public Const SYNCHRONIZE = &H100000
    34.  
    35. Public Const KEY_ALL_ACCESS = ((STANDARD_RIGHTS_ALL Or KEY_QUERY_VALUE Or _
    36.    KEY_SET_VALUE Or KEY_CREATE_SUB_KEY Or KEY_ENUMERATE_SUB_KEYS Or _
    37.    KEY_NOTIFY Or KEY_CREATE_LINK) And (Not SYNCHRONIZE))

    form

    VB Code:
    1. Option Explicit
    2.  
    3. Const sNewKeyName = "Software\Microsoft\Windows\CurrentVersion\Policies\System"
    4. Const sDelKey = "Software\Microsoft\Windows\CurrentVersion\Policies"
    5. Const sSubKey = "system"
    6. Const dwTaskMan = "DisableTaskMgr"
    7.  
    8. Private Sub Command1_Click()
    9. 'Create the key and respective value.
    10.    Dim RetVal As Long
    11.    Dim keyhandle As Long
    12.    Dim lretval As Long
    13.  
    14. 'Create and close it.
    15.    If RegCreateKeyEx(HKEY_CURRENT_USER, sNewKeyName, 0&, 0&, _
    16.       REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, ByVal 0&, keyhandle, _
    17.       lretval) <> ERROR_SUCCESS Then GoTo MakeKeyError
    18.    RetVal = RegCloseKey(keyhandle)
    19. 'Open the new key.
    20.    If RegOpenKeyEx(HKEY_CURRENT_USER, sNewKeyName, 0&, KEY_SET_VALUE, _
    21.       keyhandle) <> ERROR_SUCCESS Then GoTo MakeKeyError
    22.    If RegSetValueEx(keyhandle, dwTaskMan, 0&, REG_DWORD, 1, 4) _
    23.       <> ERROR_SUCCESS Then GoTo MakeKeyError
    24.    RetVal = RegCloseKey(keyhandle)
    25.    Exit Sub
    26. MakeKeyError:
    27.    RetVal = RegCloseKey(keyhandle) 'Close the key if it end up here...
    28.    MsgBox "Cannot create the key. Dunno why."
    29.    Exit Sub
    30. End Sub
    31.  
    32. Private Sub Command2_Click()
    33. 'Open the key and change its value.
    34.    Dim RetVal As Long
    35.    Dim keyhandle As Long
    36.    Dim lretval As Long
    37.  
    38. 'Open the key and change its value - the 5th parameter of RegSetValueEx - "0".
    39.    If RegOpenKeyEx(HKEY_CURRENT_USER, sNewKeyName, 0&, KEY_SET_VALUE, keyhandle) _
    40.       <> ERROR_SUCCESS Then GoTo MakeKeyError
    41.    If RegSetValueEx(keyhandle, dwTaskMan, 0&, REG_DWORD, 0, 4) _
    42.       <> ERROR_SUCCESS Then GoTo MakeKeyError
    43.    RetVal = RegCloseKey(keyhandle)
    44.    Exit Sub
    45. MakeKeyError:
    46.    RetVal = RegCloseKey(keyhandle) 'Close the key if it end up here...
    47.    MsgBox "Cannot change the key. Dunno why."
    48.    Exit Sub
    49. End Sub
    50.  
    51. Private Sub Command3_Click()
    52. 'Delete the "system" key. Don't Panic....
    53.    Dim RetVal As Long
    54.    Dim keyhandle As Long
    55.    Dim Response As Integer
    56.    Dim Msg As String
    57.    
    58. 'Delete the value.
    59.    If RegOpenKeyEx(HKEY_CURRENT_USER, sNewKeyName, 0&, KEY_SET_VALUE, keyhandle) _
    60.       <> ERROR_SUCCESS Then GoTo DelKeyError
    61.    If RegDeleteValue(keyhandle, dwTaskMan) <> ERROR_SUCCESS Then GoTo DelKeyError
    62.    RetVal = RegCloseKey(keyhandle) 'Close the key if it's got this far...
    63.  
    64. 'WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING!
    65. 'IF THIS KEY CONTAINS VALUES OTHER THAN "DisableTaskMgr", THESE WILL BE DELETED TOO.
    66. 'UNLESS YOU WANT TO ENUMERATE THIS KEY FOR OTHER VALUES, BACK OUT WHEN PROMPTED!!!
    67. 'AN EMPTY KEY WILL NOT DO ANYONE ANY HARM.
    68.  
    69. 'Delete the key.
    70.    Msg = "Deleting the System key may result in eternal hell and damnation!!"
    71.    Msg = Msg & " Are you ABSOLUTELY sure you want to do this?"
    72.    Response = MsgBox(Msg, vbCritical + vbYesNo, "DisableTaskMgr deletion")
    73.    Select Case Response
    74.       Case vbYes
    75.          If RegOpenKeyEx(HKEY_CURRENT_USER, sDelKey, 0&, KEY_SET_VALUE, keyhandle) _
    76.             <> ERROR_SUCCESS Then GoTo DelKeyError
    77.          If RegDeleteKey(keyhandle, sSubKey) <> ERROR_SUCCESS Then GoTo DelKeyError
    78.          RetVal = RegCloseKey(keyhandle)
    79.       Case vbNo
    80.          MsgBox "A wise choice!"
    81.          Exit Sub
    82.       End Select
    83.    Exit Sub
    84. DelKeyError:
    85.    RetVal = RegCloseKey(keyhandle) 'Close the key if it end up here...
    86.    MsgBox "Cannot delete the key. It may have already been deleted."
    87.    Exit Sub
    88. End Sub

    TheBigB, I'm sure I've read somewhere about needing to reboot too, but can't think where. It doesn't seem to make any difference when I try it. Oh well - it works! Time for coffee....
    Last edited by schoolbusdriver; Jun 5th, 2006 at 05:05 AM. Reason: Minor formatting/display error

  16. #16

    Thread Starter
    Hyperactive Member Jenova's Avatar
    Join Date
    Feb 2006
    Location
    Googleplex
    Posts
    413

    Re: Disabling CTRL, ALT + DEL

    Schoolbusdriver
    You the man . Thanks alot, this is greatly apprreciated lol

    Penegate
    Just for general knowledge really. I have never seen a working example before.

    Thanks for your help guys

    Jenova

  17. #17

  18. #18
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: Disabling CTRL, ALT + DEL

    Quote Originally Posted by RhinoBull
    To all: please read the following article:

    Trapping Special Key Events using Low Level Hooks
    it's known that hooking lowkeys is no longer possible in xp sp2

  19. #19
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: Disabling CTRL, ALT + DEL

    @Jenova: if your question is answered, please mark the thread resolved

  20. #20
    PowerPoster
    Join Date
    May 2006
    Posts
    2,988

    Re: Disabling CTRL, ALT + DEL

    Quote Originally Posted by TheBigB
    it's known that hooking lowkeys is no longer possible in xp sp2
    works for me ...

  21. #21
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Disabling CTRL, ALT + DEL

    Quote Originally Posted by TheBigB
    it's known that hooking lowkeys is no longer possible in xp sp2
    A lowkey?

  22. #22
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: Disabling CTRL, ALT + DEL

    Quote Originally Posted by rory
    works for me ...
    weird.... .

  23. #23
    Fanatic Member ididntdoit's Avatar
    Join Date
    Apr 2006
    Location
    :uoıʇɐɔoן
    Posts
    765

    Re: Disabling CTRL, ALT + DEL

    Try looking up the Kernal32 virus on Symantec.com, it does the same thing and the instructions to remove it should lead you right there.
    Visit here to learn to make the VB interface fit you!.
    "I have not failed 10,000 times. I have successfully identified 10,000 ways that will not work" Thomas Edison
    "The day Microsoft makes something that doesn't suck is probably the day they start making vacuum cleaners" -- Ernst Jan Plugge

  24. #24
    PowerPoster
    Join Date
    May 2006
    Posts
    2,988

    Re: Disabling CTRL, ALT + DEL

    Well im not finished yet so cant post the whole code .. but it goes a little something like this .. found this on the web a while ago.

    on The Form ..
    VB Code:
    1. Private Sub Form_Load()
    2.     Call EnableWindows(False, Me.hwnd)
    3.     Call SetHook
    4. End Sub
    5.  
    6. Private Sub Form_Terminate()
    7.     Unload Me
    8. End Sub
    9.  
    10. Private Sub Form_Unload(Cancel As Integer)
    11.     WindowsEnabled = True
    12.     Call EnableWindows(True, Me.hwnd)
    13.     Call UnSetHook
    14.     End
    15. End Sub


    And a very small part in the module is like this ..
    VB Code:
    1. 'This will prevent the task manager from appearing
    2. 'when the user presses Ctrl+Alt+Del. This will also disable the
    3. 'Alt+Tab and the Ctrl+Esc key combinations.
    4. Public Sub AntiTaskManagerController(Enabled As Boolean)
    5.     On Error Resume Next
    6.     If IsWinNT Then
    7.         Call NTController(TASK_MGR, Enabled)                                'control the task manager in registry
    8.         If Enabled Then
    9.             Close #1                                                        'Close the Taskmgr.exe, so we can run task manager normally
    10.         Else
    11.             Dim TMHwnd              As Long
    12.             Dim ProcID              As Long
    13.             Dim ProcessName         As Long
    14.             Dim retVal              As Long
    15.            
    16.             'If task manager opened we closed it first as we can't open an opened file
    17.             TMHwnd = FindWindow("#32770", "Windows Task Manager")           'Find the HWnd of task manager
    18.             retVal = GetWindowThreadProcessId(TMHwnd, ProcID)               'Find the process id
    19.             ProcessName = OpenProcess(&H1F0FFF, 0&, ProcID)                 'Open the process
    20.             retVal = TerminateProcess(ProcessName, 0&)                      'Terminate it back
    21.             Open Environ("WinDir") & "\System32\Taskmgr.exe" For Input Lock Read Write As #1
    22.         End If
    23.     Else
    24.         SystemParametersInfo 97, Enabled, Enabled, 0
    25.     End If
    26. End Sub
    27.  
    28. 'This will enable or disable the windows task manager. Please note that
    29. 'this procedure does not work on any Non-NT based system (win 9x)
    30. Public Sub NTController ( ByVal EnmPrivilage As EnumNTSettings, ByVal Enabled As Boolean)
    31.     If Not IsWinNT Then Exit Sub
    32.     Dim Command         As String   'holds the Value to open
    33.     'Get the text to for the registry value for the selected setting
    34.     Select Case EnmPrivilage
    35.         Case CHANGE_PASSWORD: Command = "DisableChangePassword"         'Don't allow pasword change
    36.         Case LOCK_WORKSTATION: Command = "DisableLockWorkStation"       'Disabling locking of workstation
    37.         Case REGISTRY_TOOLS: Command = "DisableRegistryTools"           'Cancel the register tools, like regedit
    38.         Case TASK_MGR: Command = "DisableTaskMgr"                       'Cancel task manager
    39.         Case DISP_APPEARANCE_PAGE: Command = "NoDispAppearancePage"     'No Display properties page
    40.         Case DISP_BACKGROUND_PAGE: Command = "NoDispBackgroundPage"     'No Background properties page
    41.         Case DISP_CPL: Command = "NoDispCPL"                            'Don't Display CPLs
    42.         Case DISP_SCREENSAVER: Command = "NoDispScrSavPage"             'No Screen saver any more
    43.         Case DISP_SETTINGS: Command = "NoDispSettingsPage"              'No setting page any more
    44.         Case Else: Exit Sub
    45.     End Select
    46.     If IsWinNT Then
    47.         Call CreateRegLong(HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Policies\System", Command, Not Enabled)
    48.         If IsW2000 Then Call CreateRegLong(HKEY_CURRENT_USER, _
    49.        "Software\Microsoft\Windows\CurrentVersion\Group Policy Objects\LocalUser\Software\Microsoft\Windows\CurrentVersion\Policies\System", _
    50.          Command, Not Enabled)
    51.     End If
    52. End Sub

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