question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ability to skip uninstallOldVersion macro (NSIS)

See original GitHub issue
  • Version: 20.2.0
  • Target: win32, win64

Currently I’m working in an application that uses a custom autoupdater inside the app. It’s a game launcher, so, sometimes you might want to download a newer version of the launcher but keep your old files as well (as the game is downloaded in the same folder).

The issue is that every new installation erases the entire destination folder prior to installing. I’d like to have an option to just replace without clearing everything up beforehand, so, the uninstallOldVersion should be toggleable.

I tried to remove the macros in installer.nsi and installSection.nsh but electron-builder just throws a warning treated as an error, so I can’t do this without setting warningsAsErrors as false. However, this requires me to remove lines 49-52 from installSection.nsh, and I have to do this everytime I recreate the node_modules folder.

Any help would be greatly appreciated.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
develarcommented, Mar 10, 2018

as the game is downloaded in the same folder

It is is strictly forbidden and not allowed. Not recommended — please do not modify app installation dir, instead, write data to user data dir.

1reaction
develarcommented, Mar 21, 2018

@darkguy2008 Is is common practice to not write into app dir. Issue is closed — but it doesn’t mean that your PR will be rejected. I have limited free time and “issue closed” means “I don’t have time to implement this rare case”. As you can see, label “won’t fix” is not added and conversation is not locked (you can comment).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Macro vs Function - NSIS Wiki
Macros and Functions in NSIS are powerful tools to help make coding your installer easier and more flexible. They can also be very...
Read more >
When Uninstalling the previous installer before installing the ...
With your code snippet I am able to skip the message box from un.onInit and that is working fine. But, in my case,...
Read more >
NSIS Installer Not Working on Second Invocation #722 - GitHub
Version: 6.3.5 Target: Windows I am building a oneClick:true NSIS installer with perMachine:true. If I run the installer on a clean machine, ...
Read more >
How to skip all pages? - NSIS Forums
How do we skip all the pages and install the installer silently in the backgroud w/o user type or ... !insertmacro MUI_LANGUAGE "English"...
Read more >
NSIS 2.46 Users Manual - SourceForge
The following code, for example, will not skip the macro. ... The abilities of the NSIS scripting language can be extended by utilising...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found