PDA

View Full Version : Reading registry keys using tokens to launch app



steve02a
12-31-2004, 07:14 PM
When I follow the instructions below to read something in my registry - I get an error. Creating the bitmap button object is no problem. I don't use the HKEY_Local_Machine in this example, I use another from a piece of software I install that only puts a key in there for the application path (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\ansaui.msi\Path;string)

Anyhow, when I create a new quick report to I can see what key the global variable is picking up - I don't see the key, as the instructions below say I should - I just see "0" (the number zero).

Am I missing something in these instructions so I can get a key to show up? Besides using my own key, I did use the one in the example below and several other keys I just snagged right from the registry.

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

Building a Read Registry Key Action

Create a Bitmap Button Object.


Open the object's Properties dialog, and navigate to the Actions tab.


Select the event that you want to execute this action when triggered.


Click the New button to initiate the Action Wizard.


Select the Read Registry Key action from the Action drop-down list.


Click Next.



From the following action dialog, you can customize the behavior of the action. To customize an action, click the name of the attribute, and then enter the value in the edit field.



Registry Key to Read — For this example, the Key to Read should look like the following: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Path;string

Store Registry Value In — Select the Variable Object or Global Variable in which you want to store the registry value.

Creating the Quick Report

You now have the Registry Key association in your Variable Object or Global Variable. However, there is currently no means of displaying the returned value from the key itself. Therefore, you need to create a Quick Report Object to display the returned value.

Create a new Quick Report Object in the scene.


Select the Object Styles tab if it is not already selected.


Click the Insert Token button.


Check the Display Global Variables option, and select the Variable Object or Global Variable you have selected to write your Registry Key to from the object combo box.


Click OK to close the Insert Token dialog, and verify that your token is displayed. It should look like the following: <Global.String(Global)>

kwicker1958
01-26-2005, 03:54 PM
Did you ever get an answer for this? I too, follow the instructions in article Q105465 (since I have v7.53) and I cannot get it to ever display results.

Anyone have any ideas?

steve02a
01-26-2005, 09:01 PM
I never got an answer nor did the Q105465 help at all.






Did you ever get an answer for this? I too, follow the instructions in article Q105465 (since I have v7.53) and I cannot get it to ever display results.

Anyone have any ideas?

kwicker1958
01-27-2005, 08:55 AM
Let me see what I can find out for us, as I have premium support and will call them today.

steve02a
01-27-2005, 06:23 PM
Let me see what I can find out for us, as I have premium support and will call them today.

Awesome, that'd be great. I've searched up and down everywhere to get a solution - and nothing. Hopefully a tech support person will know the answer. Thanks again!

kwicker1958
01-31-2005, 10:07 AM
Well, my premium support doesn't cover that application. I have been unable to get this to work and we'll just have to wait and see if anyone here answers us.

InstallShield personnel.....are you there?

Chandy Navarata
01-31-2005, 01:52 PM
Please make sure you are using string variables to store string values from the registry and number variables to store numeric values from the registry. If this is not the case, then please post a copy of your demo so I can investigate this further.

Regards,

kwicker1958
01-31-2005, 01:54 PM
Well, the problem has been solved. I don't know why, but there were two custom conditions in the Object Styles and when I deleted one of them, suddenly it worked as expected.

Thanks. I sent a copy of my project via private message to the originator of this thread.

andrewm
02-07-2005, 11:52 AM
I too have problems with this.
When I preview my demo no text is displayed in the Quick Report, not "Not Found" - nothing.

Chandy Navarata
02-08-2005, 03:39 AM
Andrew,

Can you describe your problem in detail? I'd suggest you start a separate thread for your issue as that would give more clarity. Sometimes its hard to track the entry point of your problem given the lenght of this thread.

Regards,