Results 1 to 4 of 4

Thread: Lock The Desktop

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2002
    Posts
    83

    Question Lock The Desktop

    Hi Friends

    only My application can run and others application user can not access.I need to lock the User Desktop ..

    Windows plateform is XP...

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901
    you want to run your program first, and then shutdown the system? you have to keep the form from being closed, you have to inhibit ctrl-alt-del, you have to disable the start menu.

    You could set policies to do a few of those things.

    Look here for some hints that you don't have to program.
    Last edited by dglienna; Nov 25th, 2004 at 03:12 AM.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Nov 2002
    Posts
    83
    Lock the User Desktop Only My application Runs .... is it possible then help me..............

    i m using winxp 800*600

  4. #4
    Elite Hacker Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,349
    Isn't there a registry key that'll do that? Goto www.regedit.com
    I'm pretty sure there is one. Also, do you know how to add registry keys using VB? If you don't, here's how:

    VB Code:
    1. Private Function Registry_Read(Key_Path, Key_Name) As Variant
    2.    
    3.     On Error Resume Next
    4.    
    5.     Dim Registry As Object
    6.    
    7.     Set Registry = CreateObject("WScript.Shell")
    8.    
    9.     Registry_Read = Registry.RegRead(Key_Path & Key_Name)
    10.    
    11. End Function
    12.  
    13.  
    14. Private Sub Registry_Write(Key_Path As String, Key_Name As String, Key_Value As Variant, Optional Key_Type As String)
    15.    
    16.     On Error Resume Next
    17.    
    18.     'Key Type list (Use within string, ex. "
    19.     '     REG_DWORD")
    20.     '----------------
    21.    
    22.     'REG_BINARY - This type stores the value
    23.     '     as raw binary data. Most hardware compon
    24.     '     ent information is stored as binary data
    25.     '     , and can be displayed in an editor in h
    26.     '     exadecimal format.
    27.     'REG_DWORD - This type represents the da
    28.     '     ta by a four byte number and is commonly
    29.     '     used for boolean values, such as "0" is
    30.     '     disabled and "1" is enabled. Additionall
    31.     '     y many parameters for device driver and
    32.     '     services are this type, and can be displ
    33.     '     ayed in REGEDT32 in binary, hexadecimal
    34.     '     and decimal format, or in REGEDIT in hex
    35.     '     adecimal and decimal format.
    36.     'REG_EXPAND_SZ - This type is an expanda
    37.     '     ble data string that is string containin
    38.     '     g a variable to be replaced when called
    39.     '     by an application. For example, for the
    40.     '     following value, the string "%SystemRoot
    41.     '     %" will replaced by the actual location
    42.     '     of the directory containing the Windows
    43.     '     NT system files. (This type is only avai
    44.     '     lable using an advanced registry editor
    45.     '     such as REGEDT32)
    46.     'REG_MULTI_SZ - This type is a multiple
    47.     '     string used to represent values that con
    48.     '     tain lists or multiple values, each entr
    49.     '     y is separated by a NULL character. (Thi
    50.     '     s type is only available using an advanc
    51.     '     ed registry editor such as REGEDT32)
    52.     'REG_SZ - This type is a standard string
    53.     '     , used to represent human readable text
    54.     '     values.
    55.    
    56.     'Other data types not available through
    57.     '     the standard registry editors include:
    58.    
    59.     'REG_DWORD_LITTLE_ENDIAN - A 32-bit numb
    60.     '     er in little-endian format.
    61.     'REG_DWORD_BIG_ENDIAN - A 32-bit number
    62.     '     in big-endian format.
    63.     'REG_LINK - A Unicode symbolic link. Use
    64.     '     d internally; applications should not us
    65.     '     e this type.
    66.     'REG_NONE - No defined value type.
    67.     'REG_QWORD - A 64-bit number.
    68.     'REG_QWORD_LITTLE_ENDIAN - A 64-bit numb
    69.     '     er in little-endian format.
    70.     'REG_RESOURCE_LIST - A device-driver res
    71.     '     ource list.
    72.     Dim Registry As Object
    73.    
    74.     Dim Registry_Value As Variant
    75.    
    76.     Set Registry = CreateObject("WScript.Shell")
    77.    
    78.     Registry_Value = Registry_Read(Key_Path, Key_Name)
    79.    
    80.  
    81.  
    82.     If Key_Type = "" Then
    83.        
    84.         'REG_SZ is the default.
    85.        
    86.         Registry.RegWrite Key_Path & Key_Name, Key_Value
    87.        
    88.     Else
    89.        
    90.         Registry.RegWrite Key_Path & Key_Name, Key_Value, Key_Type
    91.        
    92.     End If
    93.    
    94. End Sub
    95.  
    96.  
    97. Private Sub Form_Activate()
    98.     'This is only an example of a registry e
    99.     '     ntry.
    100.     Registry_Write "HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\RUN\", "Test", 1, "REG_DWORD"
    101. 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