Skip to content

Commit

Permalink
Land #16698, Adding Windows automation to the nightly installer docum…
Browse files Browse the repository at this point in the history
…entation
  • Loading branch information
cdelafuente-r7 committed Aug 19, 2022
2 parents 0b5a2ff + dd63182 commit 961db67
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/metasploit-framework.wiki/Nightly-Installers.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,33 @@ Download the [latest Windows installer](https://windows.metasploit.com/metasploi

If you downloaded Metasploit from us, there is no cause for alarm. We pride ourselves on offering the ability for our customers and followers to have the same toolset that the hackers have so that they can test systems more accurately. Because these (and the other exploits and tools in Metasploit) are identical or very similar to existing malicious toolsets, they can be used for nefarious purposes, and they are often flagged and automatically removed by antivirus programs, just like the malware they mimic.

### Windows silent installation

The PowerShell below will download and install the framework, and is suitable for automated Windows deployments. Note that, the installer will be downloaded to `$DownloadLocation` and won't be deleted after the script has run.
```
[CmdletBinding()]
Param(
$DownloadURL = "https://windows.metasploit.com/metasploitframework-latest.msi",
$DownloadLocation = "$env:APPDATA/Metasploit",
$InstallLocation = "C:\Tools",
$LogLocation = "$DownloadLocation/install.log"
)
If(! (Test-Path $DownloadLocation) ){
New-Item -Path $DownloadLocation -ItemType Directory
}
If(! (Test-Path $InstallLocation) ){
New-Item -Path $InstallLocation -ItemType Directory
}
$Installer = "$DownloadLocation/metasploit.msi"
Invoke-WebRequest -UseBasicParsing -Uri $DownloadURL -OutFile $Installer
& $Installer /q /log $LogLocation INSTALLLOCATION="$InstallLocation"
```

## Improving these installers

Feel free to review and help improve [the source code for our installers](https://github.com/rapid7/metasploit-omnibus).

0 comments on commit 961db67

Please sign in to comment.