Access windows registry keys from Eggplant

Hi,

I am fairly new to Eggplant, I was trying to access windows registry on a remote windows XP host, to check the value of a particular registry key.

What would be the easiest and best way to do it ?

thanks in advance :)

Mili

Comments

  • Hello.

    http://en.wikipedia.org/wiki/Windows_Registry

    This shows reg.exe for CLI and regedit.exe for a GUI front end which allow manual editing or view of contents to your remote system Windows Registry.

    Something like this may work, you will have to fill in the details:
    Connect  WindowsSUT
    Click  Start
    Click Run
    TypeText  "regedit.exe" & return
    FindAndClick  MyComputer
    FindAndClick  HKeyCurrentUser
    FindAndClick  ControlPanel
    FindAndClick  Accessibility
    FindAndClick  MouseKeys
    FindAndModify  MaximumSpeed, 90
    Click  CloseWindows
    

    This would in theory launch the Registry Editor, click down to the Accessibility MouseKeys Maximum Speed property and change it to 90.

    You of course will have to write the FindAndClick handler. You could also write a modified handler of the above to retrieve the value of a particular registry value.

    If you are able to ssh via CygWIN or some other system, or to a built in Windows shell-like tool (if one exists) then you could use the reg.exe CLI only type tool on windows. See the SenseTalk shell() command for some details, and our User Forums for key words like "ssh" or "windows registry" for possible examples.
  • Hi,

    I am able to open regedit using of run and even ctrl+f is also working. Now my problem when i am putting HKEY_LOCAL_MACHINE/Software/client/87h8-787 something like that in find textbic only entry after lient/87h8-787. not able to type full path. Don't know why. Can you help me for this. Also i have to print the key value? how can i serach for particuler key and print the value.

    much appreicated!!
    Mili
  • If you are able to click and hilite, copy to clipboard the text on a user interface element you then can use the remoteClipboard() Eggplant function to get that data. This type of functionality has been wrapped up in previous postings in the Eggplant Examples -> Useful SenseTalk Functions section of the Redstone Software User Forum board.
  • Actually my question how can i hardcode path in find feild?

    HKEY_LOCAL_MACHINE\Client\{8973897-kljk} into search feild.

    if i am not wrong then RemoteClipborad is get copy from SUT.

    thanks,
    Mili
  • Hello

    Depending on your needs, you can traverse the registry with something like the attached/included .script (download and study), or bring up the Find panel in the Windows RegEdit.exe GUI application and use Eggplant's TypeText searchString & return to start a new registry search.

    Once found, you can send a DoubleClick to open the registry value edit panel. Automatically the value is highlighted, so you can copy it to the remote clipboard with TypeText controlDown, "c", controlUp command.

    Finally you can use the Eggplant get remoteClipboard() function to get the value from the SUT and use it locally in your Eggplant script(s).
  • Hi Todd,

    my code is here

    TypeText WindowsDown & r
    TypeText WindowsUp
    TypeText regedit
    TypeText return

    TypeText ControlDown & f
    TypeText ControlUp

    put "D564-463" into find
    TypeText find
    TypeText return

    wait 15
    TypeText tab
    TypeText enter

    DoubleClick (Text:"pv", Bold:"Yes", TextFont:"Microsoft Sans Serif")

    TypeText controlDown, "c" , controlUp
    put RemoteClipboard(20) into myData
    put myData
    TypeText return

    I am trying to search for key & print the value. Searching is going through but when i was trying to print that value in remoteClipboard I am getting whole thing

    Fri, 1/4/08 11:44:42 AM typecommand a
    Fri, 1/4/08 11:44:43 AM typecommand c
    TypeCommand "a"
    TypeCommand "c"
    put RemoteClipboard() into myData
    put myData
    Fri, 1/4/08 11:44:45 AM typetext

    not getting key's value. Even i was just coping & paste it,doesn't work. When i doubleclick on key, value data is already selected to just need to print.

    thanks,
    Mili
Sign In or Register to comment.