- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Reading JSON file during upgrade process
- 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
Reading JSON file during upgrade process
Hi
We are trying to read values from json file during major upgrade and autofill the values into dialogue.
I found system search option in installshield but that perform search into XML file and also i tried this option to read json file but it's not working.
Is there any way we can read json during ugrade?
Thanks in advance,
Ritu
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
There is only one way to achieve this as installshield do not support json files so you have to do this manually though a installscript or vbscript or using "Text file changes: which is supported by installshield apart from xml file. So far using text file changes would be best approach if the json files are not too complex or nested.
how you can achieve this is by keeping the json file with fixed values for key at every build
now in text file changes
suppose your json file looks like
{
"key1":"value1"
}
you have stored the value to replace "value1" in some property variable from the text field lets say PROPERTY_FOR_KEY1
now in replacemnet you need to mention
in text to replace write "key1":"value1"
and in text to be replaced with write "key1":"[PROPERTY_FOR_KEY1]"
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi Soumyam,
I greatly appreciate your reply. My JSON is actually complex; it has roughly 20 values so unable to use the textchange option. Thankfully, able to achieve this by writing a .net function and using .net dll in installshield project.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Oh your approach sounds interesting. thank you for the information 🙂