-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_dotfiles.ps1
40 lines (25 loc) · 1.22 KB
/
install_dotfiles.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# TODO: it probably makes sense to install these as
# symlinks to this folder to keep in sync
# AHK scripts need to be run as administrator on startup or will not work in
# windows that are run as administrator
$ahkPath = "$env:HOMEPATH\autohotkey"
Copy-Item .\autohotkey $ahkPath -Recurse -Force
Get-ChildItem .\dotfiles | ForEach-Object { Copy-Item $_.FullName $env:HOMEPATH -Force }
$WshShell = New-Object -comObject WScript.Shell
Get-ChildItem $ahkPath | ForEach-Object {
$Shortcut = $WshShell.CreateShortcut("${Env:APPDATA}\Microsoft\Windows\Start Menu\Programs\Startup\$_.lnk")
$Shortcut.TargetPath = $_.FullName
$Shortcut.Save()
}
xcopy.exe ".\conemu.xml" "${Env:APPDATA}\ConEmu\conemu.xml" /E
cd ./
[Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem')
# foreach($sourceFile in [System.IO.Compression.ZipFile]::OpenRead("dejavu-fonts-ttf-2.34.zip").Entries)
# {
# Copy-Item $sourceFile.FullName "c:\windows\fonts" -Force
# }
# set-alias sz ${Env:ProgramFiles}\7zip\7z.exe
# sz e .\fonts\dejavu-fonts-ttf-2.34.zip .\tmp -aoa
# $sa = new-object -comobject shell.application
# $Fonts = $sa.NameSpace(0x14)
# Get-ChildItem .\tmp | ForEach-Object { $Fonts.CopyHere($_.FullName) }