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

provide msi for machine install (machine scope) #3157

Open
John0King opened this issue Jan 22, 2024 · 8 comments
Open

provide msi for machine install (machine scope) #3157

John0King opened this issue Jan 22, 2024 · 8 comments
Labels
Enhancement Areas for improvement

Comments

@John0King
Copy link

John0King commented Jan 22, 2024

Is your feature request related to a problem? Please describe.

current ILSPY's mis installer will not allow choose the installer dir and simply put the binary on system drive( C: ).

unlike vs code, vs code provider both installer for both user scope and machine scope
you can install vscode machine wide installer with command
winget install vscode --scope machine

Describe the solution you'd like

please provider a msi binary for system install, or allow user to choose installer directory.

Additional context

relate #2676

@John0King John0King added the Enhancement Areas for improvement label Jan 22, 2024
@reureu
Copy link

reureu commented Feb 23, 2024

As a workaround, you can call
msiexec /i <ILSpyPackageFile.msi> ALLUSERS=1 INSTALLDIR="C:\Program Files\ILSpy"
from an elevated command prompt.

@christophwille
Copy link
Member

@John0King would that be an OK solution (if of course documented properly)?

@John0King
Copy link
Author

@christophwille sorry for the delay response .

would that be an OK solution (if of course documented properly)?

no ,it doesn't work , it'll show help message when you use custome property

@reureu
Copy link

reureu commented Feb 27, 2024

@John0King

Useless to say, <ILSpyPackageFile.msi> was a placeholder for the MSI-filename in my previous post.

If msiexec displays its help box, it's because it hasn't been called properly. If that's the case, please post the exact command you're using.

Here is what I see right just after launching the command:
3157_workaround

This is just a standard mechanism in MSI. You call msiexec, say you want to install a package, point it to the MSI file, and pass some public properties.

However, as the MSI package has not been designed for local machine installation, there are some caveats:

  • If you don't run this command from an elevated command prompt, it won't be able to elevate before it executes its installation sequence.
  • You'll need to specify the INSTALLDIR again when deinstalling, otherwise, MSI won't erase the files.

As I said, it's a workaround, not the solution.

@John0King
Copy link
Author

 msiexec /i "C:\Users\ABlue\Downloads\ILSpy_Installer_8.2.0.7535-x64.msi" ALLUSERS=1 INSTALLDIR="D:\Program Files\ILSpy"

image

image

@reureu
Copy link

reureu commented Feb 27, 2024

@John0King ,
I'm under the impression that the properties you've specified cannot be parsed properly for some reason.

If I try this:
msiexec /i ILSpy_Installer_8.2.0.7535-x64.msi ALLUSERS=1 INSTALLDIR=C:\Program Files\ILSpy
then I see the same as you. It's because the quotation marks are missing for the INSTALLDIR I have specified.

What delimiter do you normally use in Chinese editions of Windows to specify long paths or paths with a space?
Or is the backslash used as folder delimiter in these editions?

Can you try this?
msiexec /i <ILSpyPackageFile.msi> ALLUSERS=1 INSTALLDIR="D:\ILSpy"

@John0King
Copy link
Author

@reureu

turns out , it seems a bug of powershell , it can be start with CMD.exe 🤣

@reureu
Copy link

reureu commented Feb 27, 2024

@John0King ,

Gosh! I hadn't even paid attention to your Powershell prompt! 👓
It's not exactly a bug of Powershell. It's merely due to the way parameters are passed to a msiexec in Powershell.
Others have been confronted to that.
See here https://stackoverflow.com/questions/45223031/powershell-call-msi-with-arguments

If I really had to use Powershell to launch msiexec, I would go for
msiexec /i ILSpy_Installer_8.2.0.7535-x64.msi ALLUSERS=1 INSTALLDIR=`"C:\Program Files\ILSpy`"

See the backtick in front of each double quote? It is there to pass the double quotes to msiexec.

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

No branches or pull requests

3 participants