File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 5
5
# @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://www.nativescript.org/setup/win'))"
6
6
# To run it inside a WINDOWS POWERSHELL console against the production branch (only one supported with self-elevation) use
7
7
# start-process -FilePath PowerShell.exe -Verb Runas -Wait -ArgumentList "-NoProfile -ExecutionPolicy Bypass -Command iex ((new-object net.webclient).DownloadString('https://www.nativescript.org/setup/win'))"
8
-
8
+ param (
9
+ [switch ] $SilentMode
10
+ )
9
11
# Check if latest .NET framework installed is at least 4
10
12
$dotNetVersions = Get-ChildItem ' HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' - recurse | Get-ItemProperty - name Version, Release - EA 0 | Where { $_.PSChildName -match ' ^(?!S)\p{L}' } | Select Version
11
13
$latestDotNetVersion = $dotNetVersions.GetEnumerator () | Sort-Object Version | Select-Object - Last 1
@@ -27,7 +29,7 @@ if (-not $isElevated) {
27
29
}
28
30
29
31
# Help with installing other dependencies
30
- $script :answer = " "
32
+ $script :answer = if ( $SilentMode ) { " a " } else { " " }
31
33
function Install ($programName , $message , $script , $shouldExit ) {
32
34
if ($script :answer -ne " a" ) {
33
35
Write-Host - ForegroundColor Green " Allow the script to install $ ( $programName ) ?"
You can’t perform that action at this time.
0 commit comments