I'm building a Windows application with elctron.js
and npm package electron-wix-msi
which uses local storage and its working fine but now, I want when somebody uninstalls then the data in the local storage should be clear. If the user re-installs it, they cannot use the previous data.
How can I do such a thing?
my code is:
const { MSICreator } = require('electron-wix-msi');
const path = require('path');
const iconPath = path.join(__dirname, "./assets/logo/logo.ico");
const msiCreator = new MSICreator({
appDirectory: path.join(__dirname, "./dist/windows/chatbot-win32-x64"),
outputDirectory: path.join(__dirname, "./"),
// Configure metadata
description: 'Chatbot',
exe: 'chatbot',
name: 'ChatBot',
manufacturer: 'manoj',
version: '1.0.0',
appIconPath: path.join(__dirname, "./assets/logo/logo.ico"),
features: {
autoLaunch: true,
autoUpdate: true
},
// Configure installer User Interface
ui: {
chooseDirectory: true
},
});
// 4. Create a .wxs template file
msiCreator.create().then(function(){
// Step 5: Compile the template to a .msi file
msiCreator.compile();
});