Browse Source

add get-vscode

Tobias Simetsreiter 2 years ago
parent
commit
f5539b6b52
2 changed files with 24 additions and 0 deletions
  1. 22 0
      bin/Get-VSCode.cmd
  2. 2 0
      bin/pinonedrivetohome.bat

+ 22 - 0
bin/Get-VSCode.cmd

@@ -0,0 +1,22 @@
+<# : 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

+ 2 - 0
bin/pinonedrivetohome.bat

@@ -23,6 +23,8 @@ $logfile
     $sharepoint = '\\tsclient\C\Users\'+$env:USERNAME+'\Wabtec Corporation'
     $onedrive
     $sharepoint
+
     $o.Namespace($onedrive).Self.InvokeVerb("pintohome")
     $o.Namespace($sharepoint).Self.InvokeVerb("pintohome")
+    $o.Namespace("\\ang-fs.wabtec.com\share\98 IT\RDS Shortcuts").Self.InvokeVerb("pintohome")
 } *> ($logfile)