0

My use case is this:

  1. There is an (executable but not EXE) file on the company intranet, which updates very often and I usually (but not always) need to download and store the most up-to-date version before launching it.

  2. The file has a permanent address, which does not change. It is downloadable via https protocol only.

  3. I have a bookmark in Chrome, which I always click to download the file. However I have to always select the download location on my local disk.

Question (please note that this is a single question, just written in 3 points):

  1. Is it possible to store a bookmark in Chrome including the download location?
    And no, it is not my default download location, and yes, I have to keep my Chrome set up so it always ask where to save each file before downloading :)

  2. To avoid the x-y problem, is there any other way to download a file over https protocol to a given location with a single click? (Windows 11)
    The preferable (but not necessarily) solution is out-of-the-box-Windows, without installing any 3rd party product. There is also installed GIT bash on the machine.

  3. A nice bonus would be "download and execute with a single click" :)

1 Answers1

1

It is a bit of an XY-problem, so I understand your question as follows:

How can I download and run an executable with a single click?

This can all be achieved using Powershell, which is shipped with Windows.

Download, ...

You can use Invoke-Webrequest as follows:

Invoke-WebRequest -Uri "https://your.company.url/here" -OutFile "C:\path\to\file.exe"

run, ...

Again, in Powershell you can do this using the & operator:

& C:\path\to\file.exe

... in a single click

For this you have to create a shortcut that calls Powershell and points to a script file that has above download and run commands in it:

powershell.exe -command "& 'C:\path\to\script.ps1'"

You might run into execution-policy issues, but for that you can ask a specific question after searching (and showing what you've searched for).