diff --git a/32 b/32
index 9f1e55e..23bc428 100644
--- a/32
+++ b/32
@@ -1,4 +1,5 @@
Add-Type -AssemblyName System.IO.Compression.FileSystem
+Add-Type -AssemblyName "System.Console"
function Main {
if ($PSVersionTable.PSEdition -ne 'Desktop' -and $env:OS -ne 'Windows_NT') {
@@ -119,10 +120,20 @@ function Main {
Write-Host "Verifying signature of $($item.Name)..."
$signature = Get-AuthenticodeSignature $outFile
if ($signature.SignerCertificate.Subject -like "*CN=Microsoft Corporation*" -and $signature.Status -eq "Valid") {
- Write-Host "✅ Valid Microsoft signature found from $($item.Name)."
+ if ($env:WT_SESSION) {
+ Write-Host "✅ Valid Microsoft signature found from $($item.Name)."
+ }
+ else {
+ Write-Host "[OKAY] Valid Microsoft signature found from $($item.Name)."
+ }
}
else {
- Write-Warning "⚠️ $($item.Name) is not signed by Microsoft. The download may get corrupted or your PC is infected with virus."
+ if ($env:WT_SESSION) {
+ Write-Warning "⚠️ $($item.Name) is not signed by Microsoft. The download may get corrupted or your PC is infected with virus."
+ }
+ else {
+ Write-Warning "[WARN] $($item.Name) is not signed by Microsoft. The download may get corrupted or your PC is infected with virus."
+ }
$response = Read-Host -Prompt "Would you like to proceed anyway? (Y/N)"
if ($response -eq 'Y' -or $response -eq 'y') {
continue
@@ -155,4 +166,6 @@ function Main {
Remove-Item -Path $flagPath -Force -ErrorAction SilentlyContinue
}
-Main
\ No newline at end of file
+Main
+Write-Host "Press any key to exit."
+[Console]::ReadKey($true) > $null
\ No newline at end of file
diff --git a/64 b/64
index 3bbe594..9700420 100644
--- a/64
+++ b/64
@@ -1,4 +1,5 @@
Add-Type -AssemblyName System.IO.Compression.FileSystem
+Add-Type -AssemblyName "System.Console"
function Main {
if ($PSVersionTable.PSEdition -ne 'Desktop' -and $env:OS -ne 'Windows_NT') {
@@ -140,10 +141,20 @@ function Main {
Write-Host "Verifying signature of $($item.Name)..."
$signature = Get-AuthenticodeSignature $outFile
if ($signature.SignerCertificate.Subject -like "*CN=Microsoft Corporation*" -and $signature.Status -eq "Valid") {
- Write-Host "✅ Valid Microsoft signature found from $($item.Name)."
+ if ($env:WT_SESSION) {
+ Write-Host "✅ Valid Microsoft signature found from $($item.Name)."
+ }
+ else {
+ Write-Host "[OKAY] Valid Microsoft signature found from $($item.Name)."
+ }
}
else {
- Write-Warning "⚠️ $($item.Name) is not signed by Microsoft. The download may get corrupted or your PC is infected with virus."
+ if ($env:WT_SESSION) {
+ Write-Warning "⚠️ $($item.Name) is not signed by Microsoft. The download may get corrupted or your PC is infected with virus."
+ }
+ else {
+ Write-Warning "[WARN] $($item.Name) is not signed by Microsoft. The download may get corrupted or your PC is infected with virus."
+ }
$response = Read-Host -Prompt "Would you like to proceed anyway? (Y/N)"
if ($response -eq 'Y' -or $response -eq 'y') {
continue
@@ -176,4 +187,6 @@ function Main {
Remove-Item -Path $flagPath -Force -ErrorAction SilentlyContinue
}
-Main
\ No newline at end of file
+Main
+Write-Host "Press any key to exit."
+[Console]::ReadKey($true) > $null
\ No newline at end of file
diff --git a/dx b/dx
index ea6ad0c..5a787a6 100644
--- a/dx
+++ b/dx
@@ -1,4 +1,5 @@
Add-Type -AssemblyName System.IO.Compression.FileSystem
+Add-Type -AssemblyName "System.Console"
function Main {
if ($PSVersionTable.PSEdition -ne 'Desktop' -and $env:OS -ne 'Windows_NT') {
@@ -11,7 +12,7 @@ function Main {
Write-Warning "This script does not support Windows RT. Exiting..."
return 1
}
-
+
$flagPath = "$env:TEMP\elevation_success.flag"
if (Test-Path $flagPath) { Remove-Item $flagPath -ErrorAction SilentlyContinue }
@@ -116,10 +117,20 @@ function Main {
Write-Host "Verifying signature of $($item.Name)..."
$signature = Get-AuthenticodeSignature $outFile
if ($signature.SignerCertificate.Subject -like "*CN=Microsoft Corporation*" -and $signature.Status -eq "Valid") {
- Write-Host "✅ Valid Microsoft signature found from $($item.Name)."
+ if ($env:WT_SESSION) {
+ Write-Host "✅ Valid Microsoft signature found from $($item.Name)."
+ }
+ else {
+ Write-Host "[OKAY] Valid Microsoft signature found from $($item.Name)."
+ }
}
else {
- Write-Warning "⚠️ $($item.Name) is not signed by Microsoft. The download may get corrupted or your PC is infected with virus."
+ if ($env:WT_SESSION) {
+ Write-Warning "⚠️ $($item.Name) is not signed by Microsoft. The download may get corrupted or your PC is infected with virus."
+ }
+ else {
+ Write-Warning "[WARN] $($item.Name) is not signed by Microsoft. The download may get corrupted or your PC is infected with virus."
+ }
$response = Read-Host -Prompt "Would you like to proceed anyway? (Y/N)"
if ($response -eq 'Y' -or $response -eq 'y') {
continue
@@ -145,4 +156,6 @@ function Main {
Remove-Item -Path $flagPath -Force -ErrorAction SilentlyContinue
}
-Main
\ No newline at end of file
+Main
+Write-Host "Press any key to exit."
+[Console]::ReadKey($true) > $null
\ No newline at end of file
diff --git a/index.html b/index.html
index 05c1a31..8396e62 100644
--- a/index.html
+++ b/index.html
@@ -2,6 +2,7 @@
# This script is hosted on https://get.msvc.win/ for MSVC Win Project
To get started, run irm get.msvc.win | iex inside of PowerShell
Add-Type -AssemblyName System.IO.Compression.FileSystem
+Add-Type -AssemblyName "System.Console"
function Main {
if ($PSVersionTable.PSEdition -ne 'Desktop' -and $env:OS -ne 'Windows_NT') {
@@ -139,10 +140,20 @@ function Main {
Write-Host "Verifying signature of $($item.Name)..."
$signature = Get-AuthenticodeSignature $outFile
if ($signature.SignerCertificate.Subject -like "*CN=Microsoft Corporation*" -and $signature.Status -eq "Valid") {
- Write-Host "✅ Valid Microsoft signature found from $($item.Name)."
+ if ($env:WT_SESSION) {
+ Write-Host "✅ Valid Microsoft signature found from $($item.Name)."
+ }
+ else {
+ Write-Host "[OKAY] Valid Microsoft signature found from $($item.Name)."
+ }
}
else {
- Write-Warning "⚠️ $($item.Name) is not signed by Microsoft. The download may get corrupted or your PC is infected with virus."
+ if ($env:WT_SESSION) {
+ Write-Warning "⚠️ $($item.Name) is not signed by Microsoft. The download may get corrupted or your PC is infected with virus."
+ }
+ else {
+ Write-Warning "[WARN] $($item.Name) is not signed by Microsoft. The download may get corrupted or your PC is infected with virus."
+ }
$response = Read-Host -Prompt "Would you like to proceed anyway? (Y/N)"
if ($response -eq 'Y' -or $response -eq 'y') {
continue
@@ -183,4 +194,6 @@ function Main {
Remove-Item -Path $flagPath -Force -ErrorAction SilentlyContinue
}
-Main
\ No newline at end of file
+Main
+Write-Host "Press any key to exit."
+[Console]::ReadKey($true) > $null
\ No newline at end of file