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

Document how to do a silent install on Windows #37

Open
rgl opened this issue Mar 19, 2022 · 3 comments
Open

Document how to do a silent install on Windows #37

rgl opened this issue Mar 19, 2022 · 3 comments

Comments

@rgl
Copy link

rgl commented Mar 19, 2022

Can you please document how to do a silent install?

Also, how to install at the machine level (e.g. C:\Program Files\httptoolkit) instead of at the current user level (e.g. C:\Users\vagrant\AppData\Local\Programs\httptoolkit)?

This is needed for the future chocolatey package as described at httptoolkit/httptoolkit#258

@pimterry
Copy link
Member

Hi @rgl, it's a standard NSIS installer built by electron-builder. The config is here:

"win": {
"target": [
"nsis",
"zip"
],
"artifactName": "HttpToolkit-${os}-${arch}-${version}.${ext}",
"icon": "./src/icons/icon.ico",
"forceCodeSigning": true
},
"nsis": {
"installerIcon": "./src/icons/icon.ico",
"artifactName": "HttpToolkit-installer-${version}.exe"
},

Apparently passing /S on the command line should make it silent. Does that work for you?

No idea about configuring installation at the machine vs user level I'm afraid, but however you do that in any NSIS installer should work, and PRs to the config are welcome if there are any changes needed there to make that possible.

@rgl
Copy link
Author

rgl commented Mar 26, 2022

Thank you for the pointers! Indeed /S did work.

Installing globally almost worked:

.\HttpToolkit-installer-1.7.0.exe /S /D="C:\Program Files\HttpToolkit"

But the Start Menu shortcuts are still installed at the current user directory, e.g. C:\Users\vagrant\AppData\Roaming\Microsoft\Windows\Start Menu\Programs instead at the machine level, e.g. C:\ProgramData\Microsoft\Windows\Start Menu\Programs.

The NSIS installer documentation has the perMachine setting which should be set to true for a machine wide install to work out-of-the-box. I'm not sure how you feel about changing that default.

But none of this is really needed for having a chocolatey package because I've just noticed that you also publish the binaries in a .zip file, so that can be used by the chocolatey package instead.

I will try to use the .zip file to create the chocolatey package and will let you known when its ready to preview.

@pimterry
Copy link
Member

Ok great! I am open to changing the perMachine setting if that's be useful, feel free to open a PR if so. If the zip works for you though, that's fine too, whatever's best.

Just FYI, I'm not sure how chocolatey's update process works, but there's a dedicated endpoint at https://httptoolkit.tech/latest-version that you can use to check for version updates. That's used in for some other platforms' deployment scripts. Checking that is better than checking the desktop releases via https://github.com/httptoolkit/httptoolkit-desktop/releases directly, as some desktop releases need to go through testing for a little while after creation (and potentially get pulled & changed) before being officially released, at which point the website download version number & download links get updated.

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

No branches or pull requests

2 participants