anchor.diff:  TITLE Node.js Portable v1.1
   
   :: Settings
  -SET nodejsVersion=0.10.15
  +SET nodejsVersion=0.10.17
   
   :: Batch vars (no edits necessary)
   SET nodejsPath=%CD%
  
positive.code: ECHO  2 - Install
  ECHO  9 - Exit
  ECHO.
  SET /P nodejsTask=Choose a task: 
  ECHO.
  
  IF %nodejsTask% == 1 GOTO LAUNCH
  
negative.code: IF NOT EXIST "%TEMP%" MKDIR "%TEMP%"
  
  :: Prepare cscript to download node.js
  ECHO WScript.StdOut.Write "Download " ^& "%nodejsMsiPackage%" ^& " ">%nodejsInstallVbs%
  :: Switched to 'WinHttp.WinHttpRequest.5.1'
  ECHO dim http: set http = createobject("WinHttp.WinHttpRequest.5.1") >>%nodejsInstallVbs%
  ECHO dim bStrm: set bStrm = createobject("Adodb.Stream") >>%nodejsInstallVbs%
  :: Open in asynchronous mode.
  ECHO http.Open "GET", "%nodejsUrl%", True >>%nodejsInstallVbs%
  ECHO http.Send >>%nodejsInstallVbs%
  :: Every second write a '.' until the download is complete
  ECHO while http.WaitForResponse(0) = 0 >>%nodejsInstallVbs%
  ECHO   WScript.StdOut.Write "." >>%nodejsInstallVbs%
  ECHO   WScript.Sleep 1000 >>%nodejsInstallVbs%
  ECHO wend >>%nodejsInstallVbs%
  :: ECHO WScript.StdOut.Write vbCRLF >>%nodejsInstallVbs%
  :: Write the HTTP status code onto console
  ECHO WScript.StdOut.WriteLine " [HTTP " ^& http.Status ^& " " ^& http.StatusText ^& "]" >>%nodejsInstallVbs%
  ECHO with bStrm >>%nodejsInstallVbs%
  ECHO .type = 1 '//binary >>%nodejsInstallVbs%
  ECHO .open >>%nodejsInstallVbs%
  ECHO .write http.responseBody >>%nodejsInstallVbs%
  ECHO .savetofile "%TEMP%\%nodejsMsiPackage%", 2 >>%nodejsInstallVbs%
  ECHO end with >>%nodejsInstallVbs%
  
  :: Download latest version in the current folder
  cscript.exe /NoLogo %nodejsInstallVbs%
  
  :: Extract the MSI package
  ECHO Install node.js in %nodejsPath%...
  