Table of Contents

Install Windows

OOBE

create local admin Owner

net user /add Owner /y
net localgroup administrators Owner /add
net user Owner "" /passwordreq:no /expires:never #empty password
#done

Regional

Essentials

prepare \DRV

# prepare powershell
Set-ExecutionPolicy RemoteSigned -Force
if(!(Test-Path $profile) ) { New-Item -ItemType File -Path $profile -Force }
Add-Content $PROFILE.CurrentUserAllHosts "`$host.PrivateData.ErrorForegroundColor = 'Magenta'"
 
# get curl if not exists
if ((Get-Command "curl.exe" -ErrorAction SilentlyContinue) -eq $null) 
{ iwr "https://repo.sxl.net/bin/curl.exe" -outfile "$env:windir\curl.exe" }
 
# prepare drv 
mkdir -force c:\drv ; sl c:\drv
curl.exe -LO "https://repo.sxl.net/bin/aria2c.exe"
curl.exe -LO "https://repo.sxl.net/bin/7za.exe"
 
#mail2sys
Write-Output "A13c0BRpgWFWXQmi0lB2" | Out-File -FilePath "mail2sys.key" -Force -NoNewline
curl.exe -LO "https://repo.sxl.net/bin/mail2sys.ps1"
curl.exe -LO "https://repo.sxl.net/bin/mail2sys.sh"
 
#done

prepare DRV (winget)

 

winget

# install/fix/upgrade winget
mkdir -force c:\drv ; sl c:\drv
curl.exe -Lo "winget.msixbundle" "https://aka.ms/getwinget"
Add-AppxPackage winget.msixbundle -ForceApplicationShutdown
echo Y | winget list
#

aspia

mkdir -force c:\drv ; sl c:\drv
$repo = "https://repo.sxl.net/proj/remote/aspia"
$ProgressPreference = 'SilentlyContinue'
iwr "$repo/aspia.json" -outfile "aspia-host-config.json"
iwr "$repo/aspia-host-2.6.5-x86_64.msi" -outfile "aspia-host.msi"
msiexec.exe /i aspia-host.msi /qb | Out-Null
$id=(& "$env:ProgramFiles\Aspia\Host\aspia_host_service.exe" --host-id)
write-host "Host ID = $id"
# done

quickq

mkdir -force c:\drv ; sl c:\drv
curl.exe -LO https://d.asdfgh.win/quickq/download/win32-quickq.exe
#done

install chocolatey

# install chocolatey
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
 
# config chocolatey
choco feature enable -n allowGlobalConfirmation
choco feature enable -n useRememberedArgumentsForUpgrades
Write-Output "`nImport-Module 'gsudoModule'" | Add-Content $PROFILE
# install essentials
choco install 7zip.commandline wget curl aria2 gsudo nircmd choco-cleaner
 
#choco install peazip.install --version 9.2.0
#choco install grep which peazip.install choco-cleaner
# done

upgrade chocolatey

pin teamviewer

choco pin add -n teamviewer
choco uninstall sudo
# config chocolatey
choco feature enable -n allowGlobalConfirmation
choco feature enable -n useRememberedArgumentsForUpgrades
choco upgrade chocolatey
# install essentials
choco install 7zip.commandline wget curl aria2 gsudo nircmd choco-cleaner
Write-Output "`nImport-Module 'gsudoModule'" | Add-Content $PROFILE
choco upgrade all
choco-cleaner
#

teamviewer

$tld = "com"
if ( (Get-WinUserLanguageList)[0].LanguageTag -eq "zh-Hans-CN" ) { $tld = "cn" }
$url = "https://download.teamviewer.$tld/download/TeamViewerQS.exe"; echo $url
$out="$([Environment]::GetFolderPath('Desktop'))\TeamViewerQS.exe"
curl.exe -Lo "$out" "$url"
iex "$desktop\TeamViewerQS.exe"
# open it, ACCEPT LICENSE

