Monday, August 8, 2016

Installing 7-Zip without Administrator access

I often need to install software on my work computer, where I do not have admin access. Most programs don't actually require admin access at all provided you install into your user profile directory (C:\Users\...) instead of Program Files. Unfortunately, many installers don't have support for per-user installations and request elevation anyway.

7-Zip is an example of one such program. But you can work around this issue if you download the MSI installer and use the following command line to open it.

msiexec /i 7z1602-x64.msi INSTALLDIR=%USERPROFILE%\7-Zip\ MSIINSTALLPERUSER=1

As you might have guessed, the MSIINSTALLPERUSER=1 flag on the command line is doing the work here by requesting a per-user install. The installer will succeed without attempting elevation.

17 comments:

  1. This thing works even in 2019 August. Hats off to Tmdean.

    ReplyDelete
  2. You SAVED MY FUCKING LIFE!! THANK YOU!!!!

    ReplyDelete
  3. plz help with how to exactly do this, I really need this?

    ReplyDelete
  4. Still works as of version 1900. Thanks for the great tip!

    ReplyDelete
  5. Doesn´t work for me (1900 version) - I think I need a little more info on what needs to be customised in the above line of code - for instance I don´t see a file path to tell windows where the msi installer is, where does that go?

    ReplyDelete
  6. I need help even when downloading MSI installer still asks for elevation.

    ReplyDelete
  7. First change the version name in the above command. Then in-order for this to work, the CMD should be opened from the folder in which you have the MSI file, but if you are not able to do so - then you can always move the file to the parent "**user_name**" folder inside c:\users\**Username** (your user name) and then run the CMD from your command prompt window

    ReplyDelete
  8. help i dont know how to do it!!!!!

    ReplyDelete
  9. i replaced %USERPROFILE% by a UNC link "C:/users/nameoftheuser/appdata/7-zip/" and it worked perfectly. Thanks !

    ReplyDelete