Results 1 to 20 of 20

Thread: Disable "Windows Security"

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    99

    Disable "Windows Security"

    Hi im trying to make a program that requires a password to unlock the desktop and ive tried loads of code to disable CTRL+ALT+DELETE but i think that it only disables Task Manager not Windows Serurity. Please could someone help me to disable the Windows Security screen. By the way im using Windows XP!

    Thanks in advance!!
    Last edited by jh123; Aug 10th, 2006 at 11:10 AM.

  2. #2

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    99

    Re: Disable "Windows Security"

    Im trying to make a program that basicly locks the pc but I cant seem to find some code that will disable CTRL+ALT+DELETE (Windows Security), I have only found code that will disable Task Manager!!

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Disable "Windows Security"

    Why not just use the built in Windows Security? If you use the LockWorkstation API for NT based operating systems you can lock the workstation automatically. Then they need a password to unlock it.

    VB Code:
    1. Private Declare Function LockWorkStation Lib "user32.dll" () As Long
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    99

    Re: Disable "Windows Security"

    I don't really want to do that because my boss told me not to do that! When I say "Windows Security" I mean the form that comes up when you press CTRL+ALT+DELETE on a LAN domain! thanks anyway

  6. #6
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Disable "Windows Security"

    Well then your only choice is to use the password protected seceensaver method like Martin posted about.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  7. #7

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    99

    Re: Disable "Windows Security"

    Why cant this be done when ive found ways to disable CTRL+ALT+DELETE(TASK MANAGER)!

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    99

    Re: Disable "Windows Security"

    I just got a great idea but im not sure if it will work! My idea is that if anybody could find out where the windows security exe or dll is situated and tell me I could then make a timer witch will delete it every milisecond and because its a windows file it should be replaced every 3 seconds!! Is it possible or not???

  10. #10
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Disable "Windows Security"

    Nope, not possible as the security dlls are protected and not able to be accessed.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  11. #11

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    99

    Re: Disable "Windows Security"

    Ive found out where the DLL file is the path to it is "C:\WINDOWS\SYSTEM32\msgina.dll" but like you said you cant access it which you cant BUT I was wondering if somebody could come up with some API to see if its dialog was opened and if it is then it will hide it!!

  12. #12
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Disable "Windows Security"

    Nope, cant do that either as the process thread is protected as well. Bottom line is you can not do anything with the Windows Security Dialog window.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  13. #13

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    99

    Re: Disable "Windows Security"

    If somebody could tell me a way to change what opens up when you press ctrl+alt+delete (eg. Change from Windows Security to Task Manager) I could do it to change from Windows Security to Task Manager you can use Control Panel, User Accounts, Change the way users log on or off and select "Use the Welcome Screen"!!! I would like it if someone could post the code to change that setting from VB6!!

    Thanks in advance

  14. #14

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    99

    Re: Disable "Windows Security"

    If this is possible then please could you give me the API code.

  15. #15

  16. #16

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Posts
    99

    Re: Disable "Windows Security"

    How did these people do it then???

    http://www.meliorasoft.com/kits/keyboard/

  17. #17
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Disable "Windows Security"

    They have written several different things which work together to replace the Windows security system - as it costs $299 for the program (not the code) it is safe to assume that even if you knew what you were doing it would take a long time (months/years) for you to write the equivalent.

  18. #18
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Disable "Windows Security"

    They are doing it in C++. You can not do it in VB alone.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  19. #19

  20. #20
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Disable "Windows Security"

    I'm a little confused, why would you need to remove the Windows Security screen? If you want to lock the desktop from the user you can do that by creating a new desktop which only runs one single program, which would be your logon program. Doing this will not disable the Ctrl+Alt+Del screen however the user can not bring up the task manager so it can't close your program. Actually they can bring up the Task Manager but it will come up on the origional desktop and not the one you run your program on.

    Attached is a sample that you can use. It contains two projects. The first called DesktopLaunch will create the new desktop and launch the second program on that desktop. The desktop will not be unloaded until the second program ends, and it will not end until the user has inputted the correct password (which is "secret", without the quotes in this sample).

    To try out this you can load either the DesktopLaunch project or the Project Group (simply called Group1.vbg), however since the DesktopLaunch will run Login.exe (the second project) you must make sure you have compiled that first.

    The DesktopLaunch project simply contains one class called CDesktop that takes care of everything related to creating a new desktop and launching one application on it, and unloads the desktop when this application ends. It also contains one regular module that has a Sub Main:
    VB Code:
    1. Public Sub Main()
    2.     Dim oDesktop As CDesktop
    3.     Set oDesktop = New CDesktop
    4.     With oDesktop
    5.         .Create "MySecurityDesktop"
    6.         .StartProcess App.Path & "\Login.exe"
    7.         .ClearUp
    8.     End With
    9.     Set oDesktop = Nothing
    10. End Sub
    The second project contains a simple Form with a textbox and a command button. The TextBox is where you would enter the password. The full code for this Form is as follows:
    VB Code:
    1. Private Sub cmdOK_Click()
    2.     If txtPwd.Text = "secret" Then
    3.         Unload Me
    4.     Else
    5.         MsgBox "Uncorrect password!", vbCritical
    6.         With txtPwd
    7.             .Text = ""
    8.             .SetFocus
    9.         End With
    10.     End If
    11. End Sub
    12.  
    13. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
    14.     'Do only unload this Form if it was unloaded via code
    15.     If UnloadMode <> vbFormCode Then
    16.         Cancel = True
    17.     End If
    18. End Sub
    As you can see the code is very simple, all the advanced stuff is in the CDesktop class.

    So when you've compiled both of these projects you should run the DesktopLaunch.exe program which launches your login.exe application. You can set this to run on startup of the computer.
    Attached Files Attached Files

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