Making an istaller with data file in certain position


Hi there!
is there any way to create an installer file (like .pkg on mac or .exe on win) that installs the app in the Application folder (both Mac and Win) and create a Folder with data (that must be downloaded after on the first run) in Document folder (or similar)?!
thank you


I am not sure that I understand your question clearly.
Based on my understanding app have read/write permission only inside

From render process you can do that like this
const {app} = require(‘electron’).remote;
var get_app_path = app.getPath(‘userData’)+’/file’;
var mydata ='test data’
fs.writeFile(path_for_proxy_file, mydata, function(err) {});


The question in about the electron-builder (i found how set the correct path). actually what i’m trying to do is building the file for the autoupdater with asar.


Can you explain how you did it? It would be really interesting to know how to add data known to the main electron process as app.getPath(‘userData’) during installation with electron-builder.