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

Windows installer installs to different path than specified even starting from escalated cmd prompt. #115

Open
mjknoll opened this issue Feb 14, 2020 · 4 comments

Comments

@mjknoll
Copy link

mjknoll commented Feb 14, 2020

On windows 10 v10.0.18362.657 I am running the installer and at first I thought it was just not working. I did have antivirus off and I found #96, #102 and the workaround that says to use an escalated cmd prompt to execute the installation. The issue is it still won't install to C: even if I manually specify C: or a folder on C: and start the MSI from an escalated cmd prompt it is placing the zip on F: then creating the metasploit-framework folder there. Ejected my F: drive now it does it on B: can recreate this issue consistently over and over.

@lubieowoce
Copy link

lubieowoce commented Mar 19, 2020

(didn't actually work, see end)

had a similar issue, but it tried using Z:, a network drive, to store some 700MB of temp files... what ended up working for me is i unmounted Z:, put the installer on D: (the only other drive i had mounted), and did msiexec /a D:\metasploitframework-latest.msi from an admin prompt - maybe some permission issue was preventing it from using C:?.

some observations:

  • the installer seems fussy about free space (i may be cargo culting here though)
  • if the installer is complaining about something like "Drive Z: is missing" right after you start it, check if you've got a residual C:\Windows\Installer\inprogressinstallinfo.ipi left over from a previous installation attempt. (the file opens decently in Notepad or a hex viewer, look around for a path like Z : \ m e t a s p l o i t - f r a m e w o r k). deleting the file helped in my case.

EDIT alright, looks like i was a bit quick to celebrate. the first command finished without errors, but it doesn't look like it installed anything -- it just created a second metasploitframework-latest.msi, (~1MB) and metasploit-framework.zip (~750MB) in C:/ ... i'm confused

@jmartin-tech
Copy link
Contributor

This looks to be related to how WIX installer is deciding setting installation location, further investigation of root cause is needed. This may also be related to root cause of #96 although we have no concrete proof that prior to usage of fastzip the user set path was being properly respected.

@MR-AMDEV
Copy link

MR-AMDEV commented May 8, 2020

Also in environment variable in Win 10, it is actually adding the following system Path:

C:\metasploit-framework\bin\

Although even after selecting C:/ and installing, it actually installed the metasploit in my D:/ drive.
I am manually copying the extracted folder to C:/ drive.

@ghost
Copy link

ghost commented Jun 21, 2021

A better alternative (for now at least) is to open the .msi file using 7-Zip and then right click on the file starting with "fil" and choose "Open Inside"

Then CTRL+A and extract the files to C:\metasploit-framework

Add C:\metasploit-framework\bin to the PATH variable so you can access msf commands from Terminal.
image

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

4 participants