@@ -11,7 +11,7 @@ write-host -BackgroundColor Black -ForegroundColor Yellow "Installing Google Chr
1111cinst googlechrome
1212
1313write-host - BackgroundColor Black - ForegroundColor Yellow " Installing node.js"
14- cinst nodejs.install - version 5.1 . 0
14+ cinst nodejs.install - version 4.2 . 5
1515
1616write-host - BackgroundColor Black - ForegroundColor Yellow " Installing Java Development Kit"
1717cinst jdk8
@@ -20,11 +20,14 @@ write-host -BackgroundColor Black -ForegroundColor Yellow "Installing Android SD
2020cinst android- sdk
2121
2222# setup android sdk
23- echo yes | cmd / c $env: localappdata \Android\android- sdk\tools\android update sdk -- filter " tools,platform-tools,android-23,build-tools-23.0.2,extra-android-m2repository" -- all -- no- ui
23+ echo yes | cmd / c " $env: localappdata \Android\android-sdk\tools\android" update sdk -- filter " tools,platform-tools,android-23" -- all -- no- ui
24+ echo yes | cmd / c " $env: localappdata \Android\android-sdk\tools\android" update sdk -- filter " build-tools-23.0.1,extra-android-m2repository" -- all -- no- ui
2425
2526# setup environment
2627
27- if (! $env: ANDROID_HOME ) { [Environment ]::SetEnvironmentVariable(" ANDROID_HOME" , " $env: localappdata \Android\android-sdk" , " User" ) }
28+ if (! $env: ANDROID_HOME ) {
29+ [Environment ]::SetEnvironmentVariable(" ANDROID_HOME" , " $env: localappdata \Android\android-sdk" , " User" )
30+ }
2831
2932if (! $env: JAVA_HOME ) {
3033 $curVer = (Get-ItemProperty " HKLM:\SOFTWARE\JavaSoft\Java Development Kit" ).CurrentVersion
@@ -34,6 +37,12 @@ if (!$env:JAVA_HOME) {
3437
3538# install NativeScript CLI
3639write-host - BackgroundColor Black - ForegroundColor Yellow " Installing NativeScript CLI"
37- npm install - g nativescript
40+
41+ $oldPathUser = [Environment ]::GetEnvironmentVariable(" PATH" , " User" )
42+ $pathMachine = [Environment ]::GetEnvironmentVariable(" PATH" , " Machine" )
43+ $myPath = [Environment ]::GetEnvironmentVariable(" PATH" )
44+ [Environment ]::SetEnvironmentVariable(" PATH" , " $myPath ;$oldPathUser ;$pathMachine ;$env: ProgramFiles \nodejs" )
45+
46+ cmd / c " npm" install - g nativescript
3847
3948write-host - BackgroundColor Black - ForegroundColor Yellow " This script has modified your environment. You need to log off and log back on for the changes to take effect."
0 commit comments