Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running per-machine installation conditionally on Custom NSIS script #3319

Closed
odiseo42 opened this issue Sep 13, 2018 · 2 comments
Closed

Running per-machine installation conditionally on Custom NSIS script #3319

odiseo42 opened this issue Sep 13, 2018 · 2 comments
Labels

Comments

@odiseo42
Copy link

odiseo42 commented Sep 13, 2018

  • Version: 20.28.4
  • Target: nsis-web

I plan to change my app from perMachine=true to perMachine=false, but on app updates, i want previous users that installed per machine to keep having their per machine installation.

I thought i could do this by adding "include": "build/installer.nsh" and do something like this:

!macro preInit
  # сheck registry for previous installation path
  ${if} ${FileExists} "C:\Program Files\${APP_FILENAME}" # is there a better way to detect a per-machine installation?
   # run the multi user installer
  ${else}
    # do nothing, as perMachine = false already
  ${endif}
!macroend

The reason for why i want to try this is because I want to keep oneClick: false. So really I have two questions as declared in my code above:

  1. What is the best way to detect a per machine installation?
  2. How can i make my include nsh script to run the per machine installation process?
@stale
Copy link

stale bot commented Jul 2, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the backlog label Jul 2, 2019
@stale stale bot closed this as completed Jul 9, 2019
@feelipegr
Copy link

feelipegr commented Mar 22, 2021

If someone need, it can be done using this:

${if} $installMode == "all"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants