v1.5.0 - Early Summer Update

Main Kit
* `mount-all-volumes` will now recognize LVM and RAID volumes
* Local sources supported by "User Data Transfer.cmd"
* Ticket numbers are now optional _(enabled/disabled via main.py)_
  * If disabled some sections will ask for a "search" prefix instead
  * If disabled some sections will use date/time instead
* AV check added to System Checklist and Diagnostics
* Adjusted the summary order in System Checklist and Diagnostics
* Reworked OS detection
  * Insider Previews are now properly detected
  * Windows 10 1803/April Update is now recognized
  * CurrentBuild number is displayed for unrecognized builds
  * Codenames are displayed for all recognized builds
* Bumped tool versions
  * Current Intel RST is now 16.0
* Moved SafeMode scripts to the Misc folder
* General bugfixes, including:
  * "Copy WizardKit.cmd"
  * "Build Kit.cmd"
  * "Enter SafeMode.cmd"
  * "Exit SafeMode.cmd"
  * Several scripts will now show a file/program missing error instead of crashing

Linux
* Deprecated `inxi` and will be removed in a future build.
* Added new `hw-drive-info` script to replace `inxi` command
* Added new `hw-info` script to replace `inxi` command
* Added several graphical viewers for file browsing (archives, images, PDfs, etc)
* Trimmed image size by removing unnecessary packages _(mostly dialup/networking packages)_
* `build-ufd` logs are now saved in the current user's $HOME/Logs folder
* `build-ufd` names UFDs as "${KIT_NAME_SHORT}_UFD" _(e.g. WK_UFD)_
* General bugfixes

WinPE
* Added VirtIO drivers
* Local sources are working again for Windows installs
* WinPE.log is now copied to new Windows installations
* General bugfixes, including:
  * "Build PE.cmd"
This commit is contained in:
2Shirt 2018-05-25 14:28:48 -06:00
commit 38934027a4
38 changed files with 909 additions and 353 deletions

View file

@ -67,7 +67,7 @@ start "" /wait "%fastcopy%" %fastcopy_args% %_sources% /to="%dest%\.bin\"
echo Copying .cbin... echo Copying .cbin...
mkdir "%dest%\.cbin" >nul 2>&1 mkdir "%dest%\.cbin" >nul 2>&1
attrib +h "%dest%\.cbin" attrib +h "%dest%\.cbin"
start "" /wait "%fastcopy%" %fastcopy_args% %cbin%\* /to="%dest%\.cbin\" start "" /wait "%fastcopy%" %fastcopy_args% "%cbin%"\* /to="%dest%\.cbin\"
:CopyMainData :CopyMainData
echo Copying Main Kit... echo Copying Main Kit...
@ -149,4 +149,4 @@ goto Exit
:: Cleanup and exit :: :: Cleanup and exit ::
:Exit :Exit
endlocal endlocal
exit /b %errorlevel% exit /b %errorlevel%

View file

@ -29,7 +29,7 @@ if __name__ == '__main__':
activation_methods = [ activation_methods = [
{'Name': 'Activate with BIOS key', 'Function': activate_with_bios}, {'Name': 'Activate with BIOS key', 'Function': activate_with_bios},
] ]
if global_vars['OS']['Version'] not in ['8', '10']: if global_vars['OS']['Version'] not in ('8', '8.1', '10'):
activation_methods[0]['Disabled'] = True activation_methods[0]['Disabled'] = True
actions = [ actions = [
{'Name': 'Quit', 'Letter': 'Q'}, {'Name': 'Quit', 'Letter': 'Q'},

View file

@ -436,13 +436,15 @@ function ask() {
# VARIABLES # VARIABLES
DEST_DEV="${arg_u}" DEST_DEV="${arg_u}"
DEST_PAR="${DEST_DEV}1" DEST_PAR="${DEST_DEV}1"
LOG_FILE="${HOME}/build-ufd_${DEST_DEV##*/}_$(date +%Y-%m-%d_%H%M_%z).log" LOG_FILE="$(getent passwd "$SUDO_USER" | cut -d: -f6)/Logs/build-ufd_${DEST_DEV##*/}_$(date +%Y-%m-%d_%H%M_%z).log"
MAIN_PY="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/settings/main.py" MAIN_PY="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/settings/main.py"
RSYNC_ARGS="-hrtuvS --modify-window=1 --progress" RSYNC_ARGS="-hrtuvS --modify-window=1 --progress"
MAIN_KIT="$(realpath "${arg_m:-}" 2>/dev/null || true)" MAIN_KIT="$(realpath "${arg_m:-}" 2>/dev/null || true)"
LINUX_ISO="$(realpath "${arg_l:-}" 2>/dev/null || true)" LINUX_ISO="$(realpath "${arg_l:-}" 2>/dev/null || true)"
WINPE_ISO="$(realpath "${arg_w:-}" 2>/dev/null || true)" WINPE_ISO="$(realpath "${arg_w:-}" 2>/dev/null || true)"
EXTRA_DIR="$(realpath "${arg_e:-}" 2>/dev/null || true)" EXTRA_DIR="$(realpath "${arg_e:-}" 2>/dev/null || true)"
mkdir -p "$(dirname "$LOG_FILE")"
chown "$SUDO_USER:$SUDO_USER" -R "$(dirname "$LOG_FILE")"
# COLORS # COLORS
CLEAR="\e[0m" CLEAR="\e[0m"
@ -467,7 +469,8 @@ if [ -z ${KIT_NAME_FULL+x} ]; then
echo -e "${RED}ERROR${CLEAR}: failed to load settings from ${MAIN_PY}" echo -e "${RED}ERROR${CLEAR}: failed to load settings from ${MAIN_PY}"
abort abort
fi fi
UFD_LABEL="${KIT_NAME_SHORT}_LINUX" ISO_LABEL="${KIT_NAME_SHORT}_LINUX"
UFD_LABEL="${KIT_NAME_SHORT}_UFD"
# Check if root # Check if root
if [[ "$EUID" -ne 0 ]]; then if [[ "$EUID" -ne 0 ]]; then
@ -553,6 +556,8 @@ mount "${WINPE_ISO}" /mnt/WinPE -r >> "${LOG_FILE}" 2>&1
# Copy files # Copy files
echo "Copying Linux files..." echo "Copying Linux files..."
rsync ${RSYNC_ARGS} /mnt/Linux/* /mnt/Dest/ >> "${LOG_FILE}" 2>&1 rsync ${RSYNC_ARGS} /mnt/Linux/* /mnt/Dest/ >> "${LOG_FILE}" 2>&1
sed -i "s/${ISO_LABEL}/${UFD_LABEL}/" /mnt/Dest/EFI/boot/refind.conf
sed -i "s/${ISO_LABEL}/${UFD_LABEL}/" /mnt/Dest/arch/boot/syslinux/*cfg
echo "Copying WinPE files..." echo "Copying WinPE files..."
rsync ${RSYNC_ARGS} /mnt/WinPE/{Boot,bootmgr{,.efi},en-us,sources} /mnt/Dest/ >> "${LOG_FILE}" 2>&1 rsync ${RSYNC_ARGS} /mnt/WinPE/{Boot,bootmgr{,.efi},en-us,sources} /mnt/Dest/ >> "${LOG_FILE}" 2>&1
@ -590,7 +595,7 @@ sync
echo "Hiding boot files..." echo "Hiding boot files..."
echo "drive s: file=\"${DEST_PAR}\"" > /root/.mtoolsrc echo "drive s: file=\"${DEST_PAR}\"" > /root/.mtoolsrc
echo 'mtools_skip_check=1' >> /root/.mtoolsrc echo 'mtools_skip_check=1' >> /root/.mtoolsrc
for item in boot{,mgr,mgr.efi} efi en-us images isolinux sources "${KIT_NAME_FULL}"/{.bin,.cbin}; do for item in arch Boot bootmgr{,.efi} EFI en-us images isolinux sources "${KIT_NAME_FULL}"/{.bin,.cbin}; do
yes | mattrib +h "S:/${item}" >> "${LOG_FILE}" 2>&1 || true yes | mattrib +h "S:/${item}" >> "${LOG_FILE}" 2>&1 || true
done done
sync sync

View file

@ -34,7 +34,7 @@ function DownloadFile ($Path, $Name, $Url) {
} }
catch { catch {
Write-Host (" ERROR: Failed to download file." ) -ForegroundColor "Red" Write-Host (" ERROR: Failed to download file." ) -ForegroundColor "Red"
$DownloadErrors += 1 $global:DownloadErrors += 1
} }
} }
function FindDynamicUrl ($SourcePage, $RegEx) { function FindDynamicUrl ($SourcePage, $RegEx) {
@ -78,11 +78,11 @@ if ($MyInvocation.InvocationName -ne ".") {
$Path = $Temp $Path = $Temp
# 7-Zip # 7-Zip
DownloadFile -Path $Path -Name "7z-installer.msi" -Url "http://www.7-zip.org/a/7z1801.msi" DownloadFile -Path $Path -Name "7z-installer.msi" -Url "https://www.7-zip.org/a/7z1805.msi"
DownloadFile -Path $Path -Name "7z-extra.7z" -Url "http://www.7-zip.org/a/7z1801-extra.7z" DownloadFile -Path $Path -Name "7z-extra.7z" -Url "https://www.7-zip.org/a/7z1805-extra.7z"
# ConEmu # ConEmu
$Url = "https://github.com/Maximus5/ConEmu/releases/download/v18.02.06/ConEmuPack.180206.7z" $Url = "https://github.com/Maximus5/ConEmu/releases/download/v18.05.06/ConEmuPack.180506.7z"
DownloadFile -Path $Path -Name "ConEmuPack.7z" -Url $Url DownloadFile -Path $Path -Name "ConEmuPack.7z" -Url $Url
# Notepad++ # Notepad++
@ -90,9 +90,9 @@ if ($MyInvocation.InvocationName -ne ".") {
DownloadFile -Path $Path -Name "npp.7z" -Url $Url DownloadFile -Path $Path -Name "npp.7z" -Url $Url
# Python # Python
$Url = "https://www.python.org/ftp/python/3.6.4/python-3.6.4-embed-win32.zip" $Url = "https://www.python.org/ftp/python/3.6.5/python-3.6.5-embed-win32.zip"
DownloadFile -Path $Path -Name "python32.zip" -Url $Url DownloadFile -Path $Path -Name "python32.zip" -Url $Url
$Url = "https://www.python.org/ftp/python/3.6.4/python-3.6.4-embed-amd64.zip" $Url = "https://www.python.org/ftp/python/3.6.5/python-3.6.5-embed-amd64.zip"
DownloadFile -Path $Path -Name "python64.zip" -Url $Url DownloadFile -Path $Path -Name "python64.zip" -Url $Url
# Python: psutil # Python: psutil

View file

@ -70,7 +70,7 @@ function DownloadFile ($Path, $Name, $Url) {
} }
catch { catch {
Write-Host (" ERROR: Failed to download file." ) -ForegroundColor "Red" Write-Host (" ERROR: Failed to download file." ) -ForegroundColor "Red"
$DownloadErrors += 1 $global:DownloadErrors += 1
} }
} }
function FindDynamicUrl ($SourcePage, $RegEx) { function FindDynamicUrl ($SourcePage, $RegEx) {
@ -130,16 +130,16 @@ if ($MyInvocation.InvocationName -ne ".") {
## Download Tools ## ## Download Tools ##
$ToolSources = @( $ToolSources = @(
# 7-Zip # 7-Zip
@("7z-installer.msi", "http://www.7-zip.org/a/7z1801.msi"), @("7z-installer.msi", "https://www.7-zip.org/a/7z1805.msi"),
@("7z-extra.7z", "http://www.7-zip.org/a/7z1801-extra.7z"), @("7z-extra.7z", "https://www.7-zip.org/a/7z1805-extra.7z"),
# Blue Screen View # Blue Screen View
@("bluescreenview64.zip", "http://www.nirsoft.net/utils/bluescreenview-x64.zip"),
@("bluescreenview32.zip", "http://www.nirsoft.net/utils/bluescreenview.zip"), @("bluescreenview32.zip", "http://www.nirsoft.net/utils/bluescreenview.zip"),
@("bluescreenview64.zip", "http://www.nirsoft.net/utils/bluescreenview-x64.zip"),
# ConEmu # ConEmu
@("ConEmuPack.7z", "https://github.com/Maximus5/ConEmu/releases/download/v18.02.06/ConEmuPack.180206.7z"), @("ConEmuPack.7z", "https://github.com/Maximus5/ConEmu/releases/download/v18.05.06/ConEmuPack.180506.7z"),
# Fast Copy # Fast Copy
@("fastcopy64.zip", "http://ftp.vector.co.jp/69/93/2323/FastCopy341_x64.zip"),
@("fastcopy32.zip", "http://ftp.vector.co.jp/69/93/2323/FastCopy341.zip"), @("fastcopy32.zip", "http://ftp.vector.co.jp/69/93/2323/FastCopy341.zip"),
@("fastcopy64.zip", "http://ftp.vector.co.jp/69/93/2323/FastCopy341_x64.zip"),
# HWiNFO # HWiNFO
@("hwinfo.zip", "http://app.oldfoss.com:81/download/HWiNFO/hwi_582.zip"), @("hwinfo.zip", "http://app.oldfoss.com:81/download/HWiNFO/hwi_582.zip"),
# Killer Network Drivers # Killer Network Drivers
@ -148,19 +148,19 @@ if ($MyInvocation.InvocationName -ne ".") {
("http://www.killernetworking.com"+(FindDynamicUrl "http://www.killernetworking.com/driver-downloads/item/killer-drivers-inf" "Download Killer-Ethernet").replace('&', '&')) ("http://www.killernetworking.com"+(FindDynamicUrl "http://www.killernetworking.com/driver-downloads/item/killer-drivers-inf" "Download Killer-Ethernet").replace('&', '&'))
), ),
# Notepad++ # Notepad++
@("npp_amd64.7z", "https://notepad-plus-plus.org/repository/7.x/7.5.6/npp.7.5.6.bin.minimalist.x64.7z"),
@("npp_x86.7z", "https://notepad-plus-plus.org/repository/7.x/7.5.6/npp.7.5.6.bin.minimalist.7z"), @("npp_x86.7z", "https://notepad-plus-plus.org/repository/7.x/7.5.6/npp.7.5.6.bin.minimalist.7z"),
@("npp_amd64.7z", "https://notepad-plus-plus.org/repository/7.x/7.5.6/npp.7.5.6.bin.minimalist.x64.7z"),
# NT Password Editor # NT Password Editor
@("ntpwed.zip", "http://cdslow.org.ru/files/ntpwedit/ntpwed07.zip"), @("ntpwed.zip", "http://cdslow.org.ru/files/ntpwedit/ntpwed07.zip"),
# Prime95 # Prime95
@("prime95_64.zip", "http://www.mersenne.org/ftp_root/gimps/p95v294b8.win64.zip"),
@("prime95_32.zip", "http://www.mersenne.org/ftp_root/gimps/p95v294b7.win32.zip"), @("prime95_32.zip", "http://www.mersenne.org/ftp_root/gimps/p95v294b7.win32.zip"),
@("prime95_64.zip", "http://www.mersenne.org/ftp_root/gimps/p95v294b8.win64.zip"),
# ProduKey # ProduKey
@("produkey64.zip", "http://www.nirsoft.net/utils/produkey-x64.zip"),
@("produkey32.zip", "http://www.nirsoft.net/utils/produkey.zip"), @("produkey32.zip", "http://www.nirsoft.net/utils/produkey.zip"),
@("produkey64.zip", "http://www.nirsoft.net/utils/produkey-x64.zip"),
# Python # Python
@("python64.zip", "https://www.python.org/ftp/python/3.6.4/python-3.6.4-embed-amd64.zip"), @("python32.zip", "https://www.python.org/ftp/python/3.6.5/python-3.6.5-embed-win32.zip"),
@("python32.zip", "https://www.python.org/ftp/python/3.6.4/python-3.6.4-embed-win32.zip"), @("python64.zip", "https://www.python.org/ftp/python/3.6.5/python-3.6.5-embed-amd64.zip"),
# Python: psutil # Python: psutil
@( @(
"psutil64.whl", "psutil64.whl",
@ -171,14 +171,16 @@ if ($MyInvocation.InvocationName -ne ".") {
(FindDynamicUrl "https://pypi.org/project/psutil/" "href=.*-cp36-cp36m-win32.whl") (FindDynamicUrl "https://pypi.org/project/psutil/" "href=.*-cp36-cp36m-win32.whl")
), ),
# Q-Dir # Q-Dir
@("qdir64.zip", "https://www.softwareok.com/Download/Q-Dir_Portable_x64.zip"),
@("qdir32.zip", "https://www.softwareok.com/Download/Q-Dir_Portable.zip"), @("qdir32.zip", "https://www.softwareok.com/Download/Q-Dir_Portable.zip"),
@("qdir64.zip", "https://www.softwareok.com/Download/Q-Dir_Portable_x64.zip"),
# TestDisk / PhotoRec # TestDisk / PhotoRec
@("testdisk64.zip", "https://www.cgsecurity.org/testdisk-7.1-WIP.win64.zip"),
@("testdisk32.zip", "https://www.cgsecurity.org/testdisk-7.1-WIP.win.zip"), @("testdisk32.zip", "https://www.cgsecurity.org/testdisk-7.1-WIP.win.zip"),
@("testdisk64.zip", "https://www.cgsecurity.org/testdisk-7.1-WIP.win64.zip"),
# VirtIO drivers
@("virtio-win.iso", "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/virtio-win.iso"),
# wimlib-imagex # wimlib-imagex
@("wimlib64.zip", "https://wimlib.net/downloads/wimlib-1.12.0-windows-x86_64-bin.zip"), @("wimlib32.zip", "https://wimlib.net/downloads/wimlib-1.12.0-windows-i686-bin.zip"),
@("wimlib32.zip", "https://wimlib.net/downloads/wimlib-1.12.0-windows-i686-bin.zip") @("wimlib64.zip", "https://wimlib.net/downloads/wimlib-1.12.0-windows-x86_64-bin.zip")
) )
foreach ($Tool in $ToolSources) { foreach ($Tool in $ToolSources) {
DownloadFile -Path $Temp -Name $Tool[0] -Url $Tool[1] DownloadFile -Path $Temp -Name $Tool[0] -Url $Tool[1]
@ -207,8 +209,6 @@ if ($MyInvocation.InvocationName -ne ".") {
"-aoa", "-bso0", "-bse0", "-bsp0", "-aoa", "-bso0", "-bse0", "-bsp0",
"7za.exe", "*.txt") "7za.exe", "*.txt")
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
Remove-Item "$Temp\7z*" -Recurse
$SevenZip = "$Build\bin\x86\7-Zip\7za.exe"
} }
catch { catch {
Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red" Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red"
@ -225,7 +225,6 @@ if ($MyInvocation.InvocationName -ne ".") {
"x", "$Temp\bluescreenview32.zip", "-o$Build\bin\x86\BlueScreenView", "x", "$Temp\bluescreenview32.zip", "-o$Build\bin\x86\BlueScreenView",
"-aoa", "-bso0", "-bse0", "-bsp0") "-aoa", "-bso0", "-bse0", "-bsp0")
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
Remove-Item "$Temp\bluescreenview*"
} }
catch { catch {
Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red" Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red"
@ -248,7 +247,6 @@ if ($MyInvocation.InvocationName -ne ".") {
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
Remove-Item "$Build\bin\x86\ConEmu\ConEmu64.exe" Remove-Item "$Build\bin\x86\ConEmu\ConEmu64.exe"
Remove-Item "$Build\bin\x86\ConEmu\ConEmu64.map" Remove-Item "$Build\bin\x86\ConEmu\ConEmu64.map"
Remove-Item "$Temp\ConEmuPack*"
} }
catch { catch {
Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red" Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red"
@ -267,7 +265,6 @@ if ($MyInvocation.InvocationName -ne ".") {
"-aoa", "-bso0", "-bse0", "-bsp0", "-aoa", "-bso0", "-bse0", "-bsp0",
"-x!setup.exe", "-x!*.dll") "-x!setup.exe", "-x!*.dll")
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
Remove-Item "$Temp\fastcopy*"
} }
catch { catch {
Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red" Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red"
@ -286,7 +283,6 @@ if ($MyInvocation.InvocationName -ne ".") {
"-aoa", "-bso0", "-bse0", "-bsp0", "-aoa", "-bso0", "-bse0", "-bsp0",
"Production\Windows10-x86\Eth\*") "Production\Windows10-x86\Eth\*")
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
Remove-Item "$Temp\killerinf*"
} }
catch { catch {
Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red" Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red"
@ -303,7 +299,6 @@ if ($MyInvocation.InvocationName -ne ".") {
"e", "$Temp\hwinfo.zip", "-o$Build\bin\x86\HWiNFO", "e", "$Temp\hwinfo.zip", "-o$Build\bin\x86\HWiNFO",
"-aoa", "-bso0", "-bse0", "-bsp0", "HWiNFO32.exe") "-aoa", "-bso0", "-bse0", "-bsp0", "HWiNFO32.exe")
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
# Remove-Item "$Temp\hwinfo.zip"
Move-Item "$Build\bin\amd64\HWiNFO\HWiNFO64.exe" "$Build\bin\amd64\HWiNFO\HWiNFO.exe" -Force Move-Item "$Build\bin\amd64\HWiNFO\HWiNFO64.exe" "$Build\bin\amd64\HWiNFO\HWiNFO.exe" -Force
Move-Item "$Build\bin\x86\HWiNFO\HWiNFO32.exe" "$Build\bin\x86\HWiNFO\HWiNFO.exe" -Force Move-Item "$Build\bin\x86\HWiNFO\HWiNFO32.exe" "$Build\bin\x86\HWiNFO\HWiNFO.exe" -Force
} }
@ -322,7 +317,6 @@ if ($MyInvocation.InvocationName -ne ".") {
"x", "$Temp\npp_x86.7z", "-o$Build\bin\x86\NotepadPlusPlus", "x", "$Temp\npp_x86.7z", "-o$Build\bin\x86\NotepadPlusPlus",
"-aoa", "-bso0", "-bse0", "-bsp0") "-aoa", "-bso0", "-bse0", "-bsp0")
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
Remove-Item "$Temp\npp*"
Move-Item "$Build\bin\amd64\NotepadPlusPlus\notepad++.exe" "$Build\bin\amd64\NotepadPlusPlus\notepadplusplus.exe" -Force Move-Item "$Build\bin\amd64\NotepadPlusPlus\notepad++.exe" "$Build\bin\amd64\NotepadPlusPlus\notepadplusplus.exe" -Force
Move-Item "$Build\bin\x86\NotepadPlusPlus\notepad++.exe" "$Build\bin\x86\NotepadPlusPlus\notepadplusplus.exe" -Force Move-Item "$Build\bin\x86\NotepadPlusPlus\notepad++.exe" "$Build\bin\x86\NotepadPlusPlus\notepadplusplus.exe" -Force
} }
@ -344,7 +338,6 @@ if ($MyInvocation.InvocationName -ne ".") {
"-aoa", "-bso0", "-bse0", "-bsp0", "-aoa", "-bso0", "-bse0", "-bsp0",
"ntpwedit.exe", "*.txt") "ntpwedit.exe", "*.txt")
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
Remove-Item "$Temp\ntpwed*"
} }
catch { catch {
Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red" Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red"
@ -369,7 +362,6 @@ if ($MyInvocation.InvocationName -ne ".") {
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
Move-Item "$Build\bin\x86\TestDisk\testdisk-7.1-WIP\*" "$Build\bin\x86\TestDisk" -Force Move-Item "$Build\bin\x86\TestDisk\testdisk-7.1-WIP\*" "$Build\bin\x86\TestDisk" -Force
Remove-Item "$Build\bin\x86\TestDisk\testdisk-7.1-WIP" -Recurse -Force Remove-Item "$Build\bin\x86\TestDisk\testdisk-7.1-WIP" -Recurse -Force
Remove-Item "$Temp\testdisk*"
} }
catch { catch {
Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red" Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red"
@ -386,7 +378,6 @@ if ($MyInvocation.InvocationName -ne ".") {
"x", "$Temp\prime95_32.zip", "-o$Build\bin\x86\Prime95", "x", "$Temp\prime95_32.zip", "-o$Build\bin\x86\Prime95",
"-aoa", "-bso0", "-bse0", "-bsp0") "-aoa", "-bso0", "-bse0", "-bsp0")
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
Remove-Item "$Temp\prime95*"
} }
catch { catch {
Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red" Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red"
@ -402,7 +393,6 @@ if ($MyInvocation.InvocationName -ne ".") {
"x", "$Temp\produkey32.zip", "-o$Build\bin\x86\ProduKey", "x", "$Temp\produkey32.zip", "-o$Build\bin\x86\ProduKey",
"-aoa", "-bso0", "-bse0", "-bsp0") "-aoa", "-bso0", "-bse0", "-bsp0")
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
Remove-Item "$Temp\produkey*"
} }
catch { catch {
Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red" Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red"
@ -441,8 +431,6 @@ if ($MyInvocation.InvocationName -ne ".") {
catch { catch {
Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red" Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red"
} }
Remove-Item "$Temp\python*"
Remove-Item "$Temp\*.whl"
# Q-Dir # Q-Dir
Write-Host "Extracting: Q-Dir" Write-Host "Extracting: Q-Dir"
@ -456,7 +444,24 @@ if ($MyInvocation.InvocationName -ne ".") {
"x", "$Temp\qdir32.zip", "-o$Build\bin\x86", "x", "$Temp\qdir32.zip", "-o$Build\bin\x86",
"-aoa", "-bso0", "-bse0", "-bsp0") "-aoa", "-bso0", "-bse0", "-bsp0")
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
Remove-Item "$Temp\qdir*" }
catch {
Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red"
}
# VirtIO Drivers
Write-Host "Extracting: VirtIO Drivers"
try {
$ArgumentList = @(
"e", "$Temp\virtio-win.iso", "-o$Build\Drivers\amd64\VirtIO",
"-aoa", "-bso0", "-bse0", "-bsp0",
"*\w10\amd64\*")
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
$ArgumentList = @(
"e", "$Temp\virtio-win.iso", "-o$Build\Drivers\x86\VirtIO",
"-aoa", "-bso0", "-bse0", "-bsp0",
"*\w10\x86\*")
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
} }
catch { catch {
Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red" Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red"
@ -472,11 +477,15 @@ if ($MyInvocation.InvocationName -ne ".") {
"x", "$Temp\wimlib32.zip", "-o$Build\bin\x86\wimlib", "x", "$Temp\wimlib32.zip", "-o$Build\bin\x86\wimlib",
"-aoa", "-bso0", "-bse0", "-bsp0") "-aoa", "-bso0", "-bse0", "-bsp0")
Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait Start-Process -FilePath $SevenZip -ArgumentList $ArgumentList -NoNewWindow -Wait
Remove-Item "$Temp\wimlib*"
} }
catch { catch {
Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red" Write-Host (" ERROR: Failed to extract files." ) -ForegroundColor "Red"
} }
## Cleanup ##
if (Ask-User "Delete temp files?") {
Remove-Item "$Temp" -Recurse
}
} }
## Build ## ## Build ##

View file

@ -23,7 +23,7 @@ if __name__ == '__main__':
'GenericRepair': 'Repaired', 'GenericRepair': 'Repaired',
'UnsupportedOSError': 'Unsupported OS', 'UnsupportedOSError': 'Unsupported OS',
}} }}
disabled = bool(global_vars['OS']['Version'] not in ['8', '10']) disabled = bool(global_vars['OS']['Version'] not in ('8', '8.1', '10'))
options = [ options = [
{'Name': 'Check Health', 'Repair': False, 'Disabled': disabled}, {'Name': 'Check Health', 'Repair': False, 'Disabled': disabled},
{'Name': 'Restore Health', 'Repair': True, 'Disabled': disabled}] {'Name': 'Restore Health', 'Repair': True, 'Disabled': disabled}]

View file

@ -1,5 +1,7 @@
# Wizard Kit: Functions - Backup # Wizard Kit: Functions - Backup
import ctypes
from functions.disk import * from functions.disk import *
# Regex # Regex
@ -30,9 +32,41 @@ def backup_partition(disk, par):
def fix_path(path): def fix_path(path):
"""Replace invalid filename characters with underscores.""" """Replace invalid filename characters with underscores."""
return REGEX_BAD_PATH_NAMES.sub('_', path) local_drive = path[1:2] == ':'
new_path = REGEX_BAD_PATH_NAMES.sub('_', path)
if local_drive:
new_path = '{}:{}'.format(new_path[0:1], new_path[2:])
return new_path
def prep_disk_for_backup(destination, disk, ticket_number): def get_volume_display_name(mountpoint):
"""Get display name from volume mountpoint and label, returns str."""
name = mountpoint
try:
kernel32 = ctypes.windll.kernel32
vol_name_buffer = ctypes.create_unicode_buffer(1024)
fs_name_buffer = ctypes.create_unicode_buffer(1024)
serial_number = None
max_component_length = None
file_system_flags = None
vol_info = kernel32.GetVolumeInformationW(
ctypes.c_wchar_p(mountpoint),
vol_name_buffer,
ctypes.sizeof(vol_name_buffer),
serial_number,
max_component_length,
file_system_flags,
fs_name_buffer,
ctypes.sizeof(fs_name_buffer)
)
name = '{} "{}"'.format(name, vol_name_buffer.value)
except:
pass
return name
def prep_disk_for_backup(destination, disk, backup_prefix):
"""Gather details about the disk and its partitions. """Gather details about the disk and its partitions.
This includes partitions that can't be backed up, This includes partitions that can't be backed up,
@ -71,10 +105,10 @@ def prep_disk_for_backup(destination, disk, ticket_number):
par['Image Name'] = par['Name'] if par['Name'] else 'Unknown' par['Image Name'] = par['Name'] if par['Name'] else 'Unknown'
if 'IP' in destination: if 'IP' in destination:
par['Image Path'] = r'\\{}\{}\{}'.format( par['Image Path'] = r'\\{}\{}\{}'.format(
destination['IP'], destination['Share'], ticket_number) destination['IP'], destination['Share'], backup_prefix)
else: else:
par['Image Path'] = r'{}:\{}'.format( par['Image Path'] = r'{}:\{}'.format(
ticket_number, destination['Letter']) destination['Letter'], backup_prefix)
par['Image Path'] += r'\{}_{}.wim'.format( par['Image Path'] += r'\{}_{}.wim'.format(
par['Number'], par['Image Name']) par['Number'], par['Image Name'])
par['Image Path'] = fix_path(par['Image Path']) par['Image Path'] = fix_path(par['Image Path'])
@ -114,7 +148,20 @@ def select_backup_destination(auto_select=True):
actions = [ actions = [
{'Name': 'Main Menu', 'Letter': 'M'}, {'Name': 'Main Menu', 'Letter': 'M'},
] ]
# Add local disks
for d in psutil.disk_partitions():
if re.search(r'^{}'.format(global_vars['Env']['SYSTEMDRIVE']), d.mountpoint, re.IGNORECASE):
# Skip current OS drive
pass
elif 'fixed' in d.opts:
# Skip DVD, etc
destinations.append({
'Name': 'Local Disk - {}'.format(
get_volume_display_name(d.mountpoint)),
'Letter': re.sub(r'^(\w):\\.*$', r'\1', d.mountpoint),
})
# Size check # Size check
for dest in destinations: for dest in destinations:
if 'IP' in dest: if 'IP' in dest:

View file

@ -18,6 +18,7 @@ from subprocess import CalledProcessError
from settings.main import * from settings.main import *
from settings.tools import * from settings.tools import *
from settings.windows_builds import *
# Global variables # Global variables
global_vars = {} global_vars = {}
@ -189,12 +190,17 @@ def extract_item(item, filter='', silent=False):
print_standard('Extracting "{item}"...'.format(item=item)) print_standard('Extracting "{item}"...'.format(item=item))
try: try:
run_program(cmd) run_program(cmd)
except FileNotFoundError:
if not silent:
print_warning('WARNING: Archive not found')
except subprocess.CalledProcessError: except subprocess.CalledProcessError:
if not silent: if not silent:
print_warning('WARNING: Errors encountered while exctracting data') print_warning('WARNING: Errors encountered while exctracting data')
def get_ticket_number(): def get_ticket_number():
"""Get TicketNumber from user, save in LogDir, and return as str.""" """Get TicketNumber from user, save in LogDir, and return as str."""
if not ENABLED_TICKET_NUMBERS:
return None
ticket_number = None ticket_number = None
while ticket_number is None: while ticket_number is None:
_input = input('Enter ticket number: ') _input = input('Enter ticket number: ')
@ -207,6 +213,15 @@ def get_ticket_number():
f.write(ticket_number) f.write(ticket_number)
return ticket_number return ticket_number
def get_simple_string(prompt='Enter string'):
"""Get string from user (only alphanumeric/space chars) and return as str."""
simple_string = None
while simple_string is None:
_input = input('{}: '.format(prompt))
if re.match(r'^(\w|-| )+$', _input, re.ASCII):
simple_string = _input.strip()
return simple_string
def human_readable_size(size, decimals=0): def human_readable_size(size, decimals=0):
"""Convert size in bytes to a human-readable format and return a str.""" """Convert size in bytes to a human-readable format and return a str."""
# Prep string formatting # Prep string formatting
@ -469,7 +484,12 @@ def stay_awake():
def get_exception(s): def get_exception(s):
"""Get exception by name, returns Exception object.""" """Get exception by name, returns Exception object."""
return getattr(sys.modules[__name__], s) try:
obj = getattr(sys.modules[__name__], s)
except AttributeError:
# Try builtin classes
obj = getattr(sys.modules['builtins'], s)
return obj
def try_and_print(message='Trying...', def try_and_print(message='Trying...',
function=None, cs='CS', ns='NS', other_results={}, function=None, cs='CS', ns='NS', other_results={},
@ -620,88 +640,47 @@ def check_os():
tmp[name] = winreg.QueryValueEx(key, name)[0] tmp[name] = winreg.QueryValueEx(key, name)[0]
except FileNotFoundError: except FileNotFoundError:
tmp[name] = 'Unknown' tmp[name] = 'Unknown'
try:
tmp['CurrentBuild'] = int(tmp['CurrentBuild']) # Handle CurrentBuild collision
except ValueError: if tmp['CurrentBuild'] == '9200':
# This should be interesting... if tmp['CurrentVersion'] == '6.2':
tmp['CurrentBuild'] = -1 # Windown 8, set to fake build number
try: tmp['CurrentBuild'] = '9199'
tmp['CurrentVersion'] = float(tmp['CurrentVersion']) else:
except ValueError: # Windows 8.1, leave alone
# This should also be interesting... pass
tmp['CurrentVersion'] = -1
# Check bit depth # Check bit depth
tmp['Arch'] = 32 tmp['Arch'] = 32
if 'PROGRAMFILES(X86)' in global_vars['Env']: if 'PROGRAMFILES(X86)' in global_vars['Env']:
tmp['Arch'] = 64 tmp['Arch'] = 64
# Get Windows build info
build_info = WINDOWS_BUILDS.get(
tmp['CurrentBuild'],
('Unknown', 'Build {}'.format(tmp['CurrentBuild']), None, None, 'unrecognized'))
build_info = list(build_info)
tmp['Version'] = build_info.pop(0)
tmp['Release'] = build_info.pop(0)
tmp['Codename'] = build_info.pop(0)
tmp['Marketing Name'] = build_info.pop(0)
tmp['Notes'] = build_info.pop(0)
# Set name # Set name
tmp['Name'] = tmp['ProductName'] tmp['Name'] = tmp['ProductName']
if tmp['CurrentBuild'] == 7601: if tmp['Release']:
tmp['Name'] += ' SP1' # Win 7 tmp['Name'] += ' {}'.format(tmp['Release'])
if tmp['CurrentBuild'] == 9600: if tmp['Codename']:
tmp['Name'] += ' Update' # Win 8.1u tmp['Name'] += ' "{}"'.format(tmp['Codename'])
if tmp['CurrentBuild'] == 10240: if tmp['Marketing Name']:
tmp['Name'] += ' Release 1507 "Threshold 1"' tmp['Name'] += ' / "{}"'.format(tmp['Marketing Name'])
if tmp['CurrentBuild'] == 10586:
tmp['Name'] += ' Release 1511 "Threshold 2"'
if tmp['CurrentBuild'] == 14393:
tmp['Name'] += ' Release 1607 "Redstone 1" / "Anniversary Update"'
if tmp['CurrentBuild'] == 15063:
tmp['Name'] += ' Release 1703 "Redstone 2" / "Creators Update"'
if tmp['CurrentBuild'] == 16299:
tmp['Name'] += ' Release 1709 "Redstone 3" / "Fall Creators Update"'
tmp['Name'] = re.sub(r'\s+', ' ', tmp['Name']) tmp['Name'] = re.sub(r'\s+', ' ', tmp['Name'])
# Set display name # Set display name
tmp['DisplayName'] = '{} x{}'.format(tmp['Name'], tmp['Arch']) tmp['DisplayName'] = '{} x{}'.format(tmp['Name'], tmp['Arch'])
if tmp['CurrentBuild'] in [7600, 9200, 10240, 10586]: if tmp['Notes']:
tmp['DisplayName'] += ' (very outdated)' tmp['DisplayName'] += ' ({})'.format(tmp['Notes'])
elif tmp['CurrentBuild'] in [7601, 9600, 14393, 15063]:
tmp['DisplayName'] += ' (outdated)'
elif tmp['CurrentBuild'] == 16299:
pass # Current Win10 release
else:
tmp['DisplayName'] += ' (unrecognized)'
# Set version
if tmp['CurrentVersion'] == 6.0:
tmp['Version'] = 'Vista'
elif tmp['CurrentVersion'] == 6.1:
tmp['Version'] = '7'
elif 6.2 <= tmp['CurrentVersion'] <= 6.3:
if tmp['CurrentBuild'] <= 9600:
tmp['Version'] = '8'
elif tmp['CurrentBuild'] >= 10240:
tmp['Version'] = '10'
else:
tmp['Version'] = 'Unknown'
# == vista ==
# 6.0.6000
# 6.0.6001 # SP1
# 6.0.6002 # SP2
# ==== 7 ====
# 6.1.7600
# 6.1.7601 # SP1
# 6.1.7602 # Umm.. where'd this come from?
# ==== 8 ====
# 6.2.9200
# === 8.1 ===
# 6.3.9200
# === 8.1u ==
# 6.3.9600
# === 10 v1507 "Threshold 1" ==
# 6.3.10240
# === 10 v1511 "Threshold 2" ==
# 6.3.10586
# === 10 v1607 "Redstone 1" "Anniversary Update" ==
# 6.3.14393
# === 10 v1703 "Redstone 2" "Creators Update" ==
# 6.3.15063
# === 10 v1709 "Redstone 3" "Fall Creators Update" ==
# 6.3.16299
global_vars['OS'] = tmp global_vars['OS'] = tmp
def check_tools(): def check_tools():

View file

@ -16,6 +16,9 @@ class LocalDisk():
def is_dir(self): def is_dir(self):
# Should always be true # Should always be true
return True return True
def is_file(self):
# Should always be false
return False
class SourceItem(): class SourceItem():
def __init__(self, name, path): def __init__(self, name, path):
@ -167,93 +170,106 @@ def is_valid_wim_file(item):
print_log('WARNING: Image "{}" damaged.'.format(item.name)) print_log('WARNING: Image "{}" damaged.'.format(item.name))
return valid return valid
def get_mounted_data(): def get_mounted_volumes():
"""Get mounted volumes, returns dict.""" """Get mounted volumes, returns dict."""
cmd = [ cmd = [
'findmnt', '-J', '-b', '-i', 'findmnt', '-J', '-b', '-i',
't', ( '-t', (
'autofs,binfmt_misc,cgroup,cgroup2,configfs,debugfs,devpts,devtmpfs,' 'autofs,binfmt_misc,bpf,cgroup,cgroup2,configfs,debugfs,devpts,devtmpfs,'
'hugetlbfs,mqueue,proc,pstore,securityfs,sysfs,tmpfs' 'hugetlbfs,mqueue,proc,pstore,securityfs,sysfs,tmpfs'
), ),
'-o', 'SOURCE,TARGET,FSTYPE,LABEL,SIZE,AVAIL,USED'] '-o', 'SOURCE,TARGET,FSTYPE,LABEL,SIZE,AVAIL,USED']
result = run_program(cmd) result = run_program(cmd)
json_data = json.loads(result.stdout.decode()) json_data = json.loads(result.stdout.decode())
mounted_data = [] mounted_volumes = []
for item in json_data.get('filesystems', []): for item in json_data.get('filesystems', []):
mounted_data.append(item) mounted_volumes.append(item)
mounted_data.extend(item.get('children', [])) mounted_volumes.extend(item.get('children', []))
return {item['source']: item for item in mounted_data} return {item['source']: item for item in mounted_volumes}
def mount_all_volumes(): def mount_all_volumes():
"""Mount all attached devices with recognized filesystems.""" """Mount all detected filesystems."""
report = [] report = {}
# Get list of block devices # Get list of block devices
cmd = ['lsblk', '-J', '-o', 'NAME,FSTYPE,LABEL,UUID,PARTTYPE,TYPE,SIZE'] cmd = [
'lsblk', '-J', '-p',
'-o', 'NAME,FSTYPE,LABEL,UUID,PARTTYPE,TYPE,SIZE']
result = run_program(cmd) result = run_program(cmd)
json_data = json.loads(result.stdout.decode()) json_data = json.loads(result.stdout.decode())
devs = json_data.get('blockdevices', []) devs = json_data.get('blockdevices', [])
# Get list of mounted devices # Get list of volumes
mounted_data = get_mounted_data() volumes = {}
mounted_list = [m['source'] for m in mounted_data.values()]
# Loop over devices
for dev in devs: for dev in devs:
dev_path = '/dev/{}'.format(dev['name'])
if re.search(r'^(loop|sr)', dev['name'], re.IGNORECASE):
# Skip loopback devices and optical media
report.append([dev_path, 'Skipped'])
continue
for child in dev.get('children', []): for child in dev.get('children', []):
child_path = '/dev/{}'.format(child['name']) volumes.update({child['name']: child})
if child_path in mounted_list: for grandchild in child.get('children', []):
report.append([child_path, 'Already Mounted']) volumes.update({grandchild['name']: grandchild})
else:
try: # Get list of mounted volumes
run_program(['udevil', 'mount', '-o', 'ro', child_path]) mounted_volumes = get_mounted_volumes()
report.append([child_path, 'CS'])
except subprocess.CalledProcessError:
report.append([child_path, 'NS'])
# Update list of mounted devices # Loop over volumes
mounted_data = get_mounted_data() for vol_path, vol_data in volumes.items():
mounted_list = [m['source'] for m in mounted_data.values()] vol_data['show_data'] = {
'message': vol_path.replace('/dev/mapper/', ''),
# Update report lines for show_data() 'data': None,
for line in report: }
_path = line[0] if re.search(r'^loop\d', vol_path, re.IGNORECASE):
_result = line[1] # Skip loopback devices
info = {'message': '{}:'.format(_path)} vol_data['show_data']['data'] = 'Skipped'
if _path in mounted_list: vol_data['show_data']['warning'] = True
info['data'] = 'Mounted on {}'.format( report[vol_path] = vol_data
mounted_data[_path]['target']) elif 'children' in vol_data:
info['data'] = '{:40} ({} used, {} free)'.format( # Skip LVM/RAID partitions (the real volume is mounted separately)
info['data'], vol_data['show_data']['data'] = vol_data.get('fstype', 'UNKNOWN')
human_readable_size(mounted_data[_path]['used']), if vol_data.get('label', None):
human_readable_size(mounted_data[_path]['avail'])) vol_data['show_data']['data'] += ' "{}"'.format(vol_data['label'])
if _result == 'Already Mounted': vol_data['show_data']['info'] = True
info['warning'] = True report[vol_path] = vol_data
elif _result == 'Skipped':
info['data'] = 'Skipped'
info['warning'] = True
else: else:
info['data'] = 'Failed to mount' if vol_path in mounted_volumes:
info['error'] = True vol_data['show_data']['warning'] = True
line.append(info) else:
# Mount volume
try:
run_program(['udevil', 'mount', '-o', 'ro', vol_path])
except subprocess.CalledProcessError:
vol_data['show_data']['data'] = 'Failed to mount'
vol_data['show_data']['error'] = True
# Update mounted_volumes data
mounted_volumes = get_mounted_volumes()
# Format pretty result string
if vol_data['show_data']['data'] != 'Failed to mount':
size_used = human_readable_size(
mounted_volumes[vol_path]['used'])
size_avail = human_readable_size(
mounted_volumes[vol_path]['avail'])
vol_data['show_data']['data'] = 'Mounted on {}'.format(
mounted_volumes[vol_path]['target'])
vol_data['show_data']['data'] = '{:40} ({} used, {} free)'.format(
vol_data['show_data']['data'],
size_used,
size_avail)
# Update report
report[vol_path] = vol_data
return report return report
def mount_backup_shares(read_write=False): def mount_backup_shares(read_write=False):
"""Mount the backup shares unless labeled as already mounted.""" """Mount the backup shares unless labeled as already mounted."""
if psutil.LINUX: if psutil.LINUX:
mounted_data = get_mounted_data() mounted_volumes = get_mounted_volumes()
for server in BACKUP_SERVERS: for server in BACKUP_SERVERS:
if psutil.LINUX: if psutil.LINUX:
# Update mounted status # Update mounted status
source = '//{IP}/{Share}'.format(**server) source = '//{IP}/{Share}'.format(**server)
dest = '/Backups/{Name}'.format(**server) dest = '/Backups/{Name}'.format(**server)
mounted_str = '(Already) Mounted {}'.format(dest) mounted_str = '(Already) Mounted {}'.format(dest)
data = mounted_data.get(source, {}) data = mounted_volumes.get(source, {})
if dest == data.get('target', ''): if dest == data.get('target', ''):
server['Mounted'] = True server['Mounted'] = True
elif psutil.WINDOWS: elif psutil.WINDOWS:
@ -404,7 +420,13 @@ def scan_source(source_obj, dest_path, rel_path='', interactive=True):
root_items = [] root_items = []
item_list = list_source_items(source_obj, rel_path) item_list = list_source_items(source_obj, rel_path)
for item in item_list: for item in item_list:
if REGEX_INCL_ROOT_ITEMS.search(item.name): if REGEX_WINDOWS_OLD.search(item.name):
item.name = '{}{}{}'.format(
rel_path,
os.sep if rel_path else '',
item.name)
win_olds.append(item)
elif REGEX_INCL_ROOT_ITEMS.search(item.name):
print_success('Auto-Selected: {}'.format(item.path)) print_success('Auto-Selected: {}'.format(item.path))
root_items.append('{}'.format(item.path)) root_items.append('{}'.format(item.path))
elif not REGEX_EXCL_ROOT_ITEMS.search(item.name): elif not REGEX_EXCL_ROOT_ITEMS.search(item.name):
@ -424,12 +446,6 @@ def scan_source(source_obj, dest_path, rel_path='', interactive=True):
interactive = False interactive = False
if answer in ['Yes', 'All']: if answer in ['Yes', 'All']:
root_items.append('{}'.format(item.path)) root_items.append('{}'.format(item.path))
if REGEX_WINDOWS_OLD.search(item.name):
item.name = '{}{}{}'.format(
rel_path,
os.sep if rel_path else '',
item.name)
win_olds.append(item)
if root_items: if root_items:
selected_items.append({ selected_items.append({
'Message': '{}{}Root Items...'.format( 'Message': '{}{}Root Items...'.format(
@ -446,7 +462,8 @@ def scan_source(source_obj, dest_path, rel_path='', interactive=True):
rel_path, rel_path,
' ' if rel_path else ''), ' ' if rel_path else ''),
'Items': [font_obj.path], 'Items': [font_obj.path],
'Destination': dest_path}) 'Destination': '{}{}Windows'.format(
dest_path, os.sep)})
# Registry # Registry
registry_items = [] registry_items = []
@ -461,13 +478,14 @@ def scan_source(source_obj, dest_path, rel_path='', interactive=True):
rel_path, rel_path,
' ' if rel_path else ''), ' ' if rel_path else ''),
'Items': registry_items.copy(), 'Items': registry_items.copy(),
'Destination': dest_path}) 'Destination': '{}{}Windows{}System32'.format(
dest_path, os.sep, os.sep)})
# Windows.old(s) # Windows.old(s)
for old in win_olds: for old in win_olds:
selected_items.extend(scan_source( selected_items.extend(scan_source(
source_obj, source_obj,
dest_path, '{}{}{}'.format(dest_path, os.sep, old.name),
rel_path=old.name, rel_path=old.name,
interactive=False)) interactive=False))
@ -529,21 +547,21 @@ def select_destination(folder_path, prompt='Select destination'):
return path return path
def select_source(ticket_number): def select_source(backup_prefix):
"""Select backup from those found on the BACKUP_SERVERS for the ticket.""" """Select backup from those found on the BACKUP_SERVERS matching the prefix."""
selected_source = None selected_source = None
local_sources = [] local_sources = []
remote_sources = [] remote_sources = []
sources = [] sources = []
mount_backup_shares(read_write=False) mount_backup_shares(read_write=False)
# Check for ticket folders on servers # Check for prefix folders on servers
for server in BACKUP_SERVERS: for server in BACKUP_SERVERS:
if server['Mounted']: if server['Mounted']:
print_standard('Scanning {}...'.format(server['Name'])) print_standard('Scanning {}...'.format(server['Name']))
for d in os.scandir(r'\\{IP}\{Share}'.format(**server)): for d in os.scandir(r'\\{IP}\{Share}'.format(**server)):
if (d.is_dir() if (d.is_dir()
and d.name.lower().startswith(ticket_number.lower())): and d.name.lower().startswith(backup_prefix.lower())):
# Add folder to remote_sources # Add folder to remote_sources
remote_sources.append({ remote_sources.append({
'Name': '{:9}| File-Based: [DIR] {}'.format( 'Name': '{:9}| File-Based: [DIR] {}'.format(
@ -553,19 +571,19 @@ def select_source(ticket_number):
'Source': d}) 'Source': d})
# Check for images and subfolders # Check for images and subfolders
for ticket_path in remote_sources.copy(): for prefix_path in remote_sources.copy():
for item in os.scandir(ticket_path['Source'].path): for item in os.scandir(prefix_path['Source'].path):
if item.is_dir(): if item.is_dir():
# Add folder to remote_sources # Add folder to remote_sources
remote_sources.append({ remote_sources.append({
'Name': r'{:9}| File-Based: [DIR] {}\{}'.format( 'Name': r'{:9}| File-Based: [DIR] {}\{}'.format(
ticket_path['Server']['Name'], # Server prefix_path['Server']['Name'], # Server
ticket_path['Source'].name, # Ticket folder prefix_path['Source'].name, # Prefix folder
item.name, # Sub-folder item.name, # Sub-folder
), ),
'Server': ticket_path['Server'], 'Server': prefix_path['Server'],
'Sort': r'{}\{}'.format( 'Sort': r'{}\{}'.format(
ticket_path['Source'].name, # Ticket folder prefix_path['Source'].name, # Prefix folder
item.name, # Sub-folder item.name, # Sub-folder
), ),
'Source': item}) 'Source': item})
@ -581,15 +599,15 @@ def select_source(ticket_number):
remote_sources.append({ remote_sources.append({
'Disabled': bool(not is_valid_wim_file(subitem)), 'Disabled': bool(not is_valid_wim_file(subitem)),
'Name': r'{:9}| Image-Based: {:>7} {}\{}\{}'.format( 'Name': r'{:9}| Image-Based: {:>7} {}\{}\{}'.format(
ticket_path['Server']['Name'], # Server prefix_path['Server']['Name'], # Server
size, # Size (duh) size, # Size (duh)
ticket_path['Source'].name, # Ticket folder prefix_path['Source'].name, # Prefix folder
item.name, # Sub-folder item.name, # Sub-folder
subitem.name, # Image file subitem.name, # Image file
), ),
'Server': ticket_path['Server'], 'Server': prefix_path['Server'],
'Sort': r'{}\{}\{}'.format( 'Sort': r'{}\{}\{}'.format(
ticket_path['Source'].name, # Ticket folder prefix_path['Source'].name, # Prefix folder
item.name, # Sub-folder item.name, # Sub-folder
subitem.name, # Image file subitem.name, # Image file
), ),
@ -603,14 +621,14 @@ def select_source(ticket_number):
remote_sources.append({ remote_sources.append({
'Disabled': bool(not is_valid_wim_file(item)), 'Disabled': bool(not is_valid_wim_file(item)),
'Name': r'{:9}| Image-Based: {:>7} {}\{}'.format( 'Name': r'{:9}| Image-Based: {:>7} {}\{}'.format(
ticket_path['Server']['Name'], # Server prefix_path['Server']['Name'], # Server
size, # Size (duh) size, # Size (duh)
ticket_path['Source'].name, # Ticket folder prefix_path['Source'].name, # Prefix folder
item.name, # Image file item.name, # Image file
), ),
'Server': ticket_path['Server'], 'Server': prefix_path['Server'],
'Sort': r'{}\{}'.format( 'Sort': r'{}\{}'.format(
ticket_path['Source'].name, # Ticket folder prefix_path['Source'].name, # Prefix folder
item.name, # Image file item.name, # Image file
), ),
'Source': item}) 'Source': item})
@ -630,6 +648,31 @@ def select_source(ticket_number):
' Local', d.mountpoint), ' Local', d.mountpoint),
'Sort': d.mountpoint, 'Sort': d.mountpoint,
'Source': LocalDisk(d)}) 'Source': LocalDisk(d)})
# Check for images and subfolders
for item in os.scandir(d.mountpoint):
if REGEX_WIM_FILE.search(item.name):
try:
size = human_readable_size(item.stat().st_size)
except Exception:
size = ' ? ?' # unknown
local_sources.append({
'Disabled': bool(not is_valid_wim_file(item)),
'Name': r'{:9}| Image-Based: {:>7} {}{}'.format(
' Local', size, d.mountpoint, item.name),
'Sort': r'{}{}'.format(d.mountpoint, item.name),
'Source': item})
elif REGEX_EXCL_ROOT_ITEMS.search(item.name):
pass
elif REGEX_EXCL_ITEMS.search(item.name):
pass
elif item.is_dir():
# Add folder to local_sources
local_sources.append({
'Name': r'{:9}| File-Based: [DIR] {}{}'.format(
' Local', d.mountpoint, item.name),
'Sort': r'{}{}'.format(d.mountpoint, item.name),
'Source': item})
set_thread_error_mode(silent=False) # Return to normal set_thread_error_mode(silent=False) # Return to normal
# Build Menu # Build Menu
@ -652,8 +695,8 @@ def select_source(ticket_number):
else: else:
selected_source = sources[int(selection)-1]['Source'] selected_source = sources[int(selection)-1]['Source']
else: else:
print_error('ERROR: No backups found for ticket: {}.'.format( print_error('ERROR: No backups found using prefix: {}.'.format(
ticket_number)) backup_prefix))
umount_backup_shares() umount_backup_shares()
pause("Press Enter to exit...") pause("Press Enter to exit...")
exit_script() exit_script()
@ -736,7 +779,7 @@ def transfer_source(source_obj, dest_path, selected_items):
function=run_wimextract, cs='Done', function=run_wimextract, cs='Done',
source=source_obj.path, source=source_obj.path,
items=group['Items'], items=group['Items'],
dest=group['Destination']) dest=dest_path)
else: else:
print_error('ERROR: Unsupported image: {}'.format(source_obj.path)) print_error('ERROR: Unsupported image: {}'.format(source_obj.path))
raise GenericError raise GenericError

View file

@ -125,9 +125,9 @@ def menu_diags(*args):
if diag_modes[int(selection)-1]['Name'] != 'Quick drive test': if diag_modes[int(selection)-1]['Name'] != 'Quick drive test':
# Save log for non-quick tests # Save log for non-quick tests
ticket_number = get_ticket_number() ticket_number = get_ticket_number()
global_vars['LogDir'] = '{}/Tickets/{}'.format( global_vars['LogDir'] = '{}/Logs/{}'.format(
global_vars['Env']['HOME'], global_vars['Env']['HOME'],
ticket_number) ticket_number if ticket_number else global_vars['Date-Time'])
os.makedirs(global_vars['LogDir'], exist_ok=True) os.makedirs(global_vars['LogDir'], exist_ok=True)
global_vars['LogFile'] = '{}/Hardware Diagnostics.log'.format( global_vars['LogFile'] = '{}/Hardware Diagnostics.log'.format(
global_vars['LogDir']) global_vars['LogDir'])
@ -503,7 +503,7 @@ def run_tests(tests):
# Open log # Open log
if not TESTS['NVMe/SMART']['Quick']: if not TESTS['NVMe/SMART']['Quick']:
try: try:
popen_program(['nohup', 'leafpad', global_vars['LogFile']]) popen_program(['nohup', 'leafpad', global_vars['LogFile']], pipe=True)
except Exception: except Exception:
print_error('ERROR: Failed to open log: {}'.format( print_error('ERROR: Failed to open log: {}'.format(
global_vars['LogFile'])) global_vars['LogFile']))

View file

@ -116,6 +116,36 @@ def get_folder_size(path):
size = human_readable_size(size) size = human_readable_size(size)
return size return size
def get_installed_antivirus():
"""Get list of installed Antivirus programs."""
programs = []
cmd = ['WMIC', r'/namespace:\\root\SecurityCenter2',
'path', 'AntivirusProduct',
'get', 'displayName', '/value']
out = run_program(cmd)
out = out.stdout.decode().strip()
products = out.splitlines()
products = [p.split('=')[1] for p in products if p]
for prod in sorted(products):
# Get product state and check if it's enabled
# credit: https://jdhitsolutions.com/blog/powershell/5187/get-antivirus-product-status-with-powershell/
cmd = ['WMIC', r'/namespace:\\root\SecurityCenter2',
'path', 'AntivirusProduct',
'where', 'displayName="{}"'.format(prod),
'get', 'productState', '/value']
out = run_program(cmd)
out = out.stdout.decode().strip()
state = out.split('=')[1]
state = hex(int(state))
if str(state)[3:5] != '10':
programs.append('[Disabled] {}'.format(prod))
else:
programs.append(prod)
if len(programs) == 0:
programs = ['No programs found']
return programs
def get_installed_office(): def get_installed_office():
"""Get list of installed Office programs.""" """Get list of installed Office programs."""
programs = [] programs = []
@ -419,7 +449,7 @@ def show_os_name():
# Show all 32-bit installs as an error message # Show all 32-bit installs as an error message
print_error(os_name, timestamp=False) print_error(os_name, timestamp=False)
else: else:
if re.search(r'(unrecognized|very outdated)', os_name, re.IGNORECASE): if re.search(r'(preview build|unrecognized|unsupported)', os_name, re.IGNORECASE):
print_error(os_name, timestamp=False) print_error(os_name, timestamp=False)
elif re.search(r'outdated', os_name, re.IGNORECASE): elif re.search(r'outdated', os_name, re.IGNORECASE):
print_warning(os_name, timestamp=False) print_warning(os_name, timestamp=False)

View file

@ -11,7 +11,7 @@ def run_chkdsk(repair=False):
def run_chkdsk_scan(): def run_chkdsk_scan():
"""Run CHKDSK in a "split window" and report errors.""" """Run CHKDSK in a "split window" and report errors."""
if global_vars['OS']['Version'] in ['8', '10']: if global_vars['OS']['Version'] in ('8', '8.1', '10'):
cmd = ['chkdsk', global_vars['Env']['SYSTEMDRIVE'], '/scan', '/perf'] cmd = ['chkdsk', global_vars['Env']['SYSTEMDRIVE'], '/scan', '/perf']
else: else:
cmd = ['chkdsk', global_vars['Env']['SYSTEMDRIVE']] cmd = ['chkdsk', global_vars['Env']['SYSTEMDRIVE']]
@ -44,7 +44,7 @@ def run_chkdsk_offline():
def run_dism(repair=False): def run_dism(repair=False):
"""Run DISM /RestoreHealth, then /CheckHealth, and then report errors.""" """Run DISM /RestoreHealth, then /CheckHealth, and then report errors."""
if global_vars['OS']['Version'] in ['8', '10']: if global_vars['OS']['Version'] in ('8', '8.1', '10'):
if repair: if repair:
# Restore Health # Restore Health
cmd = [ cmd = [

View file

@ -0,0 +1,36 @@
# Wizard Kit: Functions - SafeMode
from functions.common import *
# STATIC VARIABLES
REG_MSISERVER = r'HKLM\SYSTEM\CurrentControlSet\Control\SafeBoot\Network\MSIServer'
def disable_safemode_msi():
"""Disable MSI access under safemode."""
cmd = ['reg', 'delete', REG_MSISERVER, '/f']
run_program(cmd)
def disable_safemode():
"""Edit BCD to remove safeboot value."""
cmd = ['bcdedit', '/deletevalue', '{default}', 'safeboot']
run_program(cmd)
def enable_safemode_msi():
"""Enable MSI access under safemode."""
cmd = ['reg', 'add', REG_MSISERVER, '/f']
run_program(cmd)
cmd = ['reg', 'add', REG_MSISERVER, '/ve',
'/t', 'REG_SZ', '/d', 'Service', '/f']
run_program(cmd)
def enable_safemode():
"""Edit BCD to set safeboot as default."""
cmd = ['bcdedit', '/set', '{default}', 'safeboot', 'network']
run_program(cmd)
def reboot(delay=3):
cmd = ['shutdown', '-r', '-t', '{}'.format(delay)]
run_program(cmd, check=False)
if __name__ == '__main__':
print("This file is not meant to be called directly.")

View file

@ -5,6 +5,12 @@ from functions.common import *
# STATIC VARIABLES # STATIC VARIABLES
HKCU = winreg.HKEY_CURRENT_USER HKCU = winreg.HKEY_CURRENT_USER
HKLM = winreg.HKEY_LOCAL_MACHINE HKLM = winreg.HKEY_LOCAL_MACHINE
OTHER_RESULTS = {
'Error': {
'CalledProcessError': 'Unknown Error',
'FileNotFoundError': 'File not found',
},
'Warning': {}}
SETTINGS_CLASSIC_START = { SETTINGS_CLASSIC_START = {
r'Software\IvoSoft\ClassicShell\Settings': {}, r'Software\IvoSoft\ClassicShell\Settings': {},
r'Software\IvoSoft\ClassicStartMenu': { r'Software\IvoSoft\ClassicStartMenu': {
@ -212,7 +218,7 @@ def install_adobe_reader():
'/msi', '/norestart', '/quiet', '/msi', '/norestart', '/quiet',
'ALLUSERS=1', 'ALLUSERS=1',
'EULA_ACCEPT=YES'] 'EULA_ACCEPT=YES']
try_and_print(message='Adobe Reader DC...', function=run_program, cmd=cmd) run_program(cmd)
def install_chrome_extensions(): def install_chrome_extensions():
"""Update registry to 'install' Google Chrome extensions for all users.""" """Update registry to 'install' Google Chrome extensions for all users."""
@ -220,7 +226,7 @@ def install_chrome_extensions():
def install_classicstart_skin(): def install_classicstart_skin():
"""Extract ClassicStart skin to installation folder.""" """Extract ClassicStart skin to installation folder."""
if global_vars['OS']['Version'] not in ['8', '10']: if global_vars['OS']['Version'] not in ('8', '8.1', '10'):
raise UnsupportedOSError raise UnsupportedOSError
extract_item('ClassicStartSkin', silent=True) extract_item('ClassicStartSkin', silent=True)
source = r'{BinDir}\ClassicStartSkin\Metro-Win10-Black.skin7'.format( source = r'{BinDir}\ClassicStartSkin\Metro-Win10-Black.skin7'.format(
@ -235,17 +241,21 @@ def install_firefox_extensions():
"""Extract Firefox extensions to installation folder.""" """Extract Firefox extensions to installation folder."""
dist_path = r'{PROGRAMFILES}\Mozilla Firefox\distribution\extensions'.format( dist_path = r'{PROGRAMFILES}\Mozilla Firefox\distribution\extensions'.format(
**global_vars['Env']) **global_vars['Env'])
source_path = r'{CBinDir}\FirefoxExtensions.7z'.format(**global_vars)
if not os.path.exists(source_path):
raise FileNotFoundError
# Extract extension(s) to distribution folder # Extract extension(s) to distribution folder
cmd = [ cmd = [
global_vars['Tools']['SevenZip'], 'x', '-aos', '-bso0', '-bse0', global_vars['Tools']['SevenZip'], 'x', '-aos', '-bso0', '-bse0',
'-p{ArchivePassword}'.format(**global_vars), '-p{ArchivePassword}'.format(**global_vars),
'-o{dist_path}'.format(dist_path=dist_path), '-o{dist_path}'.format(dist_path=dist_path),
r'{CBinDir}\FirefoxExtensions.7z'.format(**global_vars)] source_path]
run_program(cmd) run_program(cmd)
def install_ninite_bundle(mse=False): def install_ninite_bundle(mse=False):
"""Run Ninite file(s) based on OS version.""" """Run Ninite file(s) based on OS version."""
if global_vars['OS']['Version'] in ['8', '10']: if global_vars['OS']['Version'] in ('8', '8.1', '10'):
# Modern selection # Modern selection
popen_program(r'{BaseDir}\Installers\Extras\Bundles\Modern.exe'.format( popen_program(r'{BaseDir}\Installers\Extras\Bundles\Modern.exe'.format(
**global_vars)) **global_vars))
@ -262,11 +272,26 @@ def install_vcredists():
"""Install all supported Visual C++ runtimes.""" """Install all supported Visual C++ runtimes."""
extract_item('_vcredists', silent=True) extract_item('_vcredists', silent=True)
prev_dir = os.getcwd() prev_dir = os.getcwd()
os.chdir(r'{BinDir}\_vcredists'.format(**global_vars)) try:
os.chdir(r'{BinDir}\_vcredists'.format(**global_vars))
except FileNotFoundError:
# Ignored since the loop below will report the errors
pass
for vcr in VCR_REDISTS: for vcr in VCR_REDISTS:
try_and_print(message=vcr['Name'], function=run_program, cmd=vcr['Cmd']) try_and_print(message=vcr['Name'], function=run_program,
cmd=vcr['Cmd'], other_results=OTHER_RESULTS)
os.chdir(prev_dir) os.chdir(prev_dir)
# Misc
def open_device_manager():
popen_program(['mmc', 'devmgmt.msc'])
def open_windows_activation():
popen_program(['slui'])
def open_windows_updates():
popen_program(['control', '/name', 'Microsoft.WindowsUpdate'])
if __name__ == '__main__': if __name__ == '__main__':
print("This file is not meant to be called directly.") print("This file is not meant to be called directly.")

View file

@ -50,7 +50,8 @@ def find_windows_image(windows_version):
path = '{}images\{}.{}'.format(d.mountpoint, imagefile, ext) path = '{}images\{}.{}'.format(d.mountpoint, imagefile, ext)
if os.path.isfile(path) and wim_contains_image(path, imagename): if os.path.isfile(path) and wim_contains_image(path, imagename):
image['Path'] = path image['Path'] = path
image['Source'] = d.mountpoint[:1] image['Letter'] = d.mountpoint[:1].upper()
image['Local'] = True
if ext == 'swm': if ext == 'swm':
image['Glob'] = '--ref="{}*.swm"'.format(image['Path'][:-4]) image['Glob'] = '--ref="{}*.swm"'.format(image['Path'][:-4])
break break
@ -68,7 +69,8 @@ def find_windows_image(windows_version):
ext) ext)
if os.path.isfile(path) and wim_contains_image(path, imagename): if os.path.isfile(path) and wim_contains_image(path, imagename):
image['Path'] = path image['Path'] = path
image['Source'] = None image['Letter'] = None
image['Local'] = False
if ext == 'swm': if ext == 'swm':
image['Glob'] = '--ref="{}*.swm"'.format( image['Glob'] = '--ref="{}*.swm"'.format(
image['Path'][:-4]) image['Path'][:-4])

View file

@ -75,11 +75,22 @@ def menu_backup():
}} }}
set_title('{}: Backup Menu'.format(KIT_NAME_FULL)) set_title('{}: Backup Menu'.format(KIT_NAME_FULL))
# Set ticket Number # Set backup prefix
clear_screen() clear_screen()
print_standard('{}\n'.format(global_vars['Title'])) print_standard('{}\n'.format(global_vars['Title']))
ticket_number = get_ticket_number() ticket_number = get_ticket_number()
if ENABLED_TICKET_NUMBERS:
backup_prefix = ticket_number
else:
backup_prefix = get_simple_string(prompt='Enter backup name prefix')
backup_prefix = backup_prefix.replace(' ', '_')
# Assign drive letters
try_and_print(
message = 'Assigning letters...',
function = assign_volume_letters,
other_results = other_results)
# Mount backup shares # Mount backup shares
mount_backup_shares(read_write=True) mount_backup_shares(read_write=True)
@ -87,10 +98,6 @@ def menu_backup():
destination = select_backup_destination(auto_select=False) destination = select_backup_destination(auto_select=False)
# Scan disks # Scan disks
try_and_print(
message = 'Assigning letters...',
function = assign_volume_letters,
other_results = other_results)
result = try_and_print( result = try_and_print(
message = 'Getting disk info...', message = 'Getting disk info...',
function = scan_disks, function = scan_disks,
@ -107,12 +114,13 @@ def menu_backup():
raise GenericAbort raise GenericAbort
# "Prep" disk # "Prep" disk
prep_disk_for_backup(destination, disk, ticket_number) prep_disk_for_backup(destination, disk, backup_prefix)
# Display details for backup task # Display details for backup task
clear_screen() clear_screen()
print_info('Create Backup - Details:\n') print_info('Create Backup - Details:\n')
show_data(message='Ticket:', data=ticket_number) if ENABLED_TICKET_NUMBERS:
show_data(message='Ticket:', data=ticket_number)
show_data( show_data(
message = 'Source:', message = 'Source:',
data = '[{}] ({}) {} {}'.format( data = '[{}] ({}) {} {}'.format(
@ -264,13 +272,14 @@ def menu_setup():
windows_version = select_windows_version() windows_version = select_windows_version()
# Find Windows image # Find Windows image
# NOTE: Reassign volume letters to ensure all devices are scanned
try_and_print(
message = 'Assigning volume letters...',
function = assign_volume_letters,
other_results = other_results)
windows_image = find_windows_image(windows_version) windows_image = find_windows_image(windows_version)
# Scan disks # Scan disks
try_and_print(
message = 'Assigning letters...',
function = assign_volume_letters,
other_results = other_results)
result = try_and_print( result = try_and_print(
message = 'Getting disk info...', message = 'Getting disk info...',
function = scan_disks, function = scan_disks,
@ -292,7 +301,8 @@ def menu_setup():
# Display details for setup task # Display details for setup task
clear_screen() clear_screen()
print_info('Setup Windows - Details:\n') print_info('Setup Windows - Details:\n')
show_data(message='Ticket:', data=ticket_number) if ENABLED_TICKET_NUMBERS:
show_data(message='Ticket:', data=ticket_number)
show_data(message='Installing:', data=windows_version['Name']) show_data(message='Installing:', data=windows_version['Name'])
show_data( show_data(
message = 'Boot Method:', message = 'Boot Method:',
@ -327,10 +337,22 @@ def menu_setup():
raise GenericAbort raise GenericAbort
# Remove volume letters so S, T, & W can be used below # Remove volume letters so S, T, & W can be used below
remove_volume_letters(keep=windows_image['Source']) try_and_print(
new_letter = reassign_volume_letter(letter=windows_image['Source']) message = 'Removing volume letters...',
if new_letter: function = remove_volume_letters,
windows_image['Source'] = new_letter other_results = other_results,
keep=windows_image['Letter'])
# Assign new letter for local source if necessary
if windows_image['Local'] and windows_image['Letter'] in ['S', 'T', 'W']:
new_letter = try_and_print(
message = 'Reassigning source volume letter...',
function = reassign_volume_letter,
other_results = other_results,
letter=windows_image['Letter'])
windows_image['Path'] = '{}{}'.format(
new_letter, windows_image['Path'][1:])
windows_image['Letter'] = new_letter
# Format and partition disk # Format and partition disk
result = try_and_print( result = try_and_print(
@ -369,6 +391,11 @@ def menu_setup():
other_results = other_results, other_results = other_results,
windows_version = windows_version) windows_version = windows_version)
# Copy WinPE log(s)
source = r'{}\Info'.format(global_vars['ClientDir'])
dest = r'W:\{}\Info'.format(KIT_NAME_SHORT)
shutil.copytree(source, dest)
# Print summary # Print summary
print_standard('\nDone.') print_standard('\nDone.')
if 'LogFile' in global_vars and ask('\nReview log?'): if 'LogFile' in global_vars and ask('\nReview log?'):

27
.bin/Scripts/hw-drive-info Executable file
View file

@ -0,0 +1,27 @@
#!/bin/bash
#
BLUE='\033[34m'
CLEAR='\033[0m'
# List devices
IFS=$'\n'
for line in $(lsblk -do NAME,TRAN,SIZE,VENDOR,MODEL,SERIAL); do
if [[ "${line:0:4}" == "NAME" ]]; then
echo -e "${BLUE}${line}${CLEAR}"
else
echo "${line}"
fi
done
echo ""
# List partitions
for line in $(lsblk -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT); do
if [[ "${line:0:4}" == "NAME" ]]; then
echo -e "${BLUE}${line}${CLEAR}"
else
echo "${line}"
fi
done
echo ""

112
.bin/Scripts/hw-info Executable file
View file

@ -0,0 +1,112 @@
#!/bin/bash
#
# COLORS
CLEAR="\e[0m"
RED="\e[31m"
GREEN="\e[32m"
YELLOW="\e[33m"
BLUE="\e[34m"
function print_in_columns() {
string="$1"
label="$(echo "$string" | sed -r 's/^\s*(.*:).*/\1/')"
value="$(echo "$string" | sed -r 's/^\s*.*:\s*(.*)/\1/')"
printf ' %-18s%s\n' "$label" "$value"
}
function print_dmi_value() {
name="$1"
file="/sys/devices/virtual/dmi/id/$2"
value="UNKNOWN"
if [[ -e "$file" ]]; then
value="$(cat "$file")"
fi
print_in_columns "$name: $value"
}
# System
echo -e "${BLUE}System Information${CLEAR}"
print_dmi_value "Vendor" "sys_vendor"
print_dmi_value "Name" "product_name"
print_dmi_value "Serial" "product_serial"
echo ""
# Motherboard
echo -e "${BLUE}Motherboard${CLEAR}"
print_dmi_value "Vendor" "board_vendor"
print_dmi_value "Name" "board_name"
print_dmi_value "Version" "board_version"
print_dmi_value "Serial" "board_serial"
echo ""
# BIOS
echo -e "${BLUE}BIOS${CLEAR}"
print_dmi_value "Vendor" "bios_vendor"
print_dmi_value "Version" "bios_version"
print_dmi_value "Release Date" "bios_date"
echo ""
# Processor
echo -e "${BLUE}Processor${CLEAR}"
lscpu | grep -E '^(Arch|CPU.s.|Core|Thread|Model name|Virt)' \
| sed -r 's/\(s\)(.*:)/s\1 /' \
| sed -r 's/CPUs: /Threads:/' \
| sed -r 's/^(.*:) / \1/'
echo ""
# Memory
echo -e "${BLUE}Memory${CLEAR}"
first_device="True"
while read -r line; do
if [[ "$line" == "Memory Device" ]]; then
if [[ "$first_device" == "True" ]]; then
first_device="False"
else
# Add space between devices
echo ""
fi
else
print_in_columns "$line"
fi
done <<< $(sudo dmidecode -t memory \
| grep -E '^(Memory Device|\s+(Type|Size|Speed|Manuf.*|Locator|Part Number):)')
echo ""
# Graphics
echo -e "${BLUE}Graphics${CLEAR}"
lspci | grep 'VGA' | sed -r 's/^.*:/ Device: /' \
| sed 's/Intel Corporation/Intel/' \
| sed 's/Generation Core Processor Family/Gen/' \
| sed 's/Integrated Graphics Controller.*/iGPU/'
glxinfo 2>/dev/null | grep 'OpenGL renderer' | sed -r 's/^.*:/ OpenGL Renderer: /' \
| sed 's/Mesa DRI //'
echo ""
# Audio
echo -e "${BLUE}Audio${CLEAR}"
while read -r line; do
if [[ "$line" =~ .*no.soundcards.found.* ]]; then
echo " No soundcards found"
else
print_in_columns "$line"
fi
done <<< $(aplay -l 2>&1 | grep -Ei '(^card|no soundcards found)' | sed -r 's/.*\[(.*)\].*\[(.*)\].*/\1: \2/')
echo ""
# Network
echo -e "${BLUE}Network${CLEAR}"
lspci | grep -Ei '(ethernet|network|wireless|wifi)' \
| sed -r 's/.*: (.*)$/ \1/'
echo ""
# Drives
echo -e "${BLUE}Drives${CLEAR}"
hw-drive-info | sed 's/^/ /'
echo ""
# Sensors
echo -e "${BLUE}Sensors${CLEAR}"
hw-sensors | sed 's/^/ /'
echo ""

View file

@ -19,6 +19,7 @@ if __name__ == '__main__':
other_results = { other_results = {
'Error': { 'Error': {
'CalledProcessError': 'Unknown Error', 'CalledProcessError': 'Unknown Error',
'FileNotFoundError': 'File not found',
}, },
'Warning': { 'Warning': {
'GenericRepair': 'Repaired', 'GenericRepair': 'Repaired',
@ -36,12 +37,14 @@ if __name__ == '__main__':
print_info('Installing Programs') print_info('Installing Programs')
if answer_adobe_reader: if answer_adobe_reader:
install_adobe_reader() try_and_print(message='Adobe Reader DC...',
function=install_adobe_reader, other_results=other_results)
if answer_vcr: if answer_vcr:
install_vcredists() install_vcredists()
if answer_ninite: if answer_ninite:
try_and_print(message='Ninite bundle...', try_and_print(message='Ninite bundle...',
function=install_ninite_bundle, cs='Started', mse=answer_mse) function=install_ninite_bundle, cs='Started',
mse=answer_mse, other_results=other_results)
if answer_extensions: if answer_extensions:
wait_for_process('ninite.exe') wait_for_process('ninite.exe')
print_info('Installing Extensions') print_info('Installing Extensions')
@ -51,7 +54,8 @@ if __name__ == '__main__':
try_and_print(message='Google Chrome extensions...', try_and_print(message='Google Chrome extensions...',
function=install_chrome_extensions) function=install_chrome_extensions)
try_and_print(message='Mozilla Firefox extensions...', try_and_print(message='Mozilla Firefox extensions...',
function=install_firefox_extensions) function=install_firefox_extensions,
other_results=other_results)
print_standard('\nDone.') print_standard('\nDone.')
exit_script() exit_script()
except SystemExit: except SystemExit:

View file

@ -22,14 +22,14 @@ if __name__ == '__main__':
# Print report # Print report
print_info('\nResults') print_info('\nResults')
for line in report: for vol_name, vol_data in sorted(report.items()):
show_data(indent=4, width=16, **line[-1]) show_data(indent=4, width=20, **vol_data['show_data'])
# Done # Done
print_standard('\nDone.') print_standard('\nDone.')
if 'gui' in sys.argv: if 'gui' in sys.argv:
pause("Press Enter to exit...") pause("Press Enter to exit...")
popen_program(['nohup', 'thunar', '/media']) popen_program(['nohup', 'thunar', '/media'], pipe=True)
exit_script() exit_script()
except SystemExit: except SystemExit:
pass pass

View file

@ -3,13 +3,10 @@
import os import os
import sys import sys
# STATIC VARIABLES
REG_MSISERVER = r'HKLM\SYSTEM\CurrentControlSet\Control\SafeBoot\Network\MSIServer'
# Init # Init
os.chdir(os.path.dirname(os.path.realpath(__file__))) os.chdir(os.path.dirname(os.path.realpath(__file__)))
sys.path.append(os.getcwd()) sys.path.append(os.getcwd())
from functions.common import * from functions.safemode import *
init_global_vars() init_global_vars()
os.system('title {}: SafeMode Tool'.format(KIT_NAME_FULL)) os.system('title {}: SafeMode Tool'.format(KIT_NAME_FULL))
@ -17,26 +14,23 @@ if __name__ == '__main__':
try: try:
clear_screen() clear_screen()
print_info('{}: SafeMode Tool\n'.format(KIT_NAME_FULL)) print_info('{}: SafeMode Tool\n'.format(KIT_NAME_FULL))
other_results = {
'Error': {'CalledProcessError': 'Unknown Error'},
'Warning': {}}
if not ask('Enable booting to SafeMode (with Networking)?'): if not ask('Enable booting to SafeMode (with Networking)?'):
abort() abort()
# Edit BCD to set safeboot as default # Configure SafeMode
cmd = ['bcdedit', '/set', '{default}', 'safeboot', 'network'] try_and_print(message='Set BCD option...',
run_program(cmd, check=False) function=enable_safemode, other_results=other_results)
try_and_print(message='Enable MSI in SafeMode...',
# Enable MSI access under safemode function=enable_safemode_msi, other_results=other_results)
cmd = ['reg', 'add', REG_MSISERVER, '/f']
run_program(cmd, check=False)
cmd = ['reg', 'add', REG_MSISERVER, '/ve',
'/t', 'REG_SZ', '/d', 'Service', '/f']
run_program(cmd, check=False)
## Done ##
pause('Press Enter to reboot...')
cmd = ['shutdown', '-r', '-t', '3']
run_program(cmd, check=False)
# Done # Done
print_standard('\nDone.')
pause('Press Enter to reboot...')
reboot()
exit_script() exit_script()
except SystemExit: except SystemExit:
pass pass

View file

@ -3,13 +3,10 @@
import os import os
import sys import sys
# STATIC VARIABLES
REG_MSISERVER = r'HKLM\SYSTEM\CurrentControlSet\Control\SafeBoot\Network\MSIServer'
# Init # Init
os.chdir(os.path.dirname(os.path.realpath(__file__))) os.chdir(os.path.dirname(os.path.realpath(__file__)))
sys.path.append(os.getcwd()) sys.path.append(os.getcwd())
from functions.common import * from functions.safemode import *
init_global_vars() init_global_vars()
os.system('title {}: SafeMode Tool'.format(KIT_NAME_FULL)) os.system('title {}: SafeMode Tool'.format(KIT_NAME_FULL))
@ -17,24 +14,23 @@ if __name__ == '__main__':
try: try:
clear_screen() clear_screen()
print_info('{}: SafeMode Tool\n'.format(KIT_NAME_FULL)) print_info('{}: SafeMode Tool\n'.format(KIT_NAME_FULL))
other_results = {
'Error': {'CalledProcessError': 'Unknown Error'},
'Warning': {}}
if not ask('Disable booting to SafeMode?'): if not ask('Disable booting to SafeMode?'):
abort() abort()
# Edit BCD to remove safeboot value # Configure SafeMode
for boot in ['{current}', '{default}']: try_and_print(message='Remove BCD option...',
cmd = ['bcdedit', '/deletevalue', boot, 'safeboot'] function=disable_safemode, other_results=other_results)
run_program(cmd, check=False) try_and_print(message='Disable MSI in SafeMode...',
function=disable_safemode_msi, other_results=other_results)
# Disable MSI access under safemode
cmd = ['reg', 'delete', REG_MSISERVER, '/f']
run_program(cmd, check=False)
## Done ##
pause('Press Enter to reboot...')
cmd = ['shutdown', '-r', '-t', '3']
run_program(cmd, check=False)
# Done # Done
print_standard('\nDone.')
pause('Press Enter to reboot...')
reboot()
exit_script() exit_script()
except SystemExit: except SystemExit:
pass pass

View file

@ -8,18 +8,6 @@ LAUNCHERS = {
'L_ITEM': 'activate.py', 'L_ITEM': 'activate.py',
'L_ELEV': 'True', 'L_ELEV': 'True',
}, },
'Enter SafeMode': {
'L_TYPE': 'PyScript',
'L_PATH': 'Scripts',
'L_ITEM': 'safemode_enter.py',
'L_ELEV': 'True',
},
'Exit SafeMode': {
'L_TYPE': 'PyScript',
'L_PATH': 'Scripts',
'L_ITEM': 'safemode_exit.py',
'L_ELEV': 'True',
},
'System Checklist': { 'System Checklist': {
'L_TYPE': 'PyScript', 'L_TYPE': 'PyScript',
'L_PATH': 'Scripts', 'L_PATH': 'Scripts',
@ -294,8 +282,8 @@ LAUNCHERS = {
'Intel RST (Current Release)': { 'Intel RST (Current Release)': {
'L_TYPE': 'Executable', 'L_TYPE': 'Executable',
'L_PATH': '_Drivers\Intel RST', 'L_PATH': '_Drivers\Intel RST',
'L_ITEM': 'SetupRST_15.9.exe', 'L_ITEM': 'SetupRST_16.0.exe',
'L_7ZIP': 'SetupRST_15.9.exe', 'L_7ZIP': 'SetupRST_16.0.exe',
}, },
'Intel RST (Previous Releases)': { 'Intel RST (Previous Releases)': {
'L_TYPE': 'Folder', 'L_TYPE': 'Folder',
@ -458,6 +446,12 @@ LAUNCHERS = {
'L_PATH': 'ConEmu', 'L_PATH': 'ConEmu',
'L_ITEM': 'ConEmu.exe', 'L_ITEM': 'ConEmu.exe',
}, },
'Enter SafeMode': {
'L_TYPE': 'PyScript',
'L_PATH': 'Scripts',
'L_ITEM': 'safemode_enter.py',
'L_ELEV': 'True',
},
'Everything': { 'Everything': {
'L_TYPE': 'Executable', 'L_TYPE': 'Executable',
'L_PATH': 'Everything', 'L_PATH': 'Everything',
@ -465,6 +459,12 @@ LAUNCHERS = {
'L_ARGS': '-nodb', 'L_ARGS': '-nodb',
'L_ELEV': 'True', 'L_ELEV': 'True',
}, },
'Exit SafeMode': {
'L_TYPE': 'PyScript',
'L_PATH': 'Scripts',
'L_ITEM': 'safemode_exit.py',
'L_ELEV': 'True',
},
'Notepad++': { 'Notepad++': {
'L_TYPE': 'Executable', 'L_TYPE': 'Executable',
'L_PATH': 'notepadplusplus', 'L_PATH': 'notepadplusplus',

View file

@ -2,6 +2,7 @@
# Features # Features
ENABLED_UPLOAD_DATA = False ENABLED_UPLOAD_DATA = False
ENABLED_TICKET_NUMBERS = False
# STATIC VARIABLES (also used by BASH and BATCH files) # STATIC VARIABLES (also used by BASH and BATCH files)
## NOTE: There are no spaces around the = for easier parsing in BASH and BATCH ## NOTE: There are no spaces around the = for easier parsing in BASH and BATCH

View file

@ -2,7 +2,7 @@
SOURCE_URLS = { SOURCE_URLS = {
'AIDA64': 'http://download.aida64.com/aida64engineer597.zip', 'AIDA64': 'http://download.aida64.com/aida64engineer597.zip',
'Adobe Reader DC': 'http://ardownload.adobe.com/pub/adobe/reader/win/AcrobatDC/1801120035/AcroRdrDC1801120035_en_US.exe', 'Adobe Reader DC': 'http://ardownload.adobe.com/pub/adobe/reader/win/AcrobatDC/1801120040/AcroRdrDC1801120040_en_US.exe',
'AdwCleaner': 'https://toolslib.net/downloads/finish/1-adwcleaner/', 'AdwCleaner': 'https://toolslib.net/downloads/finish/1-adwcleaner/',
'Autoruns': 'https://download.sysinternals.com/files/Autoruns.zip', 'Autoruns': 'https://download.sysinternals.com/files/Autoruns.zip',
'BleachBit': 'https://download.bleachbit.org/BleachBit-2.0-portable.zip', 'BleachBit': 'https://download.bleachbit.org/BleachBit-2.0-portable.zip',
@ -16,7 +16,7 @@ SOURCE_URLS = {
'Everything64': 'https://www.voidtools.com/Everything-1.4.1.895.x64.zip', 'Everything64': 'https://www.voidtools.com/Everything-1.4.1.895.x64.zip',
'FastCopy32': 'http://ftp.vector.co.jp/69/93/2323/FastCopy341.zip', 'FastCopy32': 'http://ftp.vector.co.jp/69/93/2323/FastCopy341.zip',
'FastCopy64': 'http://ftp.vector.co.jp/69/93/2323/FastCopy341_x64.zip', 'FastCopy64': 'http://ftp.vector.co.jp/69/93/2323/FastCopy341_x64.zip',
'Firefox uBO': 'https://addons.cdn.mozilla.net/user-media/addons/607454/ublock_origin-1.15.10-an+fx.xpi?filehash=sha256%3A30b258803fd6cd988c5ba479f2f6ff5b4e9b40110c81e3421a6867b20ec718a6', 'Firefox uBO': 'https://addons.mozilla.org/firefox/downloads/file/956394/ublock_origin-1.16.6-an+fx.xpi',
'HWiNFO': 'http://app.oldfoss.com:81/download/HWiNFO/hwi_582.zip', 'HWiNFO': 'http://app.oldfoss.com:81/download/HWiNFO/hwi_582.zip',
'HitmanPro32': 'https://dl.surfright.nl/HitmanPro.exe', 'HitmanPro32': 'https://dl.surfright.nl/HitmanPro.exe',
'HitmanPro64': 'https://dl.surfright.nl/HitmanPro_x64.exe', 'HitmanPro64': 'https://dl.surfright.nl/HitmanPro_x64.exe',
@ -25,7 +25,7 @@ SOURCE_URLS = {
'KVRT': 'http://devbuilds.kaspersky-labs.com/devbuilds/KVRT/latest/full/KVRT.exe', 'KVRT': 'http://devbuilds.kaspersky-labs.com/devbuilds/KVRT/latest/full/KVRT.exe',
'NotepadPlusPlus': 'https://notepad-plus-plus.org/repository/7.x/7.5.6/npp.7.5.6.bin.minimalist.7z', 'NotepadPlusPlus': 'https://notepad-plus-plus.org/repository/7.x/7.5.6/npp.7.5.6.bin.minimalist.7z',
'Office Deployment Tool 2013': 'https://download.microsoft.com/download/6/2/3/6230F7A2-D8A9-478B-AC5C-57091B632FCF/officedeploymenttool_x86_4827-1000.exe', 'Office Deployment Tool 2013': 'https://download.microsoft.com/download/6/2/3/6230F7A2-D8A9-478B-AC5C-57091B632FCF/officedeploymenttool_x86_4827-1000.exe',
'Office Deployment Tool 2016': 'https://download.microsoft.com/download/2/7/A/27AF1BE6-DD20-4CB4-B154-EBAB8A7D4A7E/officedeploymenttool_8529.3600.exe', 'Office Deployment Tool 2016': 'https://download.microsoft.com/download/2/7/A/27AF1BE6-DD20-4CB4-B154-EBAB8A7D4A7E/officedeploymenttool_9326.3600.exe',
'ProduKey32': 'http://www.nirsoft.net/utils/produkey.zip', 'ProduKey32': 'http://www.nirsoft.net/utils/produkey.zip',
'ProduKey64': 'http://www.nirsoft.net/utils/produkey-x64.zip', 'ProduKey64': 'http://www.nirsoft.net/utils/produkey-x64.zip',
'PuTTY': 'https://the.earth.li/~sgtatham/putty/latest/w32/putty.zip', 'PuTTY': 'https://the.earth.li/~sgtatham/putty/latest/w32/putty.zip',
@ -176,7 +176,7 @@ NINITE_SOURCES = {
'Launchy.exe': 'launchy', 'Launchy.exe': 'launchy',
'RealVNC.exe': 'realvnc', 'RealVNC.exe': 'realvnc',
'Revo Uninstaller.exe': 'revo', 'Revo Uninstaller.exe': 'revo',
'TeamViewer 12.exe': 'teamviewer12', 'TeamViewer 13.exe': 'teamviewer13',
'TeraCopy.exe': 'teracopy', 'TeraCopy.exe': 'teracopy',
'WinDirStat.exe': 'windirstat', 'WinDirStat.exe': 'windirstat',
}, },
@ -196,6 +196,7 @@ RST_SOURCES = {
'SetupRST_14.8.exe': 'https://downloadmirror.intel.com/26759/eng/setuprst.exe', 'SetupRST_14.8.exe': 'https://downloadmirror.intel.com/26759/eng/setuprst.exe',
'SetupRST_15.8.exe': 'https://downloadmirror.intel.com/27442/eng/SetupRST.exe', 'SetupRST_15.8.exe': 'https://downloadmirror.intel.com/27442/eng/SetupRST.exe',
'SetupRST_15.9.exe': 'https://downloadmirror.intel.com/27400/eng/SetupRST.exe', 'SetupRST_15.9.exe': 'https://downloadmirror.intel.com/27400/eng/SetupRST.exe',
'SetupRST_16.0.exe': 'https://downloadmirror.intel.com/27681/eng/SetupRST.exe',
} }

View file

@ -0,0 +1,155 @@
# Wizard Kit: Settings - Windows Builds
WINDOWS_BUILDS = {
# Build Version Release Codename Marketing Name Notes
'6000': ( 'Vista', 'RTM', 'Longhorn', None, 'unsupported'),
'6000': ( 'Vista', 'RTM', 'Longhorn', None, 'unsupported'),
'6001': ( 'Vista', 'SP1', 'Longhorn', None, 'unsupported'),
'6002': ( 'Vista', 'SP2', 'Longhorn', None, 'unsupported'),
'7600': ( '7', 'RTM', 'Vienna', None, 'unsupported'),
'7601': ( '7', 'SP1', 'Vienna', None, 'outdated'),
#9199 is a fake build since Win 8 is 6.2.9200 but that collides with Win 8.1 (6.3.9200)
'9199': ( '8', 'RTM', None, None, 'unsupported'),
'9200': ( '8.1', None, 'Blue', None, 'outdated'),
'9600': ( '8.1', None, 'Update', None, None),
'9841': ( '10', None, 'Threshold 1', None, 'preview build'),
'9860': ( '10', None, 'Threshold 1', None, 'preview build'),
'9879': ( '10', None, 'Threshold 1', None, 'preview build'),
'9926': ( '10', None, 'Threshold 1', None, 'preview build'),
'10041': ( '10', None, 'Threshold 1', None, 'preview build'),
'10049': ( '10', None, 'Threshold 1', None, 'preview build'),
'10061': ( '10', None, 'Threshold 1', None, 'preview build'),
'10074': ( '10', None, 'Threshold 1', None, 'preview build'),
'10122': ( '10', None, 'Threshold 1', None, 'preview build'),
'10130': ( '10', None, 'Threshold 1', None, 'preview build'),
'10158': ( '10', None, 'Threshold 1', None, 'preview build'),
'10159': ( '10', None, 'Threshold 1', None, 'preview build'),
'10162': ( '10', None, 'Threshold 1', None, 'preview build'),
'10166': ( '10', None, 'Threshold 1', None, 'preview build'),
'10240': ( '10', 'v1507', 'Threshold 1', None, 'unsupported'),
'10525': ( '10', None, 'Threshold 2', None, 'preview build'),
'10532': ( '10', None, 'Threshold 2', None, 'preview build'),
'10547': ( '10', None, 'Threshold 2', None, 'preview build'),
'10565': ( '10', None, 'Threshold 2', None, 'preview build'),
'10576': ( '10', None, 'Threshold 2', None, 'preview build'),
'10586': ( '10', 'v1511', 'Threshold 2', 'November Update', 'unsupported'),
'11082': ( '10', None, 'Redstone 1', None, 'preview build'),
'11099': ( '10', None, 'Redstone 1', None, 'preview build'),
'11102': ( '10', None, 'Redstone 1', None, 'preview build'),
'14251': ( '10', None, 'Redstone 1', None, 'preview build'),
'14257': ( '10', None, 'Redstone 1', None, 'preview build'),
'14271': ( '10', None, 'Redstone 1', None, 'preview build'),
'14279': ( '10', None, 'Redstone 1', None, 'preview build'),
'14291': ( '10', None, 'Redstone 1', None, 'preview build'),
'14295': ( '10', None, 'Redstone 1', None, 'preview build'),
'14316': ( '10', None, 'Redstone 1', None, 'preview build'),
'14328': ( '10', None, 'Redstone 1', None, 'preview build'),
'14332': ( '10', None, 'Redstone 1', None, 'preview build'),
'14342': ( '10', None, 'Redstone 1', None, 'preview build'),
'14352': ( '10', None, 'Redstone 1', None, 'preview build'),
'14361': ( '10', None, 'Redstone 1', None, 'preview build'),
'14366': ( '10', None, 'Redstone 1', None, 'preview build'),
'14367': ( '10', None, 'Redstone 1', None, 'preview build'),
'14371': ( '10', None, 'Redstone 1', None, 'preview build'),
'14372': ( '10', None, 'Redstone 1', None, 'preview build'),
'14376': ( '10', None, 'Redstone 1', None, 'preview build'),
'14379': ( '10', None, 'Redstone 1', None, 'preview build'),
'14383': ( '10', None, 'Redstone 1', None, 'preview build'),
'14385': ( '10', None, 'Redstone 1', None, 'preview build'),
'14388': ( '10', None, 'Redstone 1', None, 'preview build'),
'14390': ( '10', None, 'Redstone 1', None, 'preview build'),
'14393': ( '10', 'v1607', 'Redstone 1', 'Anniversary Update', 'unsupported'),
'14901': ( '10', None, 'Redstone 2', None, 'preview build'),
'14905': ( '10', None, 'Redstone 2', None, 'preview build'),
'14915': ( '10', None, 'Redstone 2', None, 'preview build'),
'14926': ( '10', None, 'Redstone 2', None, 'preview build'),
'14931': ( '10', None, 'Redstone 2', None, 'preview build'),
'14936': ( '10', None, 'Redstone 2', None, 'preview build'),
'14942': ( '10', None, 'Redstone 2', None, 'preview build'),
'14946': ( '10', None, 'Redstone 2', None, 'preview build'),
'14951': ( '10', None, 'Redstone 2', None, 'preview build'),
'14955': ( '10', None, 'Redstone 2', None, 'preview build'),
'14959': ( '10', None, 'Redstone 2', None, 'preview build'),
'14965': ( '10', None, 'Redstone 2', None, 'preview build'),
'14971': ( '10', None, 'Redstone 2', None, 'preview build'),
'14986': ( '10', None, 'Redstone 2', None, 'preview build'),
'15002': ( '10', None, 'Redstone 2', None, 'preview build'),
'15007': ( '10', None, 'Redstone 2', None, 'preview build'),
'15014': ( '10', None, 'Redstone 2', None, 'preview build'),
'15019': ( '10', None, 'Redstone 2', None, 'preview build'),
'15025': ( '10', None, 'Redstone 2', None, 'preview build'),
'15031': ( '10', None, 'Redstone 2', None, 'preview build'),
'15042': ( '10', None, 'Redstone 2', None, 'preview build'),
'15046': ( '10', None, 'Redstone 2', None, 'preview build'),
'15048': ( '10', None, 'Redstone 2', None, 'preview build'),
'15055': ( '10', None, 'Redstone 2', None, 'preview build'),
'15058': ( '10', None, 'Redstone 2', None, 'preview build'),
'15060': ( '10', None, 'Redstone 2', None, 'preview build'),
'15061': ( '10', None, 'Redstone 2', None, 'preview build'),
'15063': ( '10', 'v1703', 'Redstone 2', 'Creators Update', 'outdated'),
'16170': ( '10', None, 'Redstone 3', None, 'preview build'),
'16176': ( '10', None, 'Redstone 3', None, 'preview build'),
'16179': ( '10', None, 'Redstone 3', None, 'preview build'),
'16184': ( '10', None, 'Redstone 3', None, 'preview build'),
'16188': ( '10', None, 'Redstone 3', None, 'preview build'),
'16193': ( '10', None, 'Redstone 3', None, 'preview build'),
'16199': ( '10', None, 'Redstone 3', None, 'preview build'),
'16212': ( '10', None, 'Redstone 3', None, 'preview build'),
'16215': ( '10', None, 'Redstone 3', None, 'preview build'),
'16226': ( '10', None, 'Redstone 3', None, 'preview build'),
'16232': ( '10', None, 'Redstone 3', None, 'preview build'),
'16237': ( '10', None, 'Redstone 3', None, 'preview build'),
'16241': ( '10', None, 'Redstone 3', None, 'preview build'),
'16251': ( '10', None, 'Redstone 3', None, 'preview build'),
'16257': ( '10', None, 'Redstone 3', None, 'preview build'),
'16273': ( '10', None, 'Redstone 3', None, 'preview build'),
'16275': ( '10', None, 'Redstone 3', None, 'preview build'),
'16278': ( '10', None, 'Redstone 3', None, 'preview build'),
'16281': ( '10', None, 'Redstone 3', None, 'preview build'),
'16288': ( '10', None, 'Redstone 3', None, 'preview build'),
'16291': ( '10', None, 'Redstone 3', None, 'preview build'),
'16294': ( '10', None, 'Redstone 3', None, 'preview build'),
'16296': ( '10', None, 'Redstone 3', None, 'preview build'),
'16299': ( '10', 'v1709', 'Redstone 3', 'Fall Creators Update', 'outdated'),
'16353': ( '10', None, 'Redstone 4', None, 'preview build'),
'16362': ( '10', None, 'Redstone 4', None, 'preview build'),
'17004': ( '10', None, 'Redstone 4', None, 'preview build'),
'17017': ( '10', None, 'Redstone 4', None, 'preview build'),
'17025': ( '10', None, 'Redstone 4', None, 'preview build'),
'17035': ( '10', None, 'Redstone 4', None, 'preview build'),
'17040': ( '10', None, 'Redstone 4', None, 'preview build'),
'17046': ( '10', None, 'Redstone 4', None, 'preview build'),
'17063': ( '10', None, 'Redstone 4', None, 'preview build'),
'17074': ( '10', None, 'Redstone 4', None, 'preview build'),
'17083': ( '10', None, 'Redstone 4', None, 'preview build'),
'17093': ( '10', None, 'Redstone 4', None, 'preview build'),
'17101': ( '10', None, 'Redstone 4', None, 'preview build'),
'17107': ( '10', None, 'Redstone 4', None, 'preview build'),
'17110': ( '10', None, 'Redstone 4', None, 'preview build'),
'17112': ( '10', None, 'Redstone 4', None, 'preview build'),
'17115': ( '10', None, 'Redstone 4', None, 'preview build'),
'17120': ( '10', None, 'Redstone 4', None, 'preview build'),
'17123': ( '10', None, 'Redstone 4', None, 'preview build'),
'17127': ( '10', None, 'Redstone 4', None, 'preview build'),
'17128': ( '10', None, 'Redstone 4', None, 'preview build'),
'17133': ( '10', None, 'Redstone 4', None, 'preview build'),
'17134': ( '10', 'v1803', 'Redstone 4', 'April 2018 Update', None),
'17604': ( '10', None, 'Redstone 5', None, 'preview build'),
'17618': ( '10', None, 'Redstone 5', None, 'preview build'),
'17623': ( '10', None, 'Redstone 5', None, 'preview build'),
'17627': ( '10', None, 'Redstone 5', None, 'preview build'),
'17634': ( '10', None, 'Redstone 5', None, 'preview build'),
'17639': ( '10', None, 'Redstone 5', None, 'preview build'),
'17643': ( '10', None, 'Redstone 5', None, 'preview build'),
'17650': ( '10', None, 'Redstone 5', None, 'preview build'),
'17655': ( '10', None, 'Redstone 5', None, 'preview build'),
'17661': ( '10', None, 'Redstone 5', None, 'preview build'),
'17666': ( '10', None, 'Redstone 5', None, 'preview build'),
}
if __name__ == '__main__':
print("This file is not meant to be called directly.")

View file

@ -26,10 +26,12 @@ if __name__ == '__main__':
'Error': { 'Error': {
'CalledProcessError': 'Unknown Error', 'CalledProcessError': 'Unknown Error',
'BIOSKeyNotFoundError': 'BIOS key not found', 'BIOSKeyNotFoundError': 'BIOS key not found',
'FileNotFoundError': 'File not found',
}, },
'Warning': {}} 'Warning': {}}
print_info('Starting System Checklist for Ticket #{}\n'.format( if ENABLED_TICKET_NUMBERS:
ticket_number)) print_info('Starting System Checklist for Ticket #{}\n'.format(
ticket_number))
# Configure # Configure
print_info('Configure') print_info('Configure')
@ -44,20 +46,20 @@ if __name__ == '__main__':
try_and_print(message='Desktop...', try_and_print(message='Desktop...',
function=cleanup_desktop, cs='Done') function=cleanup_desktop, cs='Done')
try_and_print(message='AdwCleaner...', try_and_print(message='AdwCleaner...',
function=cleanup_adwcleaner, cs='Done') function=cleanup_adwcleaner, cs='Done', other_results=other_results)
# Export system info # Export system info
print_info('Backup System Information') print_info('Backup System Information')
try_and_print(message='AIDA64 reports...', try_and_print(message='AIDA64 reports...',
function=run_aida64, cs='Done') function=run_aida64, cs='Done', other_results=other_results)
try_and_print(message='File listing...', try_and_print(message='File listing...',
function=backup_file_list, cs='Done') function=backup_file_list, cs='Done', other_results=other_results)
try_and_print(message='Power plans...', try_and_print(message='Power plans...',
function=backup_power_plans, cs='Done') function=backup_power_plans, cs='Done')
try_and_print(message='Product Keys...', try_and_print(message='Product Keys...', other_results=other_results,
function=run_produkey, cs='Done') function=run_produkey, cs='Done')
try_and_print(message='Registry...', try_and_print(message='Registry...',
function=backup_registry, cs='Done') function=backup_registry, cs='Done', other_results=other_results)
# User data # User data
print_info('User Data') print_info('User Data')
@ -70,24 +72,33 @@ if __name__ == '__main__':
try_and_print(message='Activation:', try_and_print(message='Activation:',
function=show_os_activation, ns='Unknown', silent_function=False) function=show_os_activation, ns='Unknown', silent_function=False)
if (not windows_is_activated() if (not windows_is_activated()
and global_vars['OS']['Version'] in ('8', '10')): and global_vars['OS']['Version'] in ('8', '8.1', '10')):
try_and_print(message='BIOS Activation:', try_and_print(message='BIOS Activation:',
function=activate_with_bios, function=activate_with_bios,
other_results=other_results) other_results=other_results)
try_and_print(message='Installed Office:',
function=get_installed_office, ns='Unknown', print_return=True)
show_free_space()
try_and_print(message='Installed RAM:', try_and_print(message='Installed RAM:',
function=show_installed_ram, ns='Unknown', silent_function=False) function=show_installed_ram, ns='Unknown', silent_function=False)
show_free_space()
try_and_print(message='Installed Antivirus:',
function=get_installed_antivirus, ns='Unknown',
other_results=other_results, print_return=True)
try_and_print(message='Installed Office:',
function=get_installed_office, ns='Unknown',
other_results=other_results, print_return=True)
# Play audio, show devices, open Windows updates, and open Activation # Play audio, show devices, open Windows updates, and open Activation
popen_program(['mmc', 'devmgmt.msc']) try_and_print(message='Opening Device Manager...',
run_hwinfo_sensors() function=open_device_manager, cs='Started')
popen_program(['control', '/name', 'Microsoft.WindowsUpdate']) try_and_print(message='Opening HWiNFO (Sensors)...',
function=run_hwinfo_sensors, cs='Started', other_results=other_results)
try_and_print(message='Opening Windows Updates...',
function=open_windows_updates, cs='Started')
if not windows_is_activated(): if not windows_is_activated():
popen_program('slui') try_and_print(message='Opening Windows Activation...',
function=open_windows_activation, cs='Started')
sleep(3) sleep(3)
run_xmplay() try_and_print(message='Running XMPlay...',
function=run_xmplay, cs='Started', other_results=other_results)
# Done # Done
print_standard('\nDone.') print_standard('\nDone.')

View file

@ -25,22 +25,24 @@ if __name__ == '__main__':
other_results = { other_results = {
'Error': { 'Error': {
'CalledProcessError': 'Unknown Error', 'CalledProcessError': 'Unknown Error',
'FileNotFoundError': 'File not found',
}, },
'Warning': { 'Warning': {
'GenericRepair': 'Repaired', 'GenericRepair': 'Repaired',
'UnsupportedOSError': 'Unsupported OS', 'UnsupportedOSError': 'Unsupported OS',
}} }}
print_info('Starting System Diagnostics for Ticket #{}\n'.format( if ENABLED_TICKET_NUMBERS:
ticket_number)) print_info('Starting System Diagnostics for Ticket #{}\n'.format(
ticket_number))
# Sanitize Environment # Sanitize Environment
print_info('Sanitizing Environment') print_info('Sanitizing Environment')
# try_and_print(message='Killing processes...', # try_and_print(message='Killing processes...',
# function=run_process_killer, cs='Done') # function=run_process_killer, cs='Done')
try_and_print(message='Running RKill...', try_and_print(message='Running RKill...',
function=run_rkill, cs='Done') function=run_rkill, cs='Done', other_results=other_results)
try_and_print(message='Running TDSSKiller...', try_and_print(message='Running TDSSKiller...',
function=run_tdsskiller, cs='Done') function=run_tdsskiller, cs='Done', other_results=other_results)
# Re-run if earlier process was stopped. # Re-run if earlier process was stopped.
stay_awake() stay_awake()
@ -49,9 +51,9 @@ if __name__ == '__main__':
print_info('Starting Background Scans') print_info('Starting Background Scans')
check_connection() check_connection()
try_and_print(message='Running HitmanPro...', try_and_print(message='Running HitmanPro...',
function=run_hitmanpro, cs='Started') function=run_hitmanpro, cs='Started', other_results=other_results)
try_and_print(message='Running Autoruns...', try_and_print(message='Running Autoruns...',
function=run_autoruns, cs='Started') function=run_autoruns, cs='Started', other_results=other_results)
# OS Health Checks # OS Health Checks
print_info('OS Health Checks') print_info('OS Health Checks')
@ -70,34 +72,38 @@ if __name__ == '__main__':
# Export system info # Export system info
print_info('Backup System Information') print_info('Backup System Information')
try_and_print(message='AIDA64 reports...', try_and_print(message='AIDA64 reports...',
function=run_aida64, cs='Done') function=run_aida64, cs='Done', other_results=other_results)
try_and_print(message='BleachBit report...', try_and_print(message='BleachBit report...',
function=run_bleachbit, cs='Done') function=run_bleachbit, cs='Done', other_results=other_results)
backup_browsers() backup_browsers()
try_and_print(message='File listing...', try_and_print(message='File listing...',
function=backup_file_list, cs='Done') function=backup_file_list, cs='Done', other_results=other_results)
try_and_print(message='Power plans...', try_and_print(message='Power plans...',
function=backup_power_plans, cs='Done') function=backup_power_plans, cs='Done')
try_and_print(message='Product Keys...', try_and_print(message='Product Keys...',
function=run_produkey, cs='Done') function=run_produkey, cs='Done', other_results=other_results)
try_and_print(message='Registry...', try_and_print(message='Registry...',
function=backup_registry, cs='Done') function=backup_registry, cs='Done', other_results=other_results)
# Summary # Summary
print_info('Summary') print_info('Summary')
try_and_print(message='Temp Size:',
function=show_temp_files_size, silent_function=False)
show_free_space()
try_and_print(message='Installed RAM:',
function=show_installed_ram, ns='Unknown', silent_function=False)
try_and_print(message='Installed Office:',
function=get_installed_office, ns='Unknown', print_return=True)
try_and_print(message='Product Keys:',
function=get_product_keys, ns='Unknown', print_return=True)
try_and_print(message='Operating System:', try_and_print(message='Operating System:',
function=show_os_name, ns='Unknown', silent_function=False) function=show_os_name, ns='Unknown', silent_function=False)
try_and_print(message='', try_and_print(message='Activation:',
function=show_os_activation, ns='Unknown', silent_function=False) function=show_os_activation, ns='Unknown', silent_function=False)
try_and_print(message='Installed RAM:',
function=show_installed_ram, ns='Unknown', silent_function=False)
show_free_space()
try_and_print(message='Temp Size:',
function=show_temp_files_size, silent_function=False)
try_and_print(message='Installed Antivirus:',
function=get_installed_antivirus, ns='Unknown',
other_results=other_results, print_return=True)
try_and_print(message='Installed Office:',
function=get_installed_office, ns='Unknown',
other_results=other_results, print_return=True)
try_and_print(message='Product Keys:',
function=get_product_keys, ns='Unknown', print_return=True)
# User data # User data
print_info('User Data') print_info('User Data')

View file

@ -18,17 +18,29 @@ if __name__ == '__main__':
stay_awake() stay_awake()
clear_screen() clear_screen()
print_info('{}: User Data Transfer Tool\n'.format(KIT_NAME_FULL)) print_info('{}: User Data Transfer Tool\n'.format(KIT_NAME_FULL))
# Get backup name prefix
ticket_number = get_ticket_number() ticket_number = get_ticket_number()
if ENABLED_TICKET_NUMBERS:
backup_prefix = ticket_number
else:
backup_prefix = get_simple_string(prompt='Enter backup name prefix')
backup_prefix = backup_prefix.replace(' ', '_')
# Set destination
folder_path = r'{}\Transfer'.format(KIT_NAME_SHORT) folder_path = r'{}\Transfer'.format(KIT_NAME_SHORT)
dest = select_destination(folder_path=folder_path, dest = select_destination(folder_path=folder_path,
prompt='Which disk are we transferring to?') prompt='Which disk are we transferring to?')
source = select_source(ticket_number)
# Set source items
source = select_source(backup_prefix)
items = scan_source(source, dest) items = scan_source(source, dest)
# Transfer # Transfer
clear_screen() clear_screen()
print_info('Transfer Details:\n') print_info('Transfer Details:\n')
show_data('Ticket:', ticket_number) if ENABLED_TICKET_NUMBERS:
show_data('Ticket:', ticket_number)
show_data('Source:', source.path) show_data('Source:', source.path)
show_data('Destination:', dest) show_data('Destination:', dest)
@ -43,7 +55,8 @@ if __name__ == '__main__':
umount_backup_shares() umount_backup_shares()
# Done # Done
run_kvrt() try_and_print(message='Running KVRT...',
function=run_kvrt, cs='Started')
print_standard('\nDone.') print_standard('\nDone.')
pause("Press Enter to exit...") pause("Press Enter to exit...")
exit_script() exit_script()

View file

@ -21,4 +21,4 @@
-uplimit:1 -uplimit:1
-connections:0 -connections:0
-expertmode -norestorepnt -showdrpnames2 -onlyupdates -preservecfg -expertmode -norestorepnt -showdrpnames2 -onlyupdates -preservecfg -novirusalerts

View file

@ -7,7 +7,8 @@ alias 7z9='7z a -t7z -mx=9'
alias diff='colordiff -ur' alias diff='colordiff -ur'
alias du='du -sch --apparent-size' alias du='du -sch --apparent-size'
alias fix-perms='find -type d -exec chmod 755 "{}" \; && find -type f -exec chmod 644 "{}" \;' alias fix-perms='find -type d -exec chmod 755 "{}" \; && find -type f -exec chmod 644 "{}" \;'
alias hw-info='sudo inxi -ACDdGlMmNopRsxxc 25' alias hw-info='sudo hw-info | less -S'
alias inxi='echo -e "\e[33mWARNING: inxi is being replaced and will be removed in a future WizardKit release\e[0m"; echo -e " \e[32mReplacements include:\e[0m 'hw-drive-info', 'hw-info', & 'hw-sensors'"; echo ""; inxi'
alias less='less -S' alias less='less -S'
alias ls='ls --color=auto' alias ls='ls --color=auto'
alias mkdir='mkdir -p' alias mkdir='mkdir -p'

View file

@ -1,25 +1,27 @@
[Added Associations] [Added Associations]
application/pdf=mupdf.desktop; application/pdf=evince.desktop;
application/vnd.adobe.flash.movie=mpv.desktop; application/vnd.adobe.flash.movie=mpv.desktop;
application/vnd.ms-asf=mpv.desktop; application/vnd.ms-asf=mpv.desktop;
application/x-desktop=leafpad.desktop;
audio/flac=mpv.desktop; audio/flac=mpv.desktop;
audio/mp4=mpv.desktop; audio/mp4=mpv.desktop;
audio/mpeg=mpv.desktop; audio/mpeg=mpv.desktop;
audio/x-vorbis+ogg=mpv.desktop; audio/x-vorbis+ogg=mpv.desktop;
image/bmp=ristretto.desktop; image/bmp=gpicview.desktop;
image/gif=ristretto.desktop; image/gif=gpicview.desktop;
image/jpeg=ristretto.desktop; image/jpeg=gpicview.desktop;
image/png=ristretto.desktop; image/png=gpicview.desktop;
image/vnd.microsoft.icon=ristretto.desktop; image/vnd.microsoft.icon=gpicview.desktop;
inode/directory=exo-file-manager.desktop inode/directory=exo-file-manager.desktop
text/plain=mousepad.desktop; text/plain=leafpad.desktop;
text/x-log=leafpad.desktop;
video/mp4=mpv.desktop; video/mp4=mpv.desktop;
video/mpeg=mpv.desktop; video/mpeg=mpv.desktop;
video/quicktime=mpv.desktop; video/quicktime=mpv.desktop;
video/x-flv=mpv.desktop; video/x-flv=mpv.desktop;
video/x-matroska=mpv.desktop; video/x-matroska=mpv.desktop;
video/x-msvideo=mpv.desktop;
video/x-ms-wmv=mpv.desktop; video/x-ms-wmv=mpv.desktop;
video/x-msvideo=mpv.desktop;
x-scheme-handler/http=exo-web-browser.desktop x-scheme-handler/http=exo-web-browser.desktop
x-scheme-handler/https=exo-web-browser.desktop x-scheme-handler/https=exo-web-browser.desktop
x-scheme-handler/trash=exo-file-manager.desktop x-scheme-handler/trash=exo-file-manager.desktop

View file

@ -6,7 +6,7 @@ xset s off
xset -dpms xset -dpms
eval $(ssh-agent) eval $(ssh-agent)
export SSH_AUTH_SOCK export SSH_AUTH_SOCK
compton --backend xrender & compton --backend xrender --xrender-sync --xrender-sync-fence &
sleep 1s sleep 1s
conky -d conky -d
nm-applet & nm-applet &

View file

@ -119,7 +119,7 @@ allowed_media_dirs = /media
# allowed_devices = /dev/* # allowed_devices = /dev/*
# WARNING: ALLOWING USERS TO MOUNT DEVICES OUTSIDE OF /dev CAN CAUSE SERIOUS # WARNING: ALLOWING USERS TO MOUNT DEVICES OUTSIDE OF /dev CAN CAUSE SERIOUS
# SECURITY PROBLEMS. DO NOT ALLOW DEVICES IN /dev/shm # SECURITY PROBLEMS. DO NOT ALLOW DEVICES IN /dev/shm
allowed_devices = /dev/* allowed_devices = /dev/*, /dev/mapper/*
# allowed_internal_devices causes udevil to treat any listed block devices as # allowed_internal_devices causes udevil to treat any listed block devices as
@ -133,7 +133,7 @@ allowed_devices = /dev/*
# Some removable esata drives look like internal drives to udevil. To avoid # Some removable esata drives look like internal drives to udevil. To avoid
# this problem, they can be treated as removable with this setting. # this problem, they can be treated as removable with this setting.
# WARNING: SETTING A SYSTEM DEVICE HERE CAN CAUSE SERIOUS SECURITY PROBLEMS. # WARNING: SETTING A SYSTEM DEVICE HERE CAN CAUSE SERIOUS SECURITY PROBLEMS.
allowed_internal_devices = /dev/* allowed_internal_devices = /dev/*, /dev/mapper/*
# allowed_internal_uuids and allowed_internal_uuids_FSTYPE work similarly to # allowed_internal_uuids and allowed_internal_uuids_FSTYPE work similarly to

View file

@ -6,7 +6,6 @@ inxi
mprime mprime
nvme-cli nvme-cli
openbox-patched openbox-patched
papirus-icon-theme
smartmontools-svn smartmontools-svn
testdisk-wip testdisk-wip
ttf-font-awesome-4 ttf-font-awesome-4

View file

@ -1,6 +1,7 @@
aic94xx-firmware aic94xx-firmware
alsa-utils alsa-utils
antiword antiword
arandr
arc-gtk-theme arc-gtk-theme
bash-pipes bash-pipes
bc bc
@ -12,16 +13,19 @@ cmatrix
colordiff colordiff
compton compton
conky conky
cpio
curl curl
dmidecode dmidecode
dos2unix dos2unix
dunst dunst
e2fsprogs e2fsprogs
evince
feh feh
ffmpeg ffmpeg
firefox firefox
gnome-keyring gnome-keyring
gparted gparted
gpicview-gtk3
gsmartcontrol gsmartcontrol
hardinfo hardinfo
hexedit hexedit
@ -33,17 +37,18 @@ i3status
inxi inxi
ldns ldns
leafpad leafpad
lha
libewf libewf
libinput libinput
linux-firmware linux-firmware
lm_sensors lm_sensors
lzip
mdadm mdadm
mediainfo mediainfo
mesa-demos mesa-demos
mkvtoolnix-cli mkvtoolnix-cli
mprime mprime
mpv mpv
mupdf
ncdu ncdu
network-manager-applet network-manager-applet
networkmanager networkmanager
@ -80,6 +85,8 @@ ttf-inconsolata
udevil udevil
udisks2 udisks2
ufw ufw
unarj
unrar
unzip unzip
util-linux util-linux
veracrypt veracrypt
@ -89,6 +96,7 @@ virtualbox-guest-utils
volumeicon volumeicon
wd719x-firmware wd719x-firmware
wimlib wimlib
xarchiver
xf86-input-libinput xf86-input-libinput
xf86-video-amdgpu xf86-video-amdgpu
xf86-video-fbdev xf86-video-fbdev
@ -99,4 +107,5 @@ xorg-xdpyinfo
xorg-xev xorg-xev
xorg-xinit xorg-xinit
xorg-xinput xorg-xinput
zip
zsh zsh

View file

@ -0,0 +1,20 @@
arch-install-scripts
b43-fwcutter
darkhttpd
gpm
grml-zsh-config
grub
irssi
mc
openvpn
ppp
pptpclient
refind-efi
rp-pppoe
smartmontools
speedtouch
testdisk
vim-minimal
vpnc
wvdial
xl2tpd

View file

@ -189,8 +189,10 @@ function update_live_env() {
echo "127.0.1.1 $hostname.localdomain $hostname" >> "$LIVE_DIR/airootfs/etc/hosts" echo "127.0.1.1 $hostname.localdomain $hostname" >> "$LIVE_DIR/airootfs/etc/hosts"
# Live packages # Live packages
sed -i -r 's/^(b43|clonezilla|gpm|grml|refind|testdisk|vim)/#\1/' "$LIVE_DIR/packages.both" while read -r p; do
cat "$ROOT_DIR/.linux_items/packages/live" >> "$LIVE_DIR/packages.both" sed -i "/$p/d" "$LIVE_DIR/packages.both"
done < "$ROOT_DIR/.linux_items/packages/live_remove"
cat "$ROOT_DIR/.linux_items/packages/live_add" >> "$LIVE_DIR/packages.both"
echo "[custom]" >> "$LIVE_DIR/pacman.conf" echo "[custom]" >> "$LIVE_DIR/pacman.conf"
echo "SigLevel = Optional TrustAll" >> "$LIVE_DIR/pacman.conf" echo "SigLevel = Optional TrustAll" >> "$LIVE_DIR/pacman.conf"
echo "Server = file://$REPO_DIR" >> "$LIVE_DIR/pacman.conf" echo "Server = file://$REPO_DIR" >> "$LIVE_DIR/pacman.conf"