Results 1 to 4 of 4

Thread: How to Ensure that Registry key is present?

  1. #1
    Join Date
    Feb 2009
    Posts
    26

    How to Ensure that Registry key is present?

    Hello , i wanted to check and Ensure that any particular Registry is not present or not , can you tell me how can i do so , without checking manually, i mean is there any software to check that or any batch or Vb script to perform the job for me , please help me , thanks in advance

  2. #2
    Dr. V Guest

    Re: How to Ensure that Registry key is present?

    You can check this Code

    Dim Cal
    Dim Value
    Dim WshShell
    Set WshShell = WScript.CreateObject("WScript.Shell")
    Cal = "Location of Registry KEy "
    On Error Resume Next
    Valeur = WshShell.RegRead(Cal)
    msgbox err.number

  3. #3
    Join Date
    Nov 2005
    Posts
    1,203

    Re: How to Ensure that Registry key is present?

    the Above Code does Seem to be proper You can Check this , it is tested and working

    Set oshell = CreateObject("WScript.Shell")
    Err.Clear
    On Error Resume Next
    strRegKey = oshell.RegRead ("key to be Verified should be present")

    If Err.Number <> 0 Then
    WScript.Echo "The Key is not present"
    Else
    WScript.Echo "The Key is present"
    End If

  4. #4
    Join Date
    Apr 2008
    Posts
    3,295

    Re: How to Ensure that Registry key is present?

    Hello , this one is really cool , this one check to see if exist or not and if exist you can also change the key

    Private Sub Form_Load()
    Dim intReturned As Integer
    Dim strInitial As String
    strInitial = "0"
    Dim WSHShell
    Set WSHShell = CreateObject("WScript.Shell")
    'check to see if key is present
    If WSHShell.RegRead("key location ") = "" Then
    WSHShell.RegWrite "Action ", strInitial
    End If

Similar Threads

  1. How to ensure backorder for ordered white HTC VIVID
    By Mark$Hen in forum Portable Devices
    Replies: 4
    Last Post: 12-11-2011, 02:17 PM
  2. Steps to ensure better security in Facebook
    By Leoniee in forum Tips & Tweaks
    Replies: 2
    Last Post: 20-10-2011, 12:32 PM
  3. How to use passwords to ensure the security of wireless LAN
    By Savannah87 in forum Networking & Security
    Replies: 4
    Last Post: 17-03-2010, 03:54 AM
  4. How to ensure system security in Linux?
    By Edwards in forum Operating Systems
    Replies: 5
    Last Post: 23-02-2010, 12:54 AM
  5. How to ensure safe privacy in facebook
    By Bansi_WADIA in forum Technology & Internet
    Replies: 5
    Last Post: 17-12-2009, 05:01 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,584,773.91970 seconds with 16 queries