Results 1 to 3 of 3

Thread: Registry and VB 6??

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2003
    Posts
    154

    Registry and VB 6??

    Can anyone tell me how I can modify values in the registry??

    I want to be able to disable the Windows XP firewall??

    Any help is appreciated.

    Thanks in advance!!

  2. #2
    Lively Member
    Join Date
    Feb 2001
    Location
    Sweden, Sthlm
    Posts
    112
    hi!

    You can use some api's
    http://www.allapi.net

    RegOpenKey
    RegSetValueEx
    RegCloseKey

  3. #3
    Frenzied Member
    Join Date
    Jan 2001
    Location
    Newbury, UK
    Posts
    1,878
    Remember, modifying the registry incorrectly is a great way of crashing your system......

    VB Code:
    1. Dim WshShell As Object
    2. Set WshShell = CreateObject("WScript.Shell")
    3.  
    4. 'To write to registry
    5. WshShell.RegWrite _
    6.       "HKEY_LOCAL_MACHINE\SOFTWARE\Symantec\pcAnywhere\Directory", _
    7.       "What ever you want", "REG_SZ"
    8.  
    9. 'to read from registry
    10. str = WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Symantec\pcAnywhere\DIR")
    11. Set WshShell = Nothing

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