Indigo Rose Software

Professional Software Development Tools

 
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 17
  1. #1
    Join Date
    Oct 2003
    Location
    Scotland
    Posts
    40

    Grin Registry Reading and updating

    Hi All

    Hi All this is my first post here and as always it connected with something I'm trying to achieve with AP4.

    I want to read some values of the registry and then after I've read them I want to click another button which will update the registry.

    I have 2 specific keys I wish to read which exist here:-

    HKLM/Software/Hewlett-Packard/OpenView/OV_ETC_PATH

    HKLM/Software/Hewlett-Packard/OpenView/OV_VAR_PATH

    HKLM=HKEY_LOCAL_MACHINE

    The above keys at this moment have the following values as can bee seen from the attached screenshot :-


    \\nms10_2\openview

    I want to read this value an then maybe create an update key to say read
    :-

    \\nms10_3\openview

    But I cant even get the current key never mind update it ?

    This is to be run on an NT4 machine.

    I have searched the forum and the online help file but I cant seem to master it.

    Can someone maybe give me a hand.

    All the best

    Jimmy
    Attached Images

  2. #2
    Join Date
    Oct 2003
    Location
    Scotland
    Posts
    40

    Thumbs up Another attachment

    Hi

    As I can only upload 1 attchment per post I thought I would give the AP get gey screen here as this may help me when someone replies.

    Thanks again




    Thats strange..I couldnt upload the 2nd Image ?

  3. #3
    Join Date
    Oct 2003
    Location
    Scotland
    Posts
    40

    Thumbs up

    Hi

    I thought I would share the resolution of my problem...commonly known as finger trouble. :

    I decided that I wasn't really interested in reading a reg value as all I was going to do was change it.

    I have attached screen shot of a reg update window which worked.

    Now can anyone tell me if it is possible to have the ability for you to be prompted for a key value e.g. rather than my key automatically updating a key to the value of \\NMS10\Openview

    I want the user to type this value in manually when prompted and then the code will use whatever has been typed in as the value.

    Hopefully that makes sense.

    Appreciate any information.

    Cheers

    jimmy

  4. #4
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    Originally posted by jimmy guilfoyle
    Hi

    Now can anyone tell me if it is possible to have the ability for you to be prompted for a key value e.g. rather than my key automatically updating a key to the value of \\NMS10\Openview

    I want the user to type this value in manually when prompted and then the code will use whatever has been typed in as the value.

    You can use the Dialog.GetInformation to ask for a path where the application is installed. You might want to have a check that verifies the installation location. The value is stored in a variable then you can use that variable to set the registry value.

    Not a lot of detail but I hope that helps move you in the right direction.

    Cheers
    Tigg,

    Where in Scotland are you. Just this year I made it to Edinburgh and South Queensferry.

  5. #5
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Jimmy. If you explain, in a sentence, what the goal you are trying to achieve is I might be able to offer a better solution or approach. I'm unclear on the precise overall functionality you are seeking.

    Corey Milner
    Creative Director, Indigo Rose Software

  6. #6
    Join Date
    Oct 2003
    Location
    Scotland
    Posts
    40
    Ok Guys...I am Scottish..so give me a break

    What I have is 2 server PC`s with Network Names of NMS10_1 & NMS10_2

    I also have a client PC (Slave) which will connect to either of the above PC`s.

    Which one it connects to depends on the value of 2 keys in the registry.

    These keys are



    HKLM/Software/Hewlett-Packard/OpenView/OV_ETC_PATH

    HKLM/Software/Hewlett-Packard/OpenView/OV_VAR_PATH

    The actual key values for the above are:


    \\NMS10_1\Openview or \\NMS10_2\Openview

    So if I want to connect my client PC to a computer called NMS10_1 then I have to change these 2 key values.

    This I managed to achieve by using the reg set function for a specific key value. So all the user does is click one of two text box which may say:-

    Connect to NMS10_1
    Connect to NMS10_2

    This works fine but it means that I have to know the network names of the PC`s.

    What I was looking for is for the user to enter the name of his PC and this value be used to update the key

    e.g. imagine the current key value is \\nms10_2\openview

    The user wants to change this value.

    For example he clicks a Text box which and a windows asks him to type in the name of the PC he wants to connect to ?

    He types in \\nms103\openview


    Then this value is used to change the 2 keys


    so the fill path & value will now read:-


    HKLM/Software/Hewlett-Packard/OpenView/OV_ETC_PATH/NMS103/OPENVIEW

    HKLM/Software/Hewlett-Packard/OpenView/OV_VAR_PATH/NMS103/OPENVIEW

    HKLM is shorthand for HKEY_LOCAL_MACHINE.

    The forward slashes don't actually mean anything, just representing the key & sub key & value.

    I think thats maybe waht atributes are used for but I dont really know anything about these.

    Hopefully that makes better sense.

    Again guys any help would be appreciated.

    all the best jimmy


    I can always email you the project if thats possible ?


    :confused: :confused: :confused:

  7. #7
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Well first, tell me Jimmy have you look into the SYSTEM > GET INFORMATION actions which relate to automatically retrieving LAN info? Might that be a better way to go than prompting for the data?

    Corey Milner
    Creative Director, Indigo Rose Software

  8. #8
    Join Date
    Oct 2003
    Location
    Scotland
    Posts
    40
    Thanks Corey


    I see where you are coming from but I dont want anything to complex.

    Its either we configure the names each time.

    Or if the user wants to change his network names quite often they wont need to keep asking to update the project data for them.

    I thought that user input will make the user feel more in control.

    So if possible it would ne nice for them to put this value in a "user input box" of some sorts.

    I woudl even ask them to put the complete path in \\NMS10100\Openview

    So thats is where I am coming from.

    Good lcuk

    Jimmy


    PS Its a fantastic program, I normally just use it for simplistic menus, launching programs, installing programs, but its very powerfull !

  9. #9
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Well then yes, a DIALOG > GET INFORMATION action will work well to get the user to give you the info and put it into a variable which you can then write to your registry key as a value using a REGISTRY > SET VALUE action. That's 2 actions total, nice and wee, "thrifty" even one might say...

    Corey Milner
    Creative Director, Indigo Rose Software

  10. #10
    Join Date
    Oct 2003
    Location
    Scotland
    Posts
    40

    Thumbs up

    Hi Corey

    I have used the get information and I have assigned an atribute to this called jimmy


    So I guess now I have info stored as an attribute, How do I now do a reg set using the attribute called jimmy

    The attribute jimmy is essentially the value that will be written to the registry.

    Its how to implement this :confused: :confused:

    Im getting there..slowly !

  11. #11
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    Jimmy,

    In the Registry - Set Value specify the Value Data: as your variable %jimmy%.

    Set the Main key: to HKLM

    The Sub key: to Software/Hewlett-Packard/OpenView/

    The Value name: to OV_ETC_PATH

    I assume the Value type: will be REG_SZ

    and lastly set Value data: to %jimmy%

    You will need to do that twice once for your ETC path and once for your VAR path.

    Tigg

  12. #12
    Join Date
    Oct 2003
    Location
    Scotland
    Posts
    40
    TJ_Tigger


    Yihah

    It works.

    Did what you said !

    Many thanks for that.

    Can we expand it a little more ?

    I have asked the user to type in information which is essentially my registry value.

    He will type it in in the following format

    \\NMS10\Openview


    Infact the only value I want to change in the registry is that in red below:-

    \\NMS10 \Openview


    So is it possible to just update a specific characters in a registry key ?

    I dont want the user making a mistake and putting in one backslash and maybe mispelling Openview.

    I dont care if he puts in the wrong computer name as he can reslove that himself.

    So again many thanks for that and if you can help me with the rest I will tell your our Village Motto

  13. #13
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    No problem.

    You can ask the user to enter which computer they want to connect to and store that in your variable %jimmy%. Then when you specify the Value data: in your Registry - Set Value specify the following:

    \\%jimmy%\Openview

    You could make it even easier and have two buttons in the project that change the registy to the appropriate computer without requesting data from the user. If you want it to be more flexible you could use a list box and populate the list box from a txt file that you could distribute regularly when you need to make changes. They could then select the appropriate computer from the listbox object. In any of these scenarios, you could also display the current configuration for the user. Use the Registry - GetValueData to retrieve the current data for those keys and display the current configuration in a TextObject

  14. #14
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    Originally posted by jimmy guilfoyle
    So again many thanks for that and if you can help me with the rest I will tell your our Village Motto [/B]
    Are you from Linlithgow?

  15. #15
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Glad to hear you got it working Jim!

    Tigg - For some reason they used to sing, "On the Bonnie shores of Loch Lomond" at our familiy reunions and several of my uncles had kilts and were pipers as teens. I guess that means I'm obviously part Scottish too although I never really realized it until now. Seems like a pretty good chance I might not think about it again for another 33 years, Scotland's too cold for the likes of skinny old me.

    That might explain my intrinsic addiction to golf, and/or affinity for the band Big Country though...

    Corey Milner
    Creative Director, Indigo Rose Software

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts