Created
August 23, 2020 06:46
-
-
Save hushin/30c4fc0963e44a757d8360c4109f6c3e to your computer and use it in GitHub Desktop.
Windows Setup Files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 実行ポリシーを変更する(手動) | |
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
powershell -NoProfile -ExecutionPolicy Unrestricted .\start.ps1 | |
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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