This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- New key from property
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 06, 2008
05:14 AM
Updating the Registry from a dialog
Hi,
I need to update a Registry key to a value unknown during the build of the installation, because the person installing the software should supply that value while installing it. I have a dialog that asks for the information, but I don't know how to cause the installation program to write it. What do I need to do?
Thanks
I need to update a Registry key to a value unknown during the build of the installation, because the person installing the software should supply that value while installing it. I have a dialog that asks for the information, but I don't know how to cause the installation program to write it. What do I need to do?
Thanks
(8) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 06, 2008
07:49 AM
For a basic MSI, you need first to link a property to the control you use (click on your control in the dialog editor and fill the property "property"). The property name needs to be in ALL CAPS. Then, in a component, add the registry key and for the value, write the property name in square bracket, ie "[PROPERTY_NAME]". When installing, this will be replaced by whatever is the value of the property at this time.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 06, 2008
07:51 AM
Basic MSI Project
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 06, 2008
07:53 AM
Sorry, see my edited post 😉
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 06, 2008
07:54 AM
Thank you, I'll do that
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 07, 2008
02:14 AM
Can I apply this technique to create a new key aswell?
Eg. The user enters two values (properties) in a dialog and I want to create a key with the first property as name (1). Then I want a value created from the second property in the key created from the first property.
(1) Software\MyCompany\MyProduct\TheNewKeyFromProp1
(2) Software\MyCompany\MyProduct\TheNewKeyFromProp1\ANewValue = TheNewValueFromProperty2
I tried to do it but the following error occurred (translated to english from swedish): "Was unable to write the value TheNewValueFromProperty2 on the key \Software\MyCompay\MyProduct\. Confirm that you have valid access to the key or contact your support.
Eg. The user enters two values (properties) in a dialog and I want to create a key with the first property as name (1). Then I want a value created from the second property in the key created from the first property.
(1) Software\MyCompany\MyProduct\TheNewKeyFromProp1
(2) Software\MyCompany\MyProduct\TheNewKeyFromProp1\ANewValue = TheNewValueFromProperty2
I tried to do it but the following error occurred (translated to english from swedish): "Was unable to write the value TheNewValueFromProperty2 on the key \Software\MyCompay\MyProduct\. Confirm that you have valid access to the key or contact your support.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 07, 2008
04:23 AM
speedy wrote:
Can I apply this technique to create a new key aswell?
Eg. The user enters two values (properties) in a dialog and I want to create a key with the first property as name (1). Then I want a value created from the second property in the key created from the first property.
(1) Software\MyCompany\MyProduct\TheNewKeyFromProp1
(2) Software\MyCompany\MyProduct\TheNewKeyFromProp1\ANewValue = TheNewValueFromProperty2
I tried to do it but the following error occurred (translated to english from swedish): "Was unable to write the value TheNewValueFromProperty2 on the key \Software\MyCompay\MyProduct\. Confirm that you have valid access to the key or contact your support.
BTW, I'm using the project type Basic MSI Project
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 07, 2008
07:38 AM
Never mind. I got it working. The variable [ ] can be used to create a key. I followed the advice at url:
http://www.acresso.com/webdocuments/PDF/is_vista.pdf?link_id=downloads
http://www.acresso.com/webdocuments/PDF/is_vista.pdf?link_id=downloads
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 07, 2008
08:15 AM
Not sure what you did wrong, it works fine for me. In short, you can use a property in the columns "Key", "Name" and "Value" of the table "Registry". Maybe it's your property that contain invalid character?
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)