Install app and copy app preferences

anniwayy
New Contributor III

Hi everyone,

I have packaged up a webapplication as pkg, all works well it installs fine but i need to add a json file to users Library so the app opens and connects to the right server. I solved that with a postflight script but the problem is, the folder that the json needs to be copied to is only created after the application has been started first time by the user. I really would like to get this solved without having the user do any extra interaction except for installing the app from self-service. Anyone has an idea how to handle this best??

Thanks so much

anni

5 REPLIES 5

dan-snelson
Valued Contributor II

@anniwayy Have you had a chance to review the documentation for Composer?

Monitoring the file system may meet your needs.

andrew_nicholas
Valued Contributor

Does the application fault if you pre-create the folder, or is it using some special random/hashed naming scheme when creating it?

anniwayy
New Contributor III

@dan.snelson I am not using Composer at the moment but i might try now.

@andrew.nicholas no i will test and see if it errors out.

Thanks to both of you.

etippett
Contributor II

If you're already running a post flight script to add the json, why not also have it create the folder?

anniwayy
New Contributor III

Thanks everyone, creating the folder did the trick :)