-
Notifications
You must be signed in to change notification settings - Fork 0
/
LysInstaller.ps1
57 lines (35 loc) · 2.1 KB
/
LysInstaller.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
write-host "Hello my friend. Lets make your comp АХУИТЕЛЬНЫМ!" -ForegroundColor Green
write-host "Ставим софт..." -ForegroundColor Green
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit }
#get-disk | ? model -match ‘ssd’
$scriptpath = ($MyInvocation.MyCommand.Definition | split-path -parent)+'\'
$listfile=$scriptpath+'progs.txt'
$currentprogafile=$scriptpath+'current.txt'
Get-PackageProvider –Name Chocolatey –ForceBootstrap
#iex ((new-object net.webclient).DownloadString('http://bit.ly/psChocInstall'))
Get-AppxPackage -AllUsers | where-object {$_.name –notlike "*store*"}| Remove-AppxPackage -ErrorAction SilentlyContinue
$z = (Invoke-WebRequest 'https://chocolatey.org/install.ps1').content
Set-Content -Path ($scriptpath+'install.ps1') -Value $z
. ($scriptpath+'install.ps1')
choco feature enable -n allowEmptyChecksums
#$chocolist = chocolatey search
#Set-Content -Path ($scriptpath+'chocoList.txt') -Value $chocolist
choco install openssh -y
. "C:\Program Files\OpenSSH-Win64\install-sshd.ps1"
netsh advfirewall firewall add rule name="SSHD 22" dir=in action=allow protocol=TCP localport=22
choco install vlc -y
start /D "C:\Program Files (x86)\VideoLAN\VLC\" vlc.exe -I ntservice --ntservice-install --ntservice-name=VLC --ntservice-extraintf=dummy --ntservice-options="-I ntservice --extraintf=http --http-port=9090"
sc start vlc
$packagesToInstall = get-content -path $listfile
for($i =0 ; $i -lt $packagesToInstall.count;$i++)
{
write-host ("Installing "+$packagesToInstall[$i])
. cinst $packagesToInstall[$i] -y
}
write-host "Ставим обновления" -ForegroundColor Green
get-wuinstall -acceptall -microsoftupdate -updatetype drivers
get-wuinstall -acceptall -microsoftupdate -updatetype software
read-host -Prompt "Press enter"
exit
install-Module wuinstall.run