dontsleep

choco install dontsleep.install
dontsleep_x64.exe -bg block_standby=1 block_screensaver=1 block_shutdown=0 block_logoff=0
# done

some explorer hacks

$p="HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
Set-Itemproperty -path "$p" -Name "HideFileExt" -value 0 #show file exts
Set-ItemProperty -Path "$p" -Name "TaskbarMn"   -Value 0 #hide win11 chat
$p="HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Feeds"
Set-ItemProperty -Path "$p" -Name "ShellFeedsTaskbarViewMode" -Value 2
Write-Output Y | winget uninstall --id 9MSSGKG348SP  # uninstall win11 widgets
stop-process -name explorer -force
#done

Common

choco install peazip.install # open, set assoc > standard, set lang
choco install pasteintofile ; PasteIntoFile /filename yyyyMMdd-HHmmss
choco install file-converter 
choco install vlc 
choco install xnviewmp.install

adobe reader

Install

choco install adobereader --params '"/DesktopIcon"'

Config

$subkeys = @("HKLM\SOFTWARE","HKLM\SOFTWARE\WOW6432Node")
ForEach ( $subkey in $subkeys) {
  $regkey = "$subkey\Policies\Adobe\Adobe Acrobat\DC\FeatureLockDown"
  reg add "$regkey" /v bLimitPromptsFeatureKey /t REG_DWORD /d 1 /f
  reg add "$regkey" /v bToggleDCAppCenter /t REG_DWORD /d 1 /f
  reg add "$regkey" /v bShowRhpToolSearch /t REG_DWORD /d 0 /f
  reg add "$regkey" /v bAcroSuppressUpsell /t REG_DWORD /d 1 /f
  reg add "$regkey" /v bPurchaseAcro /t REG_DWORD /d 0 /f
  reg add "$regkey" /v bReaderRetentionExperiment /t REG_DWORD /d 0 /f
  reg add "$regkey" /v bEnableTrialistLaunchCard /t REG_DWORD /d 0 /f
  reg add "$regkey" /v bToggleSophiaWebInfra /t REG_DWORD /d 0 /f
  reg add "$regkey" /v bMerchandizingEnabled /t REG_DWORD /d 0 /f
}
 
$regkey = "HKLM\SOFTWARE\Policies\Adobe\Adobe Acrobat\DC\FeatureLockDown\cIPM"
reg add "$regkey" /v bDontShowMsgWhenViewingDoc /t REG_DWORD /d 0 /f
reg add "$regkey" /v bShowMsgAtLaunch /t REG_DWORD /d 0 /f
reg add "$regkey" /v bAllowUserToChangeMsgPrefs /t REG_DWORD /d 0 /f
# open it, make it DEFAULT

google chrome

choco install googlechrome --ignore-checksums
choco install ublockorigin-chrome google-translate-chrome
# open it, make DEFAULT

winget

winget install -e --id Google.Chrome

Xnview

choco install xnviewmp.install
# run xnviewmp as admin > Tools > Settings > Integration : Enable Browse with XnViewMP

Connect server

create the batch file

$desktop = ([Environment]::GetFolderPath('Desktop'))
$null >> "$desktop\connect-server.bat"
notepad "$desktop\connect-server.bat"

file content

net use n: /delete
net use /persistent:yes
net use N: \\server\share password /user:domain\username /savecred

office

winget

winget install --id=Microsoft.Office

Volume 2021

Standard

$s="microsoft-office-deployment"
$p="/64bit /DisableUpdate /Language:MatchOS,en-us,zh-tw,zh-cn"
$p+=" /Product:Standard2021Volume"
choco install $s --params="$p" ; choco pin add -n $s
#

Everything

