cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ishanu
Level 3

Editing a file to update the file path by opening a choose folder

Jump to solution

Hi,

I need to run a Post-Install action to update a .ENV file with a file path by opening a choose folder dialog box by the end-user.

In the .ENV file, I have the following key-value pair separated by the equal sign as the data path.

DATA_ROOT=<C:\path\to\data\folder>

Once the user selects the folder I need to update the <C:\path\to\data\folder> in the .ENV file.

How can I do this as a Post-Install action?

 

InstallAnywhere Version is: 2021 SP2

 

Thank you very much

 

0 Kudos
(1) Solution
madhug
Level 5

It is simple. Capture the path into a variable and for your debugging purpose first display that value using Show Message Dialog . You already said that you have static line in your file DATA_ROOT=<C:\path\to\data\folder>  so use "Modify Text File - Single File" inbuilt option , search for your string and replace it with already captured value which is in variable. just go through the InstallAnywhere help for this option, it is quiet easy.

View solution in original post

0 Kudos

(2) Replies
madhug
Level 5

It is simple. Capture the path into a variable and for your debugging purpose first display that value using Show Message Dialog . You already said that you have static line in your file DATA_ROOT=<C:\path\to\data\folder>  so use "Modify Text File - Single File" inbuilt option , search for your string and replace it with already captured value which is in variable. just go through the InstallAnywhere help for this option, it is quiet easy.

0 Kudos

Hi @madhug,

Thank you very much for the reply.

This was very helpful as a beginner to the application.

regards 

0 Kudos