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
- :
- Re: Setting a property with a substing of a value retreived from the registry...
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎Feb 23, 2018
03:44 PM
Setting a property with a substing of a value retreived from the registry...
Hi there,
I think there might be a way to do this outside of adding a custom action widget to grab a substring, but what I'm trying to do is grab a value from the registry. I need to basically truncate that value for a PROPERTY value.
The registry value holds a path to a file, but I only need the value to the parent directory. The third party app installation I'm working with doesn't write the install location to the registry, but his file path would get me there.
The value would look like this...
C:\Program Files\Third Party App\Folder\File.ico. I need to chop off File.ico. Is there a slick way of doing this in InstallShield. I don't think I'll be able to do it in System Search as I can only assign it to a property. I'm guessing I would have to add a Set Directory custom action and I'm hoping there I can do some magic.
Any help appreciated.
I think there might be a way to do this outside of adding a custom action widget to grab a substring, but what I'm trying to do is grab a value from the registry. I need to basically truncate that value for a PROPERTY value.
The registry value holds a path to a file, but I only need the value to the parent directory. The third party app installation I'm working with doesn't write the install location to the registry, but his file path would get me there.
The value would look like this...
C:\Program Files\Third Party App\Folder\File.ico. I need to chop off File.ico. Is there a slick way of doing this in InstallShield. I don't think I'll be able to do it in System Search as I can only assign it to a property. I'm guessing I would have to add a Set Directory custom action and I'm hoping there I can do some magic.
Any help appreciated.
(2) Replies
‎Apr 09, 2018
03:27 PM
I suggest you take a look at the StrSub function. You would have to figure out the start and end indexes (assuming the filename you are removing is of constant length) but it would give you the value you would want.
‎Apr 09, 2018
03:57 PM
gbaltazar wrote:
I suggest you take a look at the StrSub function. You would have to figure out the start and end indexes (assuming the filename you are removing is of constant length) but it would give you the value you would want.
I just ended up creating a custom action to accomplish the string parsing work.