if ([System.Environment]::Is64BitOperatingSystem) {$bit="64"} else {$bit="32"}
$s="microsoft-office-deployment"
$p=" /${bit}bit /DisableUpdate /Language:MatchOS,en-us,zh-tw,zh-cn"
$p+=" /Product:ProPlus2021Volume,VisioPro2021Volume,ProjectPro2021Volume"
choco install $s --params="$p" ; choco pin add -n $s
#

Volume 2019

office 2016 (Win7)

choco install microsoft-office-deployment --params="/64bit /Product:HomeBusiness2016Retail"
OfficeProPlus2013
office365-2016-deployment-tool
libreoffice-fresh

ms office utilities

other office apps

choco install inkscape
choco install gimp
choco install drawio

ms store software

Antivirus

Symantec SEP 64 and 32

mkdir -force c:\drv ; cd c:\drv
if ([System.Environment]::Is64BitOperatingSystem) {$bit="64"} else {$bit="32"}
$lang = switch -Wildcard ((Get-WinUserLanguageList)[0].LanguageTag)
  {"zh-Hans*" {'CS'}; "zh-Hant*" {'CH'}; default {'EN'}}
$url="https://repo.sxl.net/proj/antivirus/SEP_14.3.0_RU4_Win$bit-bit_Client_$lang.exe"
curl.exe -L -o "SEP.exe" "$url"
.\SEP.exe /s /v"SYMREBOOT=ReallySuppress /qb"
# reboot

Uninstall

winget uninstall "Symantec Endpoint Protection"

Other antivirus

Backups

Veeam agent

choco install veeam-agent

Enable File History

Activation

Server

Virtio

choco install virtio-drivers

Server 2016/2019 Windows Defender

Enable Windows Defender GUI

Install-WindowsFeature -Name Windows-Defender
Install-WindowsFeature -Name Windows-Defender-GUI

Disable Windows Defender GUI

Uninstall-WindowsFeature -Name Windows-Defender-GUI
Uninstall-WindowsFeature -Name Windows-Defender

Other software

admin

create local admin

net user /add adminsxl sxlSuper@123 ; localgroup administrators adminsxl /add

Conemu

choco install conemu

Notepad++

choco install notepadplusplus.install
regsvr32 "C:\Program Files\Notepad++\contextMenu\NppShell.dll"
choco install notepadreplacer --params "/NOTEPAD:C:\Program Files\Notepad++\notepad++.exe"
choco install notepadplusplus-npppluginmanager

hwinfo

choco install hwinfo
nircmd shortcut "%ProgramFiles%\HWiNFO64\HWiNFO64.EXE" "~$folder.desktop$" "HWINFO"

Gsmartcontrol

choco install gsmartcontrol
nircmd shortcut "%ProgramFiles%\GSmartControl\gsmartcontrol.exe" "~$folder.desktop$" "GSmartControl"

Acronis drive monitor

choco install acronis-drive-monitor

* Option Alerts Email notification > Change settings > systems@sxl.net

utils

Internet Download Manager IDM

choco install internet-download-manager
irm https://massgrave.dev/ias | iex

misc

locale-emulator #app locale
firefox
choco install 
hwinfo.install
autoruns
autologon
bleacbit.portable
sidebar-diagnostics

java

choco install Temurin8 --params="/both /ADDLOCAL=FeatureMain,FeatureEnvironment,FeatureJarFileRunWith, FeatureJavaHome,FeatureIcedTeaWeb,FeatureJNLPFileRunWith
 /INSTALLDIR=$env:Programfiles\Eclipse Adoptium\ /quiet"

python

choco install python312

cad

choco install autodesk-fusion360
choco install meshmixer
choco install cura
choco install dwgtrueview designreview
choco install autocad
choco install wecom #企业微信

drivers / platform specific

KVM

choco install virtio-drivers; choco pin add -n virtio-drivers
choco install qemu-guest-agent
choco install vmware-tools
choco install virtualbox-guest-additions-guest.install
choco install lenovo-thinkvantage-system-update
choco install sdio  #download index only > select all > install