&"$PSScriptRoot/../Scripts/vars.ps1"

# Use $PSScriptRoot to dynamically define the output path
$downloadPath = "$PSScriptRoot/rewrite_amd64_en-US.msi"

Enable-WindowsOptionalFeature -Online -FeatureName "IIS-WebServerRole;IIS-WebServer;IIS-RequestMonitor;IIS-StaticContent;IIS-DefaultDocument;IIS-CGI" -All

#Invoke-WebRequest "https://download.microsoft.com/download/1/2/8/128E2E22-C1B9-44A4-BE2A-5859ED1D4592/rewrite_amd64_en-US.msi" -Out "rewrite_amd64_en-US.msi"
Invoke-WebRequest "https://download.microsoft.com/download/1/2/8/128E2E22-C1B9-44A4-BE2A-5859ED1D4592/rewrite_amd64_en-US.msi" -Out $downloadPath

#Start-Process "rewrite_amd64_en-US.msi" "/qn"
Start-Process $downloadPath  "/qn"

&"$PSScriptRoot\fresh-php.ps1"
