Metasploit-framework: Can't Install: Setup Wizard ended Prematurely

Created on 13 Mar 2019  路  12Comments  路  Source: rapid7/metasploit-framework

I can't even install it. I keep receiving an error message stating "Setup Wizard ended Prematurely"

bug

Most helpful comment

Looks to be caused by this change: https://github.com/rapid7/metasploit-omnibus/commit/4f6a439306cf36c68e0df97ff507531b162be61d

combined with running the installer normally with regular user permissions.

Workaround

To solve this problem for now, install the MSI as an administrator: https://www.google.com/search?q=install+msi+as+administrator

I suspect we may have hit the 64k file limit because the installer now includes a full copy of msys64. It might be useful to build C code, but isn't actually needed to run framework. We should probably look at removing that from the distribution. I just deleted it from my local install and msfconsole/msfdb/msfvenom all worked fine, _and_ that seems to account for around a gigabyte of files in the windows installer. I'm going to open a couple of issues on metasploit-omnibus to follow up.

All 12 comments

Can you paste more exactly what you see?

I'm having the same problem, here is a screenshot.
metasploit-error

Having exact same issue

Adding bug label due to multiple user reports.

Having the exact same issue, with version 5.0.13, Windows 10 Pro version 1607...

How to solve it ?

Thanks in advance !

Hmm, taking a look. You probably have to execute the package with msiexec to see the real logs.

Running this:
msiexec.exe /I metasploit-framework-5.0.12+20190319193251-1rapid7-1-x64.msi /L*v msf.log

Shows this error if you install as a regular user:

SFXCA: Extracting custom action to temporary directory: C:\Users\bcook\AppData\Local\Temp\MSI5193.tmp-\
SFXCA: Binding to CLR version v4.0.30319
Calling custom action CustomActionFastMsi!CustomActionFastMsi.CustomActions.FastUnzip
Starting FastUnzip
FASTZIPDIR = C:\
FASTZIPAPPNAME = metasploit-framework
Starting extraction
Finished extraction (time taken: 66064 ms)
Exception thrown by custom action:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.UnauthorizedAccessException: Access to the path 'C:\metasploit-framework.zip' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalDelete(String path, Boolean checkHost)
   at System.IO.File.Delete(String path)
   at CustomActionFastMsi.CustomActions.FastUnzip(Session session)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object parameters, Object arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture)
   at Microsoft.Deployment.WindowsInstaller.CustomActionProxy.InvokeCustomAction(Int32 sessionHandle, String entryPoint, IntPtr remotingDelegatePtr)
CustomAction FastUnzip returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 6:33:44: InstallFinalize. Return value 3.

Looks to be caused by this change: https://github.com/rapid7/metasploit-omnibus/commit/4f6a439306cf36c68e0df97ff507531b162be61d

combined with running the installer normally with regular user permissions.

Workaround

To solve this problem for now, install the MSI as an administrator: https://www.google.com/search?q=install+msi+as+administrator

I suspect we may have hit the 64k file limit because the installer now includes a full copy of msys64. It might be useful to build C code, but isn't actually needed to run framework. We should probably look at removing that from the distribution. I just deleted it from my local install and msfconsole/msfdb/msfvenom all worked fine, _and_ that seems to account for around a gigabyte of files in the windows installer. I'm going to open a couple of issues on metasploit-omnibus to follow up.

Please redirect further reports to this issue, since this is a windows installer problem, not something we'd fix in metasploit-framework itself: https://github.com/rapid7/metasploit-omnibus/issues/96

msiexec /a metasploitframework-latest.msi <<<<< run this command in cmd terminal in the directory of the downloaded file. I had the same issue, this is the only way i found to execute it as administrator. try this and i hope this helps.

you can add this reg value for running the metasploit.msi

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Msi.Package\Shell\runas]
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\Msi.Package\shell\runas\Command]
@=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,\
  00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,\
  73,00,69,00,65,00,78,00,65,00,63,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,\
  00,69,00,20,00,22,00,25,00,31,00,22,00,20,00,25,00,2a,00,00,00

Registry file import was successful on my case. Try to import the Registry file. Find the Registry here

Was this page helpful?
0 / 5 - 0 ratings