SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Aug 2006
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    How to retrieve data from the registry using QTP?

    Please send me the information regarding retrieving the data from the registry. How we can retrieve the keys in the registry? I heard that using RegRead we can retrieve but I am unable to retrieve? Can anyone explain this with an example.

    Thanks
    Phani

  2. #2
    Senior Member
    Join Date
    Apr 2003
    Location
    Wisconsin, USA
    Posts
    5,338
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to retrieve data from the registry using QTP?

    Wondering why you didn't post this in the QTP forum? You will probably get more answers there than here.

  3. #3
    SQA Knight
    Join Date
    Jan 2002
    Location
    Highlands Ranch, CO, USA
    Posts
    2,860
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to retrieve data from the registry using QTP?

    This is in Rational Robot, but with a little work can be modified to run in QTP.

    '################################################# ##########
    '# Public Function GetRegistryVal
    '# Input is Registry Key and Value to read
    '################################################# ##########
    Function GetRegistryVal(sRegVal As String) as String
    Dim sVal as String, Result As Integer
    Dim Registry as Object

    ' Create Object to reference the Registry
    Set Registry = CreateObject("WScript.Shell")

    'Read a Key Value
    'Note to read the (Default) value for a key, add a "\" to the end of the key name (HKEY_CURRENT_USER)
    sVal = Registry.RegRead (sRegVal)
    'SQAConsoleWrite "sRegVal is: " & sVal

    ' Return the value to calling routine
    GetRegistryVal = sVal

    End Function
    Jim
    -------------------------------------------
    For all the general stuff to know about QA/Test go here http://www.softwareqatest.com/

  4. #4
    Junior Member
    Join Date
    Nov 2003
    Posts
    17
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to retrieve data from the registry using QTP?

    Facing a similar problem, can try this to read all the registry keys of the installed software

    ----------------------

    Dim Registry, sVal, sRegKeys, arrRegKeys, i, readVal, fso


    ' Use record mode & click on any key that you want to read - the purpose here is to get the <WinListView("SysListView32")> object in the Object Repository
    ' The GetContent function reads all the registry key names in a string
    sRegKeys = Window("Registry Editor").WinListView("SysListView32").GetContent

    ' The split function splits the string into an array, through which we loop to read the individual values
    arrRegKeys = Split(sRegKeys, vbLf)



    ' We will write the values to this file
    set fso = CreateObject("Scripting.FileSystemObject")
    set ts = fso.CreateTextFile("c:\temp\temp.txt")




    Set Registry = CreateObject("WScript.Shell")

    For i=0 to UBound(arrRegKeys)

    If i >0 Then

    ' From the created array arrRegKeys pick individual key names
    readVal = "HKLM\SOFTWARE\1E\NightWatchman40\" + arrRegKeys(i)
    ' Read individual key names
    sVal = Registry.RegRead(readVal)
    'msgBox sVal
    ts.WriteLine(arrRegKeys(i) + " " + cStr(sVal) + vbLf)

    End If

    Next

    ts.close



    --------------

  5. #5
    Junior Member
    Join Date
    Oct 2006
    Posts
    29
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to retrieve data from the registry using QTP?

    Hello all,

    'Check if the registry of the program is there
    Dim WshShell
    Set WshShell = CreateObject("WScript.Shell")
    bKey = WshShell.RegRead ("HKLM\SOFTWARE\Transym\TOCR\1.1\Paths\Service" )

    MsgBox bkey

    Grtz

    BMen

  6. #6
    Junior Member
    Join Date
    Dec 2007
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to retrieve data from the registry using QTP?

    Mr BMen

    Please contact me or post on here.
    Noted you are checking TOCR here..

    I am looking for example of the (simple) VBS script for working with TOCR 3.0

    Planning to use your tool for processing images by controlling it via VBS from QTP (Quick Test Processional by HP)
    Please help.

    Thank you,
    Alex

    am [at] energyray [dot] com

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 9.38%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 06:08 PM.

Copyright BetaSoft Inc.