oceanborn

SCOOP installation script sample

Apr 27th, 2021 (edited)
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # to do manually outside of this shell (but in powershell)
  2. Set-ExecutionPolicy RemoteSigned -scope CurrentUser
  3.  
  4. $SCDIR = "c:\software\scoop"
  5. $SCBIN = $SCDIR + "\apps\scoop\current\bin"
  6. $SCOOP= $SCBIN + "\scoop "
  7.  
  8. # set env variables
  9. [environment]::setEnvironmentVariable('SCOOP', $SCDIR,'User')
  10. [environment]::setEnvironmentVariable('SCOOP_GLOBAL',  $SCDIR,'Machine')
  11. #[environment]::setEnvironmentVariable('Path',  $pt,'Machine') #[environment]::ExpandEnvironmentVariables("Path", $CDIR)
  12.  
  13. # download and run the installer
  14. iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
  15.  
  16. Function PkgInst {
  17.     param([string] $pkg)
  18.   $cmd = $SCOOP
  19.   & $SCBIN\scoop install $pkg -g
  20. }
  21.  
  22. Function PkgUp {
  23.     param([string] $pkg)
  24.   $cmd = $SCOOP
  25.   & $SCBIN\scoop install $pkg -g
  26. }
  27.  
  28.  
  29. InstPkg "git"
  30.  
  31. & $SCOOP bucket add extras
  32. & $SCOOP bucket add java
  33. & $SCOOP bucket add games
  34.  
  35.  
  36. $PKGS=@("anydesk", "arduino", "busybox", "calibre", "cdburnerxp", "cdrtools", "cpu-z", "cpu-v", "cudatext", "notepad2", "notepadplusplus", "conemu", "ccleaner", "gimp",
  37. "hwmonitor", "inkscape", "imgburn", "keepass", "lessmsi", "openjdk", "paint.net", "powertoys", "python", "qalculate", "restic", "rufus", "scratch", "vlc",
  38. "winaero-tweaker")
  39.  
  40. $IGNORED=@("sysinternals", "wireshark", "rktools2k3")
  41.  
  42. Foreach ($pkg in $PKGS) {
  43.     PkgInst $pkg
  44. }
  45.  
  46.  
  47. # see what apps are installed
  48. scoop list
  49.  
  50. # see what apps need to be updated
  51.  
  52.  
Add Comment
Please, Sign In to add comment