electron-userland / electron-wix-msi

:dvd: Create traditional MSI installers for your Electron app
MIT License
318 stars 91 forks source link

how to uninstall the old one? #148

Open grj001 opened 2 years ago

grj001 commented 2 years ago

image

the old one is not uninstall

grj001 commented 2 years ago

this is the config

async function main() {

  const msiCreator = new MSICreator({
    appUserModelId: 'com.squirrel.luwangcheck',
    appIconPath: path.resolve(__dirname, './public/favicon.ico'),
    appDirectory: 'D:\\Develop\\Document\\BaseProduction\\mapv3d-admin\\luwangcheck5\\out\\luwangcheck5-win32-x64',
    description: 'desc',
    exe: 'luwangcheck5',
    name: 'luwangcheck5',
    cultures: 'zh-cn',
    shortName: "test",
    manufacturer: 'test',
    version: '1.0.0',
    outputDirectory: 'D:\\Develop\\Document\\BaseProduction\\mapv3d-admin\\luwangcheck5\\out\\msi',
    ui: {
      chooseDirectory: true
    },
  });
  const supportBinaries = await msiCreator.create();
  await msiCreator.compile();
}

main().catch(err => {console.log(err)})
grj001 commented 2 years ago

i add a option upgradeCode

const msiCreator = new MSICreator({
    appUserModelId: 'com.squirrel.luwangcheck5',
    appIconPath: path.resolve(__dirname, './public/favicon.ico'),
    appDirectory: 'D:\\Develop\\Document\\BaseProduction\\mapv3d-admin\\luwangcheck5\\out\\luwangcheck5-win32-x64',
    description: 'desc',
    exe: 'luwangcheck5',
    name: 'luwangcheck5-' + versionNew,
    cultures: 'zh-cn',
    shortName: "test",
    manufacturer: 'test',
    version: versionNew,
    outputDirectory: 'D:\\Develop\\Document\\BaseProduction\\mapv3d-admin\\luwangcheck5\\out\\msi',
    upgradeCode:'11111111-1111-1111-1111-111111111111',
    ui: {
      chooseDirectory: true
    },
  });