| 12345678910111213141516171819202122 |
- <# : Begin batch (batch script is in commentary of powershell v2.0+)
- @echo off
- : Use local variables
- setlocal
- : Invoke this file as powershell expression
- powershell -executionpolicy remotesigned -Command "Invoke-Expression $([System.IO.File]::ReadAllText('%~f0'))"
- : Restore environment variables present before setlocal and restore current directory
- endlocal
- : optionally if double clicked pause
- : echo %cmdcmdline%|find /i """%~f0""">nul && pause
- : End batch - go to end of file
- goto:eof
- #>
- # here start your powershell script
- $url = "https://code.visualstudio.com/sha/download?build=stable&os=win32-x64-user"
- $dest = $env:TEMP + "\VSCodeUserSetup-x64.exe"
- Start-BitsTransfer -Source $url -Destination $dest
- &$dest /SILENT /VERYSILENT /CLOSEAPPLICATIONS /FORCECLOSEAPPLICATIONS
|