Skip to content

Instantly share code, notes, and snippets.

@hushin
Created August 23, 2020 06:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hushin/30c4fc0963e44a757d8360c4109f6c3e to your computer and use it in GitHub Desktop.
Save hushin/30c4fc0963e44a757d8360c4109f6c3e to your computer and use it in GitHub Desktop.
Windows Setup Files
# 実行ポリシーを変更する(手動)
# Set-ExecutionPolicy RemoteSigned -scope CurrentUser
# ロングパスを有効化
Set-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -Value 1
# 拡張子を表示
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t REG_DWORD /d "0" /f
# Chocolatey
try {
Get-Command -Name choco -ErrorAction Stop
}
catch [System.Management.Automation.CommandNotFoundException] {
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
}
$CHOCO_PACKAGES = @(
"dropbox"
"googlechrome"
"vscode"
"1password"
"vagrant"
"virtualbox"
"discord"
"line"
"windirstat"
"autohotkey"
"adobereader"
"rapidee"
"vlc"
"licecap"
"synologydrive"
# "qttabbar"
"cica"
"cascadiacodepl"
"steam"
)
choco update
choco install -y $CHOCO_PACKAGES
# Scoop
try {
Get-Command -Name scoop -ErrorAction Stop
}
catch [System.Management.Automation.CommandNotFoundException] {
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
}
$SCOOP_PACKAGES = @(
"cpu-z"
"everything"
"fzf"
"ghq"
"go"
"jq"
"mpc-be"
"nodejs-lts"
"powertoys"
"7zip"
"git"
"openssh"
"concfg"
)
scoop install git
scoop update
scoop bucket add extras
scoop bucket add versions
scoop update *
scoop install $SCOOP_PACKAGES
scoop cache rm *
# https://github.com/lukesampson/scoop/wiki/Theming-Powershell
# back-up current console settings
concfg export console-backup.json
concfg import solarized-dark
scoop install pshazz
@echo off
powershell -NoProfile -ExecutionPolicy Unrestricted .\start.ps1
exit
$cd = (Get-Location).Path
Start-Process powershell -Verb runAs -ArgumentList "-NoExit","Set-Location $cd;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment