This is an old revision of the document!
Install Windows
- Win10 update assistant https://is.gd/OK28yz
- Win11 update assistant https://is.gd/nLSnJd
OOBE
- Home edition bypass ms account > Shift-F10 >
OOBE\BYPASSNRO
- uninstall bloatware
start appwiz.cpl
- rename computer, join domain, turn on system protection
start sysdm.cpl
- create local admin Owner
net user /add Owner ; net localgroup administrators Owner /add
orcontrol userpasswords2
orcontrol userpasswords
- restart computer
shutdown /r /t 0
- windows update
control update
- language & regional settings
- date/time:
start timedate.cpl
- Network properties:
start ncpa.cpl
- Printers:
control printers
- user management
control userpasswords2
orcontrol userpasswords
- 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
- PS policy
Set-ExecutionPolicy RemoteSigned -Force
- HK CT
irm repo.sxl.net/bin/set-lang-hkct.ps1 | iex
- HK EN
irm repo.sxl.net/bin/set-lang-hken.ps1 | iex
- HK EN+CT
irm repo.sxl.net/bin/set-lang-hkenct.ps1 | iex
- CN
irm repo.sxl.net/bin/set-lang-cn.ps1 | iex
- JP
irm repo.sxl.net/bin/set-lang-jp.ps1 | iex
- US
irm repo.sxl.net/bin/set-lang-us.ps1 | iex
- Manually set timezone if not in HK
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 #
- upgrade all:
winget upgrade –all –silent
- chocolatey:
winget install Chocolatey.Chocolatey
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
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
- QuickSupport
$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
- Full:
choco install teamviewer
or Hostchoco install teamviewer.host
- (Gear) ⚙️ > General
- Start TV with Windows > enable
- Your display name > change
- Incoming LAN connections > Accept
- Assign to account > dxxxx@sxl.net
- (Gear) ⚙️ > Advanced
- Automatically minimize local TeamViewer Panel
- Full access control when a partner is connecting to the Windows logon screen
- Personal Password
whoSxxxx@xxx
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 file-converter choco install pasteintofile ; PasteIntoFile /filename yyyyMMdd-HHmmss # choco install peazip.install # open, set assoc > standard, set lang choco install vlc choco install xnviewmp.install #
adobe reader
choco install adobereader --params '"/DesktopIcon"' $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
- set as default
- enable extensions
choco install googlechrome --ignore-checksums choco install ublockorigin-chrome google-translate-chrome # open it, make DEFAULT
winget
winget install -e --id Google.Chrome
Xnview
- not for commercial use
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
- Online C2R setup: https://massgrave.dev/office_c2r_links.html
- o365 business
choco install office365business ; choco pin add -n office365business
- o386 proplus
choco install office365proplus ; choco pin add -n office365proplus
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
- visioviewer
choco install visioviewer
- Standard
choco install microsoft-office-deployment –params="/64bit /Product:Standard2019Volume"
- Visio 2019 Volume
choco install microsoft-office-deployment –params="/64bit /Product:VisioPro2019Volume"
- Project 2019 Volume:
choco install microsoft-office-deployment –params="/64bit /Product:ProjectPro2019Volume"
- Retail office H&B
choco install microsoft-office-deployment –params="/64bit /Product:HomeBusiness2019Retail"
office 2016 (Win7)
choco install microsoft-office-deployment --params="/64bit /Product:HomeBusiness2016Retail" OfficeProPlus2013 office365-2016-deployment-tool libreoffice-fresh
ms office utilities
- removal
cd c:\drv ; curl.exe -o un_office.exe -L https://aka.ms/diag_officeuninstall ; .\un_office.exe
- activation
irm https://massgrave.dev/get | iex''
other office apps
- inkscape
choco install inkscape
- gimp
choco install gimp
- draw.io
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
- NOD32 - https://www.eset.hk/
- Clamwin for Win98-XP - http://clamsentinel.sourceforge.net/
choco install clamwin
- MS Security Essentials (Win vista-7) - https://bit.ly/3iXkoA0
choco install MicrosoftSecurityEssentials
Backups
- veeam -
choco install veeam-agent
- Iperius - https://www.iperiusbackup.com/
choco install
- Cobian - https://www.cobiansoft.com/
choco install cobian-backup
- Duplicati - https://www.duplicati.com/ duplicati
Activation
- interactive mode
irm https://massgrave.dev/get | iex
- activate win only
& ([ScriptBlock]::Create((irm https://massgrave.dev/get))) /HWID
- active office only
& ([ScriptBlock]::Create((irm https://massgrave.dev/get))) /Ohook
Other software
admin
- 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
- open Plugins > Plugin Admin, add MarkdownViewer++ AutoCodePage AutoEolFormat
utils
- IDM
choco install internet-download-manager
thenirm https://massgrave.dev/ias | iex
- App locale
choco install locale-emulator
- Firefox
choco install firefox
- misc
choco install hwinfo.install autoruns autologon bleacbit.portable
java
- java
choco install javaruntime
- java8
choco install temurin8
- java8 with Java WebStart
choco install Temurin8 --params="/both /ADDLOCAL=FeatureMain,FeatureEnvironment,FeatureJarFileRunWith, FeatureJavaHome,FeatureIcedTeaWeb,FeatureJNLPFileRunWith /INSTALLDIR=$env:Programfiles\Eclipse Adoptium\ /quiet"
- jdk13
choco install adoptopenjdk13
python
- latest
choco install python312
cad
choco install autodesk-fusion360
choco install meshmixer
choco install cura
choco install dwgtrueview designreview
choco install autocad
popular
- 企业微信
wecom
drivers / platform specific
KVM
choco install virtio-drivers; choco pin add -n virtio-drivers choco install qemu-guest-agent
- Vmware
choco install vmware-tools
- Virtualbox
choco install virtualbox-guest-additions-guest.install
- Lenovo
choco install lenovo-thinkvantage-system-update
- SDIO (Snappy Driver Installer Origin)
choco install sdio
> download index only > select all > install