2016-10: Retroactive Updates

# Migration to Python started #
  * PoSH has an extreme slowdown for some systems while it runs an optimization
  ** pass for .NET on the first PoSH script execution.
  ** This is reason enough to move to an alternative.

* New additions:
  * User Data Transfer script
    * Will extract from a WIM or copy from a folder
    * Uses wimlib-imagex for images and FastCopy for folders
    * Removes undesired items after transfer/extraction
  * HWiNFO
  * Missing ODD repair registry patch
  * Q-Dir
  * SW Bundle install script

* ConEmu
  * Moving back to ConEmu for better performance.

* Copy-WizardKit
  * Now uses FastCopy

* functions.py
  * Ported init.ps1 to Python using functions.py (from WinPE) as a base

* Launch.cmd
  * Elevating programs/scripts now done using a temp VBScript file
  * Can run Python scripts (using either the 32 or 64 bit runtime)

* transferred_keys.cmd
  * Expanded searched paths

* Misc
  * Lots of variables and files renamed
  * Lots of hard-coded paths are now in variables
    * Should only be set in scripts in %bin%\Scripts
  * Moved a subset of the Diagnostics launchers to a new 'Extras' folder
    * The launchers moved are those that are less-often used
  * Refactored FindBin code to be more concise
  * Renamed "KitDir" "ClientDir" to indicate that it is on the client's system
  * Removed GeForce Experience launcher as it now requires an account
  * Added link to NVIDIA's driver webpage to download the correct driver
  * Removed AMD's Gaming Evolved launcher
    * This is usually bundled with the GPU driver anyway
  * Switched back to ConEmu
  * Variable and script names are now more descriptive
    * i.e. checklist -> final_checklist, and HH -> %kit_dir%
    * (not happy with %kit_dir%, will probably change again)
This commit is contained in:
Alan Mason 2017-11-17 00:53:08 -07:00
parent d9dddebccb
commit b180b42ec9
140 changed files with 4696 additions and 3091 deletions

View file

@ -1,9 +1,15 @@
:: Wizard Kit: Wrapper for launching programs and scripts.
::
:: Some features:
:: * If the OS is 64-bit then the WorkingDir is scanned for a 64-bit version of the programs
:: * Allows for centralized terminal emulation settings management
:: * Allows for smaller "launcher" scripts to be used as they will rely on this script.
@echo off @echo off
:Init :Init
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
color 1b title Wizard Kit: Launcher
title WK Launcher
:Flags :Flags
set admin= set admin=
@ -11,15 +17,28 @@ set max=
set wait= set wait=
for %%f in (%*) do ( for %%f in (%*) do (
if /i "%%f" == "/DEBUG" (@echo on) if /i "%%f" == "/DEBUG" (@echo on)
if /i "%%f" == "/admin" (@set admin=true) if /i "%%f" == "/admin" (set admin=true)
if /i "%%f" == "/max" (@set max=true) if /i "%%f" == "/max" (set max=true)
if /i "%%f" == "/wait" (@set wait=true) if /i "%%f" == "/wait" (set wait=true)
) )
:FindBin
set bin= & pushd "%~dp0"
:FindBinInner
if exist ".bin" goto FindBinDone
if "%~d0\" == "%cd%" goto ErrorNoBin
cd .. & goto FindBinInner
:FindBinDone
set "bin=%cd%\.bin" & popd
:SetVariables :SetVariables
if /i "!PROCESSOR_ARCHITECTURE!" == "AMD64" set "arch=64" if /i "!PROCESSOR_ARCHITECTURE!" == "AMD64" set "arch=64"
set "con=%~dp0\..\cmder_mini\vendor\conemu-maximus5\ConEmu.exe" set "con=%bin%\ConEmu\ConEmu.exe"
if !arch! equ 64 set "con=%~dp0\..\cmder_mini\vendor\conemu-maximus5\ConEmu.exe" set "python=%bin%\Python\x32\python.exe"
if !arch! equ 64 (
set "con=%bin%\ConEmu\ConEmu64.exe"
set "python=%bin%\Python\x64\python.exe"
)
:Launch :Launch
pushd "%2" pushd "%2"
@ -27,6 +46,7 @@ if /i "%1" == "Console" (goto LaunchConsole)
if /i "%1" == "Office" (goto LaunchOfficeSetup) if /i "%1" == "Office" (goto LaunchOfficeSetup)
if /i "%1" == "Program" (goto LaunchProgram) if /i "%1" == "Program" (goto LaunchProgram)
if /i "%1" == "PSScript" (goto LaunchPSScript) if /i "%1" == "PSScript" (goto LaunchPSScript)
if /i "%1" == "PyScript" (goto LaunchPyScript)
goto Usage goto Usage
:LaunchConsole :LaunchConsole
@ -44,7 +64,7 @@ goto Done
:LaunchOfficeSetup :LaunchOfficeSetup
set "prog=%~3" set "prog=%~3"
start "" "%con%" -cmd call "copy_office.cmd" "!prog!" -new_console:n start "" "%con%" -cmd call "%bin%\copy_office.cmd" "!prog!" -new_console:n
goto Done goto Done
:LaunchProgram :LaunchProgram
@ -53,11 +73,12 @@ if !arch! equ 64 (
if exist "!prog:.=64.!" set "prog=!prog:.=64.!" if exist "!prog:.=64.!" set "prog=!prog:.=64.!"
) )
if not exist "!prog!" goto ProgramNotFound if not exist "!prog!" goto ProgramNotFound
if not "%~4" == "" (set "ps_args=-argumentlist '%~4'") if not "%~4" == "" (set "vb_args=%~4")
if defined admin ( if defined admin (
if defined max (set "max=-WindowStyle Maximized") mkdir "%bin%\tmp"
if defined wait (set "wait=-Wait") echo Set UAC = CreateObject^("Shell.Application"^) > "%bin%\tmp\Elevate.vbs"
powershell -command "& {start '!prog!' !ps_args! -verb runas !max! !wait!}" echo UAC.ShellExecute "!prog!", "!vb_args!", "", "runas", 1 >> "%bin%\tmp\Elevate.vbs"
cscript //nologo "%bin%\tmp\Elevate.vbs"
) else ( ) else (
if defined max (set "max=/max") if defined max (set "max=/max")
if defined wait (set "wait=/wait") if defined wait (set "wait=/wait")
@ -70,18 +91,30 @@ set "script=%~3"
if not exist "!script!" goto ScriptNotFound if not exist "!script!" goto ScriptNotFound
if defined wait (set "wait=-Wait") if defined wait (set "wait=-Wait")
if defined admin ( if defined admin (
start "" "%con%" -cmd PowerShell -ExecutionPolicy Bypass -File "!script!" -NoProfile -new_console:a !wait! start "" "%con%" -run PowerShell -ExecutionPolicy Bypass -File "!script!" -NoProfile -new_console:a !wait!
) else ( ) else (
start "" "%con%" -cmd PowerShell -ExecutionPolicy Bypass -File "!script!" -NoProfile !wait! start "" "%con%" -run PowerShell -ExecutionPolicy Bypass -File "!script!" -NoProfile !wait!
)
goto Done
:LaunchPyScript
set "script=%~3"
if not exist "!script!" goto ScriptNotFound
if defined admin (
start "" "%con%" -run "%python%" "!script!" -new_console:a -new_console:n
) else (
start "" "%con%" -run "%python%" "!script!" -new_console:n
) )
goto Done goto Done
:Usage :Usage
echo. echo.
echo.Usage: Launch.cmd Console "Working Dir" "Program" "Args" [/admin] echo.Usage: Launch.cmd Console "Working Dir" "Program" "Args" [/admin]
echo. Launch.cmd Office "Working Dir" "Product" ""
echo. Launch.cmd Program "Working Dir" "Program" "Args" [/admin] [/max] [/wait] echo. Launch.cmd Program "Working Dir" "Program" "Args" [/admin] [/max] [/wait]
echo. Launch.cmd PSScript "Working Dir" "Program" "" [/admin] [/wait] echo. Launch.cmd PSScript "Working Dir" "Program" "" [/admin] [/wait]
echo. (Args should be empty when using PSScript) echo. Launch.cmd PyScript "Working Dir" "Program" "" [/admin]
echo. (Args should be empty when using PSScript or PyScript)
echo. echo.
goto Abort goto Abort
@ -109,5 +142,4 @@ goto Exit
:Exit :Exit
popd popd
color
endlocal endlocal

View file

@ -1,70 +0,0 @@
# WK-Activate-w-BIOS-Key
#
## Finds the BIOS key using ProduKey and attempts to activate Windows with it
## NOTE: This script doesn't check if the key is accepted before activation.
## Init ##
$wd = $(Split-Path $MyInvocation.MyCommand.Path)
pushd "$wd"
. .\init.ps1
clear
$host.UI.RawUI.WindowTitle = "WK Activation Tool"
$logpath = "$WKPath\Info\$date"
md "$logpath" 2>&1 | out-null
$log = "$logpath\Activation.log"
$bin = (Get-Item $wd).Parent.FullName
$found_key = $false
$sz = "$bin\7-Zip\7za.exe"
$produkey = "$bin\tmp\ProduKey.exe"
# OS Check
. .\os_check.ps1
if ($arch -eq 64) {
$sz = "$bin\7-Zip\7za64.exe"
$produkey = "$bin\tmp\ProduKey64.exe"
}
## Extract ProduKey
md "$bin\tmp" 2>&1 | out-null
start -wait $sz -argumentlist @("e", "$bin\ProduKey.7z", "-otmp", "-aoa", "-pAbracadabra", "-bsp0", "-bso0") -workingdirectory "$bin" -nonewwindow
rm "$bin\tmp\ProduKey*.cfg"
sleep -s 1
## Get Key ##
$produkey_args = @(
"/nosavereg",
"/scomma", "$logpath\keys.csv",
"/WindowsKeys", "1",
"/OfficeKeys", "0",
"/IEKeys", "0",
"/SQLKeys", "0",
"/ExchangeKeys", "0"
)
start -wait $produkey -argumentlist $produkey_args -workingdirectory "$bin\tmp"
$keys = import-csv -header ("Name", "ID", "Key") "$logpath\keys.csv"
## Find BIOS Key and activate Windows with it
foreach ($k in $keys) {
$name = $k.Name
$key = $k.Key
if ($name -match 'BIOS' -and $key -match '^(\w{5}-\w{5}-\w{5}-\w{5}-\w{5})$') {
# NOTE: Assuming first match is correct and skip everything afterwards
$found = $true
wk-write "$name key found: $key" "$log"
if (ask " Activate Windows using this key?" "$log") {
start -wait "cscript.exe" -argumentlist @("slmgr.vbs", "/ipk", "$key", "//nologo") -nonewwindow -workingdirectory "$windir\System32"
start -wait "cscript.exe" -argumentlist @("slmgr.vbs", "/ato", "//nologo") -nonewwindow -workingdirectory "$windir\System32"
start -wait "cscript.exe" -argumentlist @("slmgr.vbs", "/xpr", "//nologo") -nonewwindow -workingdirectory "$windir\System32"
}
break
}
}
## Print error if necessary
if (! $found) {
wk-error "BIOS Key not found." "$log"
}
## Done ##
popd
pause "Press Enter to exit..."

109
.bin/Scripts/activate.py Normal file
View file

@ -0,0 +1,109 @@
# Wizard Kit: Activate Windows using various methods
import csv
import os
import re
import subprocess
# Init
os.chdir(os.path.dirname(os.path.realpath(__file__)))
os.system('title Wizard Kit: Windows Activation Tool')
from functions import *
vars = init_vars()
vars_os = init_vars_os()
vars['ProduKey'] = '{BinDir}\\tmp\\ProduKey.exe'.format(**vars)
vars['SevenZip'] = '{BinDir}\\7-Zip\\7za.exe'.format(**vars)
if vars_os['Arch'] == 64:
vars['SevenZip'] = vars['SevenZip'].replace('7za.exe', '7za64.exe')
vars['ProduKey'] = vars['ProduKey'].replace('ProduKey.exe', 'ProduKey64.exe')
def abort():
print_warning('Aborted.')
exit_script()
def exit_script():
pause("Press Enter to exit...")
quit()
def extract_produkey():
"""Extract ProduKey and remove stale configuration file(s)."""
lolwut = run_program(vars['SevenZip'], ['e', '{BinDir}\\ProduKey.7z'.format(**vars), '-o{TmpDir}'.format(**vars), '-pAbracadabra', '-aoa', '-bsp0', '-bso0'], check=False)
_cwd = os.getcwd()
os.chdir('{TmpDir}'.format(**vars))
for _f in ['ProduKey.cfg', 'ProduKey64.cfg']:
try:
os.remove(_f)
except FileNotFoundError:
pass
os.chdir(_cwd)
def activate_with_bios():
"""Attempt to activate Windows with a key stored in the BIOS."""
extract_produkey()
_args = [
'/nosavereg',
'/scomma', '{TmpDir}\\keys.csv'.format(**vars),
'/WindowsKeys', '1',
'/OfficeKeys', '0',
'/IEKeys', '0',
'/SQLKeys', '0',
'/ExchangeKeys', '0']
try:
run_program(vars['ProduKey'], _args, pipe=False)
with open ('{TmpDir}\\keys.csv'.format(**vars), newline='') as key_file:
key_reader = csv.reader(key_file)
_key_found = False
for key in key_reader:
if 'BIOS' in key[0] and re.match(r'^\w{5}-\w{5}-\w{5}-\w{5}-\w{5}$', key[2]):
_key_found = True
print_standard('BIOS key found, installing...')
run_program('cscript {WINDIR}\\System32\\slmgr.vbs /ipk {pkey} //nologo'.format(**vars['Env'], pkey=key[2]), check=False, shell=True)
sleep(15)
print_standard('Attempting activation...')
run_program('cscript {WINDIR}\\System32\\slmgr.vbs /ato //nologo'.format(**vars['Env']), check=False, shell=True)
sleep(15)
# Open system properties for user verification
subprocess.Popen(['control', 'system'])
break
if not _key_found:
print_error('ERROR: BIOS not key found.')
abort()
except subprocess.CalledProcessError:
print_error('ERROR: Failed to extract BIOS key')
abort()
def activate_with_hive():
"""Scan any transferred software hives for Windows keys and attempt activation."""
# extract_produkey()
pass
if __name__ == '__main__':
# Bail early if already activated
if 'The machine is permanently activated.' in vars_os['Activation']:
print_info('This system is already activated')
# exit_script()
# Determine activation method
activation_methods = [
{'Name': 'Activate with BIOS key', 'Function': activate_with_bios},
{'Name': 'Activate with transferred SW hive', 'Function': activate_with_hive, 'Disabled': True},
]
if not re.match(r'^(8|10)$', vars_os['Version']):
activation_methods[0]['Disabled'] = True
actions = [
{'Name': 'Quit', 'Letter': 'Q'},
]
# Main loop
while True:
selection = menu_select('Wizard Kit: Windows Activation Menu', activation_methods, actions)
if (selection.isnumeric()):
activation_methods[int(selection)-1]['Function']()
break
elif selection == 'Q':
exit_script()
# Quit
print_success('Done.')
exit_script()

View file

@ -1,3 +1,5 @@
# Wizard Kit: List battery health by checking the current max charge against the original value
param([string]$log = "Battery.log") param([string]$log = "Battery.log")
if ($log -match '^Battery.log$') { if ($log -match '^Battery.log$') {
$log = "{0}\Battery.log" -f (gci env:temp).value $log = "{0}\Battery.log" -f (gci env:temp).value
@ -13,16 +15,16 @@ try {
$message = " Last full charge was {0:N0}% of designed capacity" -f $last_percentage $message = " Last full charge was {0:N0}% of designed capacity" -f $last_percentage
if ($last_percentage -eq 100) { if ($last_percentage -eq 100) {
wk-warn " Unable to determine battery health" "$log" WK-warn " Unable to determine battery health" "$log"
} elseif ($last_percentage -ge 90) { } elseif ($last_percentage -ge 90) {
wk-write $message "$log" WK-write $message "$log"
} elseif ($last_percentage -ge 50) { } elseif ($last_percentage -ge 50) {
wk-warn $message "$log" WK-warn $message "$log"
} else { } else {
wk-error $message "$log" WK-error $message "$log"
} }
} catch { } catch {
wk-warn " No battery detected" "$log" WK-warn " No battery detected" "$log"
} }
## Done ## ## Done ##

View file

@ -8,7 +8,7 @@ for %%f in (%*) do (
) )
:Init :Init
title WK CheckDisk title Wizard Kit: CheckDisk
color 1b color 1b
:ScheduleCheck :ScheduleCheck

View file

@ -1,14 +1,14 @@
# WK-Check Disk # Wizard Kit: Check Disk
## Init ## ## Init ##
$wd = $(Split-Path $MyInvocation.MyCommand.Path) $wd = $(Split-Path $MyInvocation.MyCommand.Path)
pushd "$wd" pushd "$wd"
. .\init.ps1 . .\init.ps1
clear clear
$host.UI.RawUI.WindowTitle = "WK Check Disk Tool" $host.UI.RawUI.WindowTitle = "Wizard Kit: Check Disk Tool"
# OS Check # OS Check
. .\os_check.ps1 . .\check_os.ps1
## Run Scan (read-only) ## ## Run Scan (read-only) ##
write-host "$systemdrive (System Drive)" write-host "$systemdrive (System Drive)"

View file

@ -1,14 +1,14 @@
# WK-Check Disk # Wizard Kit: Check Disk
## Init ## ## Init ##
$wd = $(Split-Path $MyInvocation.MyCommand.Path) $wd = $(Split-Path $MyInvocation.MyCommand.Path)
pushd "$wd" pushd "$wd"
. .\init.ps1 . .\init.ps1
clear clear
$host.UI.RawUI.WindowTitle = "WK Check Disk Tool" $host.UI.RawUI.WindowTitle = "Wizard Kit: Check Disk Tool"
# OS Check # OS Check
. .\os_check.ps1 . .\check_os.ps1
## Run Scan (fix) ## ## Run Scan (fix) ##
write-host "$systemdrive (System Drive)" write-host "$systemdrive (System Drive)"

View file

@ -1,6 +1,4 @@
# WK-OS Check # Wizard Kit: Set some OS specific variables.
#
# Set some OS specific variables.
$win_info = gp hklm:"\SOFTWARE\Microsoft\Windows NT\CurrentVersion" $win_info = gp hklm:"\SOFTWARE\Microsoft\Windows NT\CurrentVersion"
if ($win_info.CurrentVersion -match "6.0") { if ($win_info.CurrentVersion -match "6.0") {
@ -14,9 +12,7 @@ if ($win_info.CurrentVersion -match "6.0") {
$win_version = "8" $win_version = "8"
} elseif ($win_info.CurrentBuildNumber -match "9600") { } elseif ($win_info.CurrentBuildNumber -match "9600") {
$win_version = "8" $win_version = "8"
} elseif ($win_info.CurrentBuildNumber -match "10240") { } elseif ($win_info.CurrentBuildNumber -ge "10240") {
$win_version = "10"
} elseif ($win_info.CurrentBuildNumber -match "10586") {
$win_version = "10" $win_version = "10"
} }
} }
@ -39,10 +35,14 @@ $arch = $arch -ireplace 'AMD64', '64'
# 6.3.9200 # 6.3.9200
# === 8.1u == # === 8.1u ==
# 6.3.9600 # 6.3.9600
# === 10 == # === 10 v1507 "Threshold 1" ==
# 6.3.10240 # 6.3.10240
# === 10 v1511 == # === 10 v1511 "Threshold 2" ==
# 6.3.10586 # 6.3.10586
# === 10 v1607 "Anniversary Update" "Redstone 1" ==
# 6.3.14393
# === 10 v____ "Redstone 2" ==
# 6.3.
$os_name = $win_info.ProductName $os_name = $win_info.ProductName
$os_name += " " + $win_info.CSDVersion $os_name += " " + $win_info.CSDVersion
@ -51,6 +51,8 @@ if ($win_info.CurrentBuild -match "9600") {
$os_name += " Update" $os_name += " Update"
} elseif ($win_info.CurrentBuild -match "10586") { } elseif ($win_info.CurrentBuild -match "10586") {
$os_name += " Release 1511" $os_name += " Release 1511"
} elseif ($win_info.CurrentBuild -match "14393") {
$os_name += " Release 1607 Anniversary Update"
} }
# Get activation status # Get activation status

View file

@ -109,21 +109,6 @@ if (test-path "$programfiles\SUPERAntiSpyware") {
} }
} }
## Block Windows 10 ##
if ($win_version -notmatch '^10$') {
# Kill GWX
taskkill /f /im gwx.exe
# Block upgrade via registry
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\OSUpgrade" -Force 2>&1 | out-null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\OSUpgrade" -Name "AllowOSUpgrade" -Value 0 -Type "DWord" | out-null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\OSUpgrade" -Name "ReservationsAllowed" -Value 0 -Type "DWord" | out-null
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Gwx" -Force 2>&1 | out-null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Gwx" -Name "DisableGwx" -Value 1 -Type "DWord" | out-null
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Force 2>&1 | out-null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DisableOSUpgrade" -Value 1 -Type "DWord" | out-null
}
## Summary ## ## Summary ##
wk-write "" "$log" wk-write "" "$log"
wk-write "Starting SW Checklist" "$log" wk-write "Starting SW Checklist" "$log"
@ -136,14 +121,14 @@ if (!(test-path "$logpath\Registry")) {
} }
# AIDA64 # AIDA64
if (!(test-path "$logpath\aida-keys.txt")) { if (!(test-path "$logpath\keys-aida64.txt")) {
wk-write "* Running AIDA64 (Product Keys)" "$log" wk-write "* Running AIDA64 (Product Keys)" "$log"
start -wait "$bin\AIDA64\aida64.exe" -argumentlist @("/R", "$logpath\aida-keys.txt", "/CUSTOM", "$bin\AIDA64\licenses.rpf", "/TEXT", "/SILENT", "/SAFEST") -workingdirectory "$bin\AIDA64" start -wait "$bin\AIDA64\aida64.exe" -argumentlist @("/R", "$logpath\keys-aida64.txt", "/CUSTOM", "$bin\AIDA64\licenses.rpf", "/TEXT", "/SILENT", "/SAFEST") -workingdirectory "$bin\AIDA64"
} }
if (!(test-path "$logpath\aida-installed_programs.txt")) { if (!(test-path "$logpath\program_list-aida64.txt")) {
wk-write "* Running AIDA64 (SW listing)" "$log" wk-write "* Running AIDA64 (SW listing)" "$log"
start -wait "$bin\AIDA64\aida64.exe" -argumentlist @("/R", "$logpath\aida-installed_programs.txt", "/CUSTOM", "$bin\AIDA64\installed_programs.rpf", "/TEXT", "/SILENT", "/SAFEST") -workingdirectory "$bin\AIDA64" start -wait "$bin\AIDA64\aida64.exe" -argumentlist @("/R", "$logpath\program_list-aida64.txt", "/CUSTOM", "$bin\AIDA64\installed_programs.rpf", "/TEXT", "/SILENT", "/SAFEST") -workingdirectory "$bin\AIDA64"
} }
if (!(test-path "$logpath\aida64.htm")) { if (!(test-path "$logpath\aida64.htm")) {
@ -151,6 +136,22 @@ if (!(test-path "$logpath\aida64.htm")) {
start "$bin\AIDA64\aida64.exe" -argumentlist @("/R", "$logpath\aida64.html", "/CUSTOM", "$bin\AIDA64\full.rpf", "/HTML", "/SILENT") -workingdirectory "$bin\AIDA64" start "$bin\AIDA64\aida64.exe" -argumentlist @("/R", "$logpath\aida64.html", "/CUSTOM", "$bin\AIDA64\full.rpf", "/HTML", "/SILENT") -workingdirectory "$bin\AIDA64"
} }
# SIV
if (!(test-path "$logpath\keys-siv.txt")) {
wk-write "* Running SIV (Product Keys)" "$log"
start -wait "$siv" -argumentlist @("-KEYS", "-LOCAL", "-UNICODE", "-SAVE=[product-ids]=$logpath\keys-siv.txt") -workingdirectory "$bin\SIV"
}
if (!(test-path "$logpath\program_list-siv.txt")) {
wk-write "* Running SIV (SW listing)" "$log"
start -wait "$siv" -argumentlist @("-KEYS", "-LOCAL", "-UNICODE", "-SAVE=[software]=$logpath\program_list-siv.txt") -workingdirectory "$bin\SIV"
}
if (!(test-path "$logpath\aida64.htm")) {
wk-write "* Running SIV (Full listing) in background" "$log"
start -wait "$siv" -argumentlist @("-KEYS", "-LOCAL", "-UNICODE", "-SAVE=$logpath\siv.txt") -workingdirectory "$bin\SIV"
}
# Product Keys # Product Keys
## Extract ## Extract
md "$bin\tmp" 2>&1 | out-null md "$bin\tmp" 2>&1 | out-null
@ -159,9 +160,9 @@ rm "$bin\tmp\ProduKey*.cfg"
sleep -s 1 sleep -s 1
## Run ## Run
if (!(test-path "$logpath\keys.txt")) { if (!(test-path "$logpath\keys-produkey.txt")) {
wk-write "* Saving Product Keys" "$log" wk-write "* Saving Product Keys" "$log"
start -wait $produkey -argumentlist @("/nosavereg", "/stext", "$logpath\keys.txt") -workingdirectory "$bin\tmp" start -wait $produkey -argumentlist @("/nosavereg", "/stext", "$logpath\keys-produkey.txt") -workingdirectory "$bin\tmp"
} }
# User Data # User Data
@ -252,7 +253,7 @@ out-file -encoding "ASCII" -filepath "$wd\psftp_batch" -inputobject $batch
# Upload files # Upload files
$psftp_args = @( $psftp_args = @(
"-noagent", "-noagent",
"-i", "$bin\PuTTY\Wizard-Kit.ppk", "-i", "$bin\PuTTY\WK.ppk",
"$diag_user@$diag_server", "$diag_user@$diag_server",
"-b", "$wd\psftp_batch") "-b", "$wd\psftp_batch")
start "$bin\PuTTY\PSFTP.exe" -argumentlist $psftp_args -wait -windowstyle minimized start "$bin\PuTTY\PSFTP.exe" -argumentlist $psftp_args -wait -windowstyle minimized

View file

@ -8,57 +8,68 @@ for %%f in (%*) do (
:Init :Init
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
title WK Office Installer title Wizard Kit: Office Installer
color 1b color 1b
echo Initializing... echo Initializing...
set "pd=%cd%"
set "NAS=\\10.0.0.10\Office"
set "dest=%systemdrive%\WK\Office"
set "source=%~1"
pushd "!NAS!"
:VerifyCopyAndRun :FindBin
if /i "!source!" == "" (goto UsageError) set bin= & pushd "%~dp0"
:FindBinInner
if exist ".bin" goto FindBinDone
if "%~d0\" == "%cd%" goto ErrorNoBin
cd .. & goto FindBinInner
:FindBinDone
set "bin=%cd%\.bin" & popd
if /i "!source:~-3,3!" == "exe" ( :SetVariables
if not exist "!source!" goto OfficeNotFound if /i "!PROCESSOR_ARCHITECTURE!" == "AMD64" set "arch=64"
call :CopyFile "!source!" set "fastcopy=%bin%\FastCopy\FastCopy.exe"
) else if /i "!source:~-3,3!" == "msi" ( if !arch! equ 64 (
if not exist "!source!" goto OfficeNotFound set "fastcopy=%bin%\FastCopy\FastCopy64.exe"
call :CopyFile "!source!"
) else (
if not exist "!source!\setup.exe" goto OfficeNotFound
call :CopyFolder "!source!"
) )
set "fastcopy_args=/cmd=diff /no_ui /auto_close"
rem Create %client_dir%\Office
call "%bin%\Scripts\init_client_dir.cmd" /Office
set "product=%~1"
set "source=\\10.0.0.10\Office\%product%"
set "dest=%client_dir%\Office"
:FileOrFolder
if /i "%source%" == "" goto UsageError
if /i "%source:~-3,3%" == "exe" goto CopyFile
if /i "%source:~-3,3%" == "msi" goto CopyFile
goto CopyFolder
:CopyFile
if not exist "%source%" goto OfficeNotFound
echo Copying installer...
start "" /wait "%fastcopy%" %fastcopy_args% "%source%" /to="%dest%\%product:0,4%\"
:: Run Setup ::
start "" "%dest%\%product:0,4%\%product:~5%"
goto Done goto Done
:: Sub-routines ::
:CopyFile
set "file=%~1"
echo Copying files...
mkdir "!dest!" > nul 2>&1
robocopy /r:3 /w:0 "!file:~0,4!" "!dest!" "!file:~5!"
:: Run Setup ::
start "" "!dest!\!file:~5!"
goto :EOF
:CopyFolder :CopyFolder
set "folder=%~1" if not exist "%source%\setup.exe" goto OfficeNotFound
mkdir "!dest!\!folder!" > nul 2>&1 echo Copying setup files...
robocopy /s /r:3 /w:0 "!folder!" "!dest!\!folder!" start "" /wait "%fastcopy%" %fastcopy_args% "%source%" /to="%dest%\%product:0,4%\"
:: Run Setup :: :: Run Setup ::
if exist "!dest!\!folder!\configuration.xml" ( if exist "%dest%\%product:0,4%\configuration.xml" (
pushd "!dest!\!folder!" pushd "%dest%\%product:0,4%"
start "" "setup.exe" /configure start "" "setup.exe" /configure
popd popd
) else ( ) else (
start "" "!dest!\!folder!\setup.exe" start "" "%dest%\%product:0,4%\setup.exe"
) )
goto :EOF goto Done
:: Errors :: :: Errors ::
:ErrorNoBin
popd
echo ERROR: ".bin" folder not found.
goto Abort
:OfficeNotFound :OfficeNotFound
echo ERROR: "!source!" not found. echo ERROR: "%source%" not found.
goto Abort goto Abort
:UsageError :UsageError
@ -71,21 +82,16 @@ goto Abort
color 4e color 4e
echo. echo.
echo Aborted. echo Aborted.
echo.
echo Press any key to exit...
pause>nul
goto Exit goto Exit
:Done :Done
set silent=true
echo. echo.
echo Done. echo Done.
goto Exit goto Exit
:Exit :Exit
rem if not defined silent (
rem echo Press any key to exit...
rem pause>nul
rem )
popd
color color
endlocal endlocal
:EOF

View file

@ -1,11 +1,11 @@
# WK-Checklist # Wizard Kit: Diagnostics Tool
## Init ## ## Init ##
$wd = $(Split-Path $MyInvocation.MyCommand.Path) $wd = $(Split-Path $MyInvocation.MyCommand.Path)
pushd "$wd" pushd "$wd"
. .\init.ps1 . .\init.ps1
clear clear
$host.UI.RawUI.WindowTitle = "WK Diagnostics Tool" $host.UI.RawUI.WindowTitle = "Wizard Kit: Diagnostics Tool"
$backup_path = "$WKPath\Backups\$username\$date" $backup_path = "$WKPath\Backups\$username\$date"
$logpath = "$WKPath\Info\$date" $logpath = "$WKPath\Info\$date"
md "$backup_path" 2>&1 | out-null md "$backup_path" 2>&1 | out-null
@ -18,6 +18,7 @@ $diag_user = "wkdiag"
$conemu = "$bin\cmder_mini\vendor\conemu-maximus5\ConEmu.exe" $conemu = "$bin\cmder_mini\vendor\conemu-maximus5\ConEmu.exe"
$sz = "$bin\7-Zip\7za.exe" $sz = "$bin\7-Zip\7za.exe"
$produkey = "$bin\tmp\ProduKey.exe" $produkey = "$bin\tmp\ProduKey.exe"
$siv = "$bin\SIV\SIV.exe"
# OS Check # OS Check
. .\os_check.ps1 . .\os_check.ps1
@ -25,6 +26,7 @@ if ($arch -eq 64) {
$conemu = "$bin\cmder_mini\vendor\conemu-maximus5\ConEmu64.exe" $conemu = "$bin\cmder_mini\vendor\conemu-maximus5\ConEmu64.exe"
$sz = "$bin\7-Zip\7za64.exe" $sz = "$bin\7-Zip\7za64.exe"
$produkey = "$bin\tmp\ProduKey64.exe" $produkey = "$bin\tmp\ProduKey64.exe"
$siv = "$bin\SIV\SIV64.exe"
} }
# Set Service Order # Set Service Order
@ -187,14 +189,14 @@ if (!(test-path "$logpath\autoruns.arn")) {
} }
# AIDA64 # AIDA64
if (!(test-path "$logpath\aida-keys.txt")) { if (!(test-path "$logpath\keys-aida64.txt")) {
wk-write "* Running AIDA64 (Product Keys)" "$log" wk-write "* Running AIDA64 (Product Keys)" "$log"
start -wait "$bin\AIDA64\aida64.exe" -argumentlist @("/R", "$logpath\aida-keys.txt", "/CUSTOM", "$bin\AIDA64\licenses.rpf", "/TEXT", "/SILENT", "/SAFEST") -workingdirectory "$bin\AIDA64" start -wait "$bin\AIDA64\aida64.exe" -argumentlist @("/R", "$logpath\keys-aida64.txt", "/CUSTOM", "$bin\AIDA64\licenses.rpf", "/TEXT", "/SILENT", "/SAFEST") -workingdirectory "$bin\AIDA64"
} }
if (!(test-path "$logpath\aida-installed_programs.txt")) { if (!(test-path "$logpath\program_list-aida64.txt")) {
wk-write "* Running AIDA64 (SW listing)" "$log" wk-write "* Running AIDA64 (SW listing)" "$log"
start -wait "$bin\AIDA64\aida64.exe" -argumentlist @("/R", "$logpath\aida-installed_programs.txt", "/CUSTOM", "$bin\AIDA64\installed_programs.rpf", "/TEXT", "/SILENT", "/SAFEST") -workingdirectory "$bin\AIDA64" start -wait "$bin\AIDA64\aida64.exe" -argumentlist @("/R", "$logpath\program_list-aida64.txt", "/CUSTOM", "$bin\AIDA64\installed_programs.rpf", "/TEXT", "/SILENT", "/SAFEST") -workingdirectory "$bin\AIDA64"
} }
if (!(test-path "$logpath\aida64.htm")) { if (!(test-path "$logpath\aida64.htm")) {
@ -202,6 +204,22 @@ if (!(test-path "$logpath\aida64.htm")) {
start "$bin\AIDA64\aida64.exe" -argumentlist @("/R", "$logpath\aida64.html", "/CUSTOM", "$bin\AIDA64\full.rpf", "/HTML", "/SILENT") -workingdirectory "$bin\AIDA64" start "$bin\AIDA64\aida64.exe" -argumentlist @("/R", "$logpath\aida64.html", "/CUSTOM", "$bin\AIDA64\full.rpf", "/HTML", "/SILENT") -workingdirectory "$bin\AIDA64"
} }
# SIV
if (!(test-path "$logpath\keys-siv.txt")) {
wk-write "* Running SIV (Product Keys)" "$log"
start -wait "$siv" -argumentlist @("-KEYS", "-LOCAL", "-UNICODE", "-SAVE=[product-ids]=$logpath\keys-siv.txt") -workingdirectory "$bin\SIV"
}
if (!(test-path "$logpath\program_list-siv.txt")) {
wk-write "* Running SIV (SW listing)" "$log"
start -wait "$siv" -argumentlist @("-KEYS", "-LOCAL", "-UNICODE", "-SAVE=[software]=$logpath\program_list-siv.txt") -workingdirectory "$bin\SIV"
}
if (!(test-path "$logpath\aida64.htm")) {
wk-write "* Running SIV (Full listing) in background" "$log"
start -wait "$siv" -argumentlist @("-KEYS", "-LOCAL", "-UNICODE", "-SAVE=$logpath\siv.txt") -workingdirectory "$bin\SIV"
}
# Product Keys # Product Keys
## Extract ## Extract
md "$bin\tmp" 2>&1 | out-null md "$bin\tmp" 2>&1 | out-null
@ -210,24 +228,9 @@ rm "$bin\tmp\ProduKey*.cfg"
sleep -s 1 sleep -s 1
## Run ## Run
if (!(test-path "$logpath\keys.txt")) { if (!(test-path "$logpath\keys-produkey.txt")) {
wk-write "* Saving Product Keys" "$log" wk-write "* Saving Product Keys" "$log"
start -wait $produkey -argumentlist @("/nosavereg", "/stext", "$logpath\keys.txt") -workingdirectory "$bin\tmp" start -wait $produkey -argumentlist @("/nosavereg", "/stext", "$logpath\keys-produkey.txt") -workingdirectory "$bin\tmp"
}
# Block Windows 10 #
if ($win_version -notmatch '^10$') {
# Kill GWX
taskkill /f /im gwx.exe
# Block upgrade via registry
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\OSUpgrade" -Force 2>&1 | out-null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\OSUpgrade" -Name "AllowOSUpgrade" -Value 0 -Type "DWord" | out-null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\OSUpgrade" -Name "ReservationsAllowed" -Value 0 -Type "DWord" | out-null
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Gwx" -Force 2>&1 | out-null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Gwx" -Name "DisableGwx" -Value 1 -Type "DWord" | out-null
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Force 2>&1 | out-null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DisableOSUpgrade" -Value 1 -Type "DWord" | out-null
} }
## Summary ## ## Summary ##
@ -254,7 +257,7 @@ wk-write "" "$log"
# List installed Office programs # List installed Office programs
wk-write "==== Installed Office Programs ====" "$log" wk-write "==== Installed Office Programs ====" "$log"
$installed_office = (gc "$logpath\aida-installed_programs.txt") -imatch 'Office' | sort $installed_office = (gc "$logpath\program_list-aida64.txt") -imatch 'Office' | sort
foreach ($_ in $installed_office) { foreach ($_ in $installed_office) {
$_ = $_ -ireplace '^\s+(.*?)\s\s+.*', '$1' $_ = $_ -ireplace '^\s+(.*?)\s\s+.*', '$1'
wk-write " $_" "$log" wk-write " $_" "$log"
@ -263,7 +266,7 @@ wk-write "" "$log"
# Saved keys # Saved keys
wk-write "==== Found Product Keys ====" "$log" wk-write "==== Found Product Keys ====" "$log"
$keys = (gc "$logpath\keys.txt") -imatch '(product.name)' $keys = (gc "$logpath\keys-produkey.txt") -imatch '(product.name)'
foreach ($_ in $keys) { foreach ($_ in $keys) {
$_ = $_ -ireplace '^product name\s+: ', ' ' $_ = $_ -ireplace '^product name\s+: ', ' '
wk-write $_ "$log" wk-write $_ "$log"
@ -333,7 +336,7 @@ out-file -encoding "ASCII" -filepath "$wd\psftp_batch" -inputobject $batch
## Upload files ## Upload files
$psftp_args = @( $psftp_args = @(
"-noagent", "-noagent",
"-i", "$bin\PuTTY\Wizard-Kit.ppk", "-i", "$bin\PuTTY\WK.ppk",
"$diag_user@$diag_server", "$diag_user@$diag_server",
"-b", "$wd\psftp_batch") "-b", "$wd\psftp_batch")
start "$bin\PuTTY\PSFTP.exe" -argumentlist $psftp_args -wait -windowstyle minimized start "$bin\PuTTY\PSFTP.exe" -argumentlist $psftp_args -wait -windowstyle minimized

View file

@ -1,20 +1,20 @@
# WK-DISM wrapper # Wizard Kit: DISM wrapper
## Init ## ## Init ##
$wd = $(Split-Path $MyInvocation.MyCommand.Path) $wd = $(Split-Path $MyInvocation.MyCommand.Path)
pushd "$wd" pushd "$wd"
. .\init.ps1 . .\init.ps1
clear clear
$host.UI.RawUI.WindowTitle = "WK DISM wrapper" $host.UI.RawUI.WindowTitle = "Wizard Kit: DISM wrapper"
$logpath = "$WKPath\Info\$date" $logpath = "$ClientPath\Info\$date"
md "$logpath" 2>&1 | out-null md "$logpath" 2>&1 | out-null
$log = "$logpath\DISM.log" $log = "$logpath\DISM.log"
$bin = (Get-Item $wd).Parent.FullName $bin = (Get-Item $wd).Parent.FullName
# OS Check # OS Check
. .\os_check.ps1 . .\check_os.ps1
if ($win_version -notmatch '^8|10$') { if ($win_version -notmatch '^8|10$') {
wk-error "This tool is not intended for $os_name." WK-error "This tool is not intended for $os_name."
} else { } else {
# Get mode # Get mode
$modes = @( $modes = @(

View file

@ -1,11 +1,11 @@
# WK-Enter SafeMode # Wizard Kit: Enter SafeMode by setting it as {default}
## Init ## ## Init ##
$wd = $(Split-Path $MyInvocation.MyCommand.Path) $wd = $(Split-Path $MyInvocation.MyCommand.Path)
pushd "$wd" pushd "$wd"
. .\init.ps1 . .\init.ps1
clear clear
$host.UI.RawUI.WindowTitle = "WK SafeMode Tool" $host.UI.RawUI.WindowTitle = "Wizard Kit: SafeMode Tool"
# Ask user # Ask user
if (!(ask "Enable booting to SafeMode (with Networking)?")) { if (!(ask "Enable booting to SafeMode (with Networking)?")) {

View file

@ -1,11 +1,11 @@
# WK-Exit SafeMode # Wizard Kit: Exit SafeMode removing safeboot from {default}
## Init ## ## Init ##
$wd = $(Split-Path $MyInvocation.MyCommand.Path) $wd = $(Split-Path $MyInvocation.MyCommand.Path)
pushd "$wd" pushd "$wd"
. .\init.ps1 . .\init.ps1
clear clear
$host.UI.RawUI.WindowTitle = "WK SafeMode Tool" $host.UI.RawUI.WindowTitle = "Wizard Kit: SafeMode Tool"
# Ask user # Ask user
if (!(ask "Disable booting to SafeMode?")) { if (!(ask "Disable booting to SafeMode?")) {

View file

@ -0,0 +1,291 @@
# Wizard Kit: Final Checklist
## Init ##
$wd = $(Split-Path $MyInvocation.MyCommand.Path)
pushd "$wd"
. .\init.ps1
clear
$host.UI.RawUI.WindowTitle = "Wizard Kit: Checklist Tool"
$logpath = "$ClientPath\Info\$date"
md "$logpath" 2>&1 | out-null
$log = "$logpath\Checklist.log"
$bin = (Get-Item $wd).Parent.FullName
$diag_dest = "/srv/Diagnostics"
$diag_server = "10.0.0.10"
$diag_user = "WKdiag"
$sz = "$bin\7-Zip\7za.exe"
$produkey = "$bin\tmp\ProduKey.exe"
# OS Check
. .\check_os.ps1
if ($arch -eq 64) {
$sz = "$bin\7-Zip\7za64.exe"
$produkey = "$bin\tmp\ProduKey64.exe"
}
# Set Service Order
while ($service_order -notmatch '^\d+') {
$service_order = read-host "Please enter the service order number"
if ($service_order -notmatch '^\d+') {
write-host "ERROR: Invalid SO`r`n" -foreground "red"
}
}
clear
out-file -filepath "$logpath\TicketNumber" -inputobject $service_order -append
WK-write "Starting final checklist for Ticket #$service_order" "$log"
WK-write "" "$log"
## Cleanup ##
WK-write "Pre-Checklist Cleanup" "$log"
# Uninstall AdwCleaner
if (test-path "$systemdrive\AdwCleaner") {
try {
WK-write "* Uninstalling AdwCleaner" "$log"
move-item "$systemdrive\AdwCleaner\*log" "$ClientPath\Info\"
move-item "$systemdrive\AdwCleaner\*txt" "$ClientPath\Info\"
if (test-path "$systemdrive\AdwCleaner\Quarantine") {
move-item "$systemdrive\AdwCleaner\Quarantine" "$ClientPath\Quarantine\AdwCleaner"
}
remove-item "$systemdrive\AdwCleaner" -recurse
} catch {
WK-error " Failed to uninstall AdwCleaner; please remove manually." "$log"
}
}
# Uninstall Autoruns
if (test-path "HKCU:\Software\Sysinternals\AutoRuns") {
WK-write "* Uninstalling Autoruns" "$log"
Remove-Item -Path HKCU:\Software\Sysinternals\AutoRuns -Recurse 2>&1 | out-null
if ((Get-ChildItem -Path HKCU:\Software\Sysinternals 2> out-null | Measure-Object).count -eq 0) {
Remove-Item -Path HKCU:\Software\Sysinternals 2>&1 | out-null
}
}
# Uninstall ESET
if (test-path "$programfiles86\ESET\ESET Online Scanner") {
WK-write "* Uninstalling ESET" "$log"
start -wait "$programfiles86\ESET\ESET Online Scanner\OnlineScannerUninstaller.exe" -argumentlist "/s"
rm -path "$programfiles86\ESET\ESET Online Scanner" -recurse 2>&1 | out-null
if ((gci -path "$programfiles86\ESET" 2> out-null | Measure-Object).count -eq 0) {
rm -path "$programfiles86\ESET" 2>&1 | out-null
}
}
# Move JRT logs & backups
if (test-path "$userprofile\Desktop\JRT*") {
WK-write "* Cleaning up JRT leftovers" "$log"
WK-warn " TODO" "$log"
}
# Uninstall MBAM
if (test-path "$programfiles86\Malwarebytes") {
WK-warn "Malwarebytes Anti-Malware installation found." "$log"
if (ask " Uninstall?" "$log") {
WK-write "* Uninstalling Malwarebytes Anti-Malware" "$log"
WK-warn " TODO" "$log"
}
}
# Move RKill logs & backups
if (test-path "$userprofile\Desktop\rkill*") {
WK-write "* Cleaning up RKill leftovers" "$log"
WK-warn " TODO" "$log"
}
# Uninstall SUPERAntiSpyware
# It is always in programfiles (not x86) ??
$sas_force_remove = $false
if (test-path "$programfiles\SUPERAntiSpyware") {
WK-warn "SUPERAntiSpyware installation found." "$log"
if (ask " Uninstall?" "$log") {
if (test-path "$programfiles\SUPERAntiSpyware\Uninstall.exe") {
WK-write "* Uninstalling SUPERAntiSpyware" "$log"
start -wait "$programfiles\SUPERAntiSpyware\Uninstall.exe"
} else {
WK-error "The SUPERAntiSpyware removal tool will be used as the installation is damaged" "$log"
$sas_force_remove = $true
}
}
}
## Summary ##
WK-write "" "$log"
WK-write "Starting SW Checklist" "$log"
WK-write "" "$log"
# Backup Registry
if (!(test-path "$logpath\Registry")) {
WK-write "* Backing up registry" "$log"
start -wait "$bin\Erunt\ERUNT.EXE" -argumentlist @("$logpath\Registry", "sysreg", "curuser", "otherusers", "/noprogresswindow") -workingdirectory "$bin\Erunt"
}
# AIDA64
if (!(test-path "$logpath\keys-aida64.txt")) {
WK-write "* Running AIDA64 (Product Keys)" "$log"
start -wait "$bin\AIDA64\aida64.exe" -argumentlist @("/R", "$logpath\keys-aida64.txt", "/CUSTOM", "$bin\AIDA64\licenses.rpf", "/TEXT", "/SILENT", "/SAFEST") -workingdirectory "$bin\AIDA64"
}
if (!(test-path "$logpath\program_list-aida64.txt")) {
WK-write "* Running AIDA64 (SW listing)" "$log"
start -wait "$bin\AIDA64\aida64.exe" -argumentlist @("/R", "$logpath\program_list-aida64.txt", "/CUSTOM", "$bin\AIDA64\installed_programs.rpf", "/TEXT", "/SILENT", "/SAFEST") -workingdirectory "$bin\AIDA64"
}
if (!(test-path "$logpath\aida64.htm")) {
WK-write "* Running AIDA64 (Full listing) in background" "$log"
start "$bin\AIDA64\aida64.exe" -argumentlist @("/R", "$logpath\aida64.html", "/CUSTOM", "$bin\AIDA64\full.rpf", "/HTML", "/SILENT") -workingdirectory "$bin\AIDA64"
}
# SIV
if (!(test-path "$logpath\keys-siv.txt")) {
WK-write "* Running SIV (Product Keys)" "$log"
start -wait "$siv" -argumentlist @("-KEYS", "-LOCAL", "-UNICODE", "-SAVE=[product-ids]=$logpath\keys-siv.txt") -workingdirectory "$bin\SIV"
}
if (!(test-path "$logpath\program_list-siv.txt")) {
WK-write "* Running SIV (SW listing)" "$log"
start -wait "$siv" -argumentlist @("-KEYS", "-LOCAL", "-UNICODE", "-SAVE=[software]=$logpath\program_list-siv.txt") -workingdirectory "$bin\SIV"
}
if (!(test-path "$logpath\aida64.htm")) {
WK-write "* Running SIV (Full listing) in background" "$log"
start -wait "$siv" -argumentlist @("-KEYS", "-LOCAL", "-UNICODE", "-SAVE=$logpath\siv.txt") -workingdirectory "$bin\SIV"
}
# Product Keys
## Extract
md "$bin\tmp" 2>&1 | out-null
start -wait $sz -argumentlist @("e", "$bin\ProduKey.7z", "-otmp", "-aoa", "-pAbracadabra", "-bsp0", "-bso0") -workingdirectory "$bin" -nonewwindow
rm "$bin\tmp\ProduKey*.cfg"
sleep -s 1
## Run
if (!(test-path "$logpath\keys-produkey.txt")) {
WK-write "* Saving Product Keys" "$log"
start -wait $produkey -argumentlist @("/nosavereg", "/stext", "$logpath\keys-produkey.txt") -workingdirectory "$bin\tmp"
}
# User Data
WK-write "==== User Data ====" "$log"
& "$wd\user_data.ps1" "$log"
WK-write "" "$log"
# OS Info
WK-write "==== Operating System ====" "$log"
WK-write " $os_name x$arch" "$log"
WK-write "$win_act" "$log"
if ($win_act -notmatch "permanent") {slui}
WK-write "" "$log"
# Set Timezone and sync clock
WK-write "==== Clock ====" "$log"
start "tzutil" -argumentlist @("/s", '"Pacific Standard Time"') -nonewwindow -redirectstandardoutput out-null
stop-service -name "w32time" 2>&1 | out-null
start "w32tm" -argumentlist @("/config", "/syncfromflags:manual", '/manualpeerlist:"us.pool.ntp.org time.nist.gov time.windows.com"') -nonewwindow -redirectstandardoutput out-null
start-service -name "w32time" 2>&1 | out-null
start "w32tm" -argumentlist "/resync" -nonewwindow -redirectstandardoutput out-null
# gross assumption that tz=PST (should've been set earlier)
WK-write $(get-date -uformat " %a %Y-%m-%d %H:%m (PST/PDT)") "$log"
WK-write "" "$log"
### DISABLED FOR NOW ###
## Reset power plans
#WK-write "==== Reset Power Plans ====" "$log"
## Export current power plans
#$pow_backup_path = "$ClientPath\Backups\$date\Power Plans"
#md "$pow_backup_path" > $null 2>&1 | out-null
#$old_power_plans = @()
#foreach ($plan in (powercfg /L)) {
# if ($plan -imatch '^Power Scheme.*') {
# $guid = $plan -replace 'Power Scheme GUID:\s+([0-9a-f\-]+).*', '$1'
# $name = $plan -replace 'Power Scheme GUID:\s+[0-9a-f\-]+\s+\(([^\)]+)\).*', '$1'
# $set = ($plan -imatch '.*\*$')
# $old_power_plans += @{GUID = $guid; Name = $name; Set = $set}
# if (!(test-path "$pow_backup_path\$name.pow")) {
# powercfg /export "$pow_backup_path\$name.pow" $guid
# }
# }
#}
#
#start "powercfg.exe" -argumentlist "-restoredefaultschemes" -nonewwindow -redirectstandardoutput out-null
#WK-write " All power plans reset to defaults" "$log"
## TODO: Re-add and reset SSD plan(s)
#WK-warn " If the system has a SSD please verify the correct plan has been selected" "$log"
#WK-write "" "$log"
### DISABLED FOR NOW ###
# Free Space
WK-write "==== Free Space ====" "$log"
& "$wd\free_space.ps1" "$log"
WK-write "" "$log"
# RAM
WK-write "==== RAM ====" "$log"
& "$wd\installed_ram.ps1" "$log"
WK-write "" "$log"
# Battery Check
WK-write "==== Battery Check ====" "$log"
& "$wd\check_battery.ps1" "$log"
WK-write "" "$log"
## Launch Extra Tools ##
# HWMonitor
if ($arch -eq 64) {
$prog = "$bin\HWMonitor\HWMonitor64.exe"
} else {
$prog = "$bin\HWMonitor\HWMonitor.exe"
}
start $prog
# XMPlay
start "$bin\..\Misc\XMPlay.cmd"
## Upload info ##
write-host "Uploading info to NAS..."
# Write batch
$batch = "lcd `"{0}`"`r`n" -f $ClientPath
$batch += "cd `"{0}`"`r`n" -f $diag_dest
$batch += "put -r Info `"{0}`"`r`n" -f $service_order
out-file -encoding "ASCII" -filepath "$wd\psftp_batch" -inputobject $batch
# Upload files
$psftp_args = @(
"-noagent",
"-i", "$bin\PuTTY\WK.ppk",
"$diag_user@$diag_server",
"-b", "$wd\psftp_batch")
start "$bin\PuTTY\PSFTP.exe" -argumentlist $psftp_args -wait -windowstyle minimized
## Done ##
popd
pause "Press Enter to review drivers and updates..."
# Launch post progs
start devmgmt.msc
if ($win_version -eq 10) {
start ms-settings:windowsupdate
} else {
start wuapp
}
# Launch SAS Removal Tool (if necessary)
if ($sas_force_remove) {
pushd "$bin\_Removal Tools"
if ($arch -eq 64) {
$prog = "SASUNINST64.exe"
} else {
$prog = "SASUNINST.exe"
}
start $prog
popd
}
# Open log
$notepad2 = "$bin\Notepad2\Notepad2-Mod.exe"
if (test-path "$notepad2") {
start "$notepad2" -argumentlist $log
} else {
start "notepad" -argumentlist $log
}

View file

@ -1,3 +1,5 @@
# Wizard Kit: List free space for all drives
param([string]$log) param([string]$log)
cd $(Split-Path $MyInvocation.MyCommand.Path) cd $(Split-Path $MyInvocation.MyCommand.Path)
@ -28,5 +30,5 @@ foreach ($d in [char]'C'..[char]'Z') {
} }
$drive[$x] = $tmp $drive[$x] = $tmp
} }
wk-write $(" {0} {1:N0}% Free ({2} / {3})" -f $letter, $percent, $drive[2], $drive[1]) $log WK-write $(" {0} {1:N0}% Free ({2} / {3})" -f $letter, $percent, $drive[2], $drive[1]) $log
} }

818
.bin/Scripts/functions.py Normal file
View file

@ -0,0 +1,818 @@
# Wizard Kit: Init
import os
import partition_uids
import re
import shutil
import subprocess
import time
import winreg
# Server info
BACKUP_SERVERS = [
{ 'IP': '10.0.0.10',
'Mounted': False,
'Name': 'ServerOne',
'Share': 'Backups',
'User': 'restore',
'Pass': 'Abracadabra',
},
{ 'IP': '10.0.0.11',
'Name': 'ServerTwo',
'Mounted': False,
'Share': 'Backups',
'User': 'restore',
'Pass': 'Abracadabra',
},
]
OFFICE_SERVER = {
'IP': '10.0.0.10',
'Name': 'ServerOne',
'Mounted': False,
'Share': 'Office',
'User': 'restore', # Using these credentials in case the backup shares are also mounted.
'Pass': 'Abracadabra', # This is because Windows only allows one set of credentials to be used per server at a time.
}
WINDOWS_SERVER = {
'IP': '10.0.0.10',
'Name': 'ServerOne',
'Mounted': False,
'Share': 'Windows',
'User': 'restore', # Using these credentials in case the backup shares are also mounted.
'Pass': 'Abracadabra', # This is because Windows only allows one set of credentials to be used per server at a time.
}
# Colors
COLORS = {
'CLEAR': '\033[0m',
'RED': '\033[31m',
'GREEN': '\033[32m',
'YELLOW': '\033[33m',
'BLUE': '\033[34m'}
# General functions
def ask(prompt='Kotaero'):
"""Prompt the user with a Y/N question and return a bool."""
answer = None
prompt = prompt + ' [Y/N]: '
while answer is None:
tmp = input(prompt)
if re.search(r'^y(es|)$', tmp):
answer = True
elif re.search(r'^n(o|ope|)$', tmp):
answer = False
return answer
def assign_volume_letters():
"""Assign a drive letter for all attached volumes."""
with open(diskpart_script, 'w') as script:
script.write('list volume\n')
process_return = run_program('diskpart /s {script}'.format(script=diskpart_script))
with open(diskpart_script, 'w') as script:
for tmp in re.findall(r'Volume (\d+)\s+([A-Za-z]?)\s+', process_return.stdout.decode()):
if tmp[1] == '':
script.write('select volume {number}\n'.format(number=tmp[0]))
script.write('assign\n')
try:
run_program('diskpart /s {script}'.format(script=diskpart_script))
except:
pass
def convert_to_bytes(size):
"""Convert human-readable size str to bytes and return an int."""
size = str(size)
tmp = re.search(r'(\d+)\s+([KMGT]B)', size.upper())
if tmp:
size = int(tmp.group(1))
units = tmp.group(2)
if units == 'TB':
size *= 1099511627776
elif units == 'GB':
size *= 1073741824
elif units == 'MB':
size *= 1048576
elif units == 'KB':
size *= 1024
else:
return -1
return size
def find_windows_image(filename=None):
"""Search for an image file on local and network drives and return a dict."""
image = {}
# Bail early
if filename is None:
raise Exception('Filename not specified.')
# Search local source
process_return = run_program('mountvol')
for tmp in re.findall(r'.*([A-Za-z]):\\', process_return.stdout.decode()):
for ext in ['esd', 'wim', 'swm']:
if os.path.isfile('{drive}:\\images\\{filename}.{ext}'.format(drive=tmp[0], ext=ext, filename=filename)):
image['Ext'] = ext
image['File'] = '{drive}:\\images\\{filename}'.format(drive=tmp[0], filename=filename)
image['Glob'] = '--ref="{File}*.swm"'.format(**image) if ext == 'swm' else ''
image['Source'] = tmp[0]
break
# Check for network source (if necessary)
if not any(image):
if not WINDOWS_SERVER['Mounted']:
mount_windows_share()
for ext in ['esd', 'wim', 'swm']:
if os.path.isfile('\\\\{IP}\\{Share}\\images\\{filename}.{ext}'.format(ext=ext, filename=filename, **WINDOWS_SERVER)):
image['Ext'] = ext
image['File'] = '\\\\{IP}\\{Share}\\images\\{filename}'.format(filename=filename, **WINDOWS_SERVER)
image['Glob'] = '--ref="{File}*.swm"'.format(**image) if ext == 'swm' else ''
image['Source'] = None
break
# Display image to be used (if any) and return
if any(image):
print_info('Using image: {File}.{Ext}'.format(**image))
return image
def format_gpt(disk=None, windows_family=None):
"""Format disk for use as a Windows OS drive using the GPT (UEFI) layout."""
# Bail early
if disk is None:
raise Exception('No disk provided.')
if windows_family is None:
raise Exception('No Windows family provided.')
# Format drive
print_info('Drive will use a GPT (UEFI) layout.')
with open(diskpart_script, 'w') as script:
# Partition table
script.write('select disk {number}\n'.format(number=disk['Number']))
script.write('clean\n')
script.write('convert gpt\n')
# Windows RE tools partitions (Windows 8+)
if re.search(r'^(8|10)', windows_family):
script.write('create partition primary size=300\n')
script.write('format quick fs=ntfs label="Windows RE tools"\n')
script.write('assign letter="T"\n')
script.write('set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"\n')
script.write('gpt attributes=0x8000000000000001\n')
# System partition
script.write('create partition efi size=260\n') # NOTE: Allows for Advanced Format 4K drives
script.write('format quick fs=fat32 label="System"\n')
script.write('assign letter="S"\n')
# Microsoft Reserved (MSR) partition
script.write('create partition msr size=128\n')
# Windows partition
script.write('create partition primary\n')
script.write('format quick fs=ntfs label="Windows"\n')
script.write('assign letter="W"\n')
# Run script
print(' Formatting drive...')
run_program('diskpart /s {script}'.format(script=diskpart_script))
time.sleep(2)
def format_mbr(disk=None):
"""Format disk for use as a Windows OS drive using the MBR (legacy) layout."""
# Bail early
if disk is None:
raise Exception('No disk provided.')
# Format drive
print_info('Drive will use a MBR (legacy) layout.')
with open(diskpart_script, 'w') as script:
# Partition table
script.write('select disk {number}\n'.format(number=disk['Number']))
script.write('clean\n')
# System partition
script.write('create partition primary size=100\n')
script.write('format fs=ntfs quick label="System Reserved"\n')
script.write('active\n')
script.write('assign letter=s\n')
# Windows partition
script.write('create partition primary\n')
script.write('format fs=ntfs quick label="Windows"\n')
script.write('assign letter=w\n')
# Run script
print(' Formatting drive...')
run_program('diskpart /s {script}'.format(script=diskpart_script))
time.sleep(2)
def get_attached_disk_info():
"""Get details about the attached disks and return a list of dicts."""
disks = []
print_info('Getting drive info...')
# Assign all the letters
assign_volume_letters()
# Get disk numbers
with open(diskpart_script, 'w') as script:
script.write('list disk\n')
process_return = run_program('diskpart /s {script}'.format(script=diskpart_script))
for tmp in re.findall(r'Disk (\d+)\s+\w+\s+(\d+\s+\w+)', process_return.stdout.decode()):
disks.append({'Number': tmp[0], 'Size': human_readable_size(tmp[1])})
# Get disk details
for disk in disks:
# Get partition style
with open(diskpart_script, 'w') as script:
script.write('select disk {Number}\n'.format(**disk))
script.write('uniqueid disk\n')
process_return = run_program('diskpart /s {script}'.format(script=diskpart_script))
if re.findall(r'Disk ID: {[A-Z0-9]+-[A-Z0-9]+-[A-Z0-9]+-[A-Z0-9]+-[A-Z0-9]+}', process_return.stdout.decode()):
disk['Table'] = 'GPT'
elif re.findall(r'Disk ID: 00000000', process_return.stdout.decode()):
disk['Table'] = 'RAW'
elif re.findall(r'Disk ID: [A-Z0-9]+', process_return.stdout.decode()):
disk['Table'] = 'MBR'
else:
disk['Table'] = 'Unknown'
# Get disk name/model and physical details
with open(diskpart_script, 'w') as script:
script.write('select disk {Number}\n'.format(**disk))
script.write('detail disk\n')
process_return = run_program('diskpart /s {script}'.format(script=diskpart_script))
tmp = process_return.stdout.decode().strip().splitlines()
# Remove empty lines and those without a ':' and split each remaining line at the ':' to form a key/value pair
tmp = [s.strip() for s in tmp if s.strip() != '']
# Set disk name
disk['Name'] = tmp[4]
tmp = [s.split(':') for s in tmp if ':' in s]
# Add new key/value pairs to the disks variable
disk.update({key.strip(): value.strip() for (key, value) in tmp})
# Get partition info for disk
with open(diskpart_script, 'w') as script:
script.write('select disk {Number}\n'.format(**disk))
script.write('list partition\n')
process_return = run_program('diskpart /s {script}'.format(script=diskpart_script))
disk['Partitions'] = []
for tmp in re.findall(r'Partition\s+(\d+)\s+\w+\s+(\d+\s+\w+)\s+', process_return.stdout.decode().strip()):
disk['Partitions'].append({'Number': tmp[0], 'Size': human_readable_size(tmp[1])})
for par in disk['Partitions']:
# Get partition details
with open(diskpart_script, 'w') as script:
script.write('select disk {Number}\n'.format(**disk))
script.write('select partition {Number}\n'.format(**par))
script.write('detail partition\n')
process_return = run_program('diskpart /s {script}'.format(script=diskpart_script))
for tmp in re.findall(r'Volume\s+\d+\s+(\w|RAW)\s+', process_return.stdout.decode().strip()):
if tmp == 'RAW':
par['FileSystem'] = 'RAW'
else:
par['Letter'] = tmp
try:
process_return2 = run_program('fsutil fsinfo volumeinfo {Letter}:'.format(**par))
for line in process_return2.stdout.decode().splitlines():
line = line.strip()
# Get partition name
match = re.search(r'Volume Name\s+:\s+(.*)$', line)
if match:
par['Name'] = match.group(1).strip()
# Get filesystem type
match = re.search(r'File System Name\s+:\s+(.*)$', line)
if match:
par['FileSystem'] = match.group(1).strip()
usage = shutil.disk_usage('{Letter}:\\'.format(Letter=tmp))
par['Used Space'] = human_readable_size(usage.used)
except subprocess.CalledProcessError:
par['FileSystem'] = 'Unknown'
# Get MBR type / GPT GUID for extra details on "Unknown" partitions
for tmp in re.findall(r'Type\s+:\s+(\S+)', process_return.stdout.decode().strip()):
par['Type'] = tmp
uid = partition_uids.lookup_guid(tmp)
if uid is not None:
par.update({
'Description': uid.get('Description', ''),
'OS': uid.get('OS', '')})
# Ensure the Name has been set
if 'Name' not in par:
par['Name'] = ''
if 'FileSystem' not in par:
par['FileSystem'] = 'Unknown'
# Done
return disks
def human_readable_size(size, decimals=0):
"""Convert size in bytes to a human-readable format and return a str."""
# Prep string formatting
width = 3+decimals
if decimals > 0:
width += 1
human_format = '>{width}.{decimals}f'.format(width=width, decimals=decimals)
tmp = ''
# Convert size to int
try:
size = int(size)
except ValueError:
size = convert_to_bytes(size)
# Verify we have a valid size
if size <= 0:
return '{size:>{width}} b'.format(size='???', width=width)
# Format string
if size >= 1099511627776:
size /= 1099511627776
tmp = '{size:{human_format}} Tb'.format(size=size, human_format=human_format)
elif size >= 1073741824:
size /= 1073741824
tmp = '{size:{human_format}} Gb'.format(size=size, human_format=human_format)
elif size >= 1048576:
size /= 1048576
tmp = '{size:{human_format}} Mb'.format(size=size, human_format=human_format)
elif size >= 1024:
size /= 1024
tmp = '{size:{human_format}} Kb'.format(size=size, human_format=human_format)
else:
tmp = '{size:{human_format}} b'.format(size=size, human_format=human_format)
# Return
return tmp
def menu_select(title='~ Untitled Menu ~', main_entries=[], action_entries=[], prompt='Please make a selection', secret_exit=False):
"""Display options in a menu for user and return selected option as a str."""
# Bail early
if (len(main_entries) + len(action_entries) == 0):
raise Exception("MenuError: No items given")
# Build menu
menu_splash = '{title}\n\n'.format(title=title)
valid_answers = []
if (secret_exit):
valid_answers.append('Q')
# Add main entries
if (len(main_entries) > 0):
for i in range(len(main_entries)):
entry = main_entries[i]
# Add Spacer
if ('CRLF' in entry):
menu_splash += '\n'
if ('Disabled' in entry):
menu_splash += '{YELLOW}{number:>{mwidth}}: {name} (DISABLED){CLEAR}\n'.format(number=i+1, mwidth=len(str(len(main_entries))), name=entry.get('Display Name', entry['Name']), **COLORS)
else:
valid_answers.append(str(i+1))
menu_splash += '{number:>{mwidth}}: {name}\n'.format(number=i+1, mwidth=len(str(len(main_entries))), name=entry.get('Display Name', entry['Name']))
menu_splash += '\n'
# Add action entries
if (len(action_entries) > 0):
for entry in action_entries:
# Add Spacer
if ('CRLF' in entry):
menu_splash += '\n'
valid_answers.append(entry['Letter'])
menu_splash += '{letter:>{mwidth}}: {name}\n'.format(letter=entry['Letter'].upper(), mwidth=len(str(len(action_entries))), name=entry['Name'])
menu_splash += '\n'
answer = ''
while (answer.upper() not in valid_answers):
os.system('cls')
print(menu_splash)
answer = input('{prompt}: '.format(prompt=prompt))
return answer.upper()
def mount_backup_shares():
"""Mount the backup shares unless labeled as already mounted."""
for server in BACKUP_SERVERS:
# Blindly skip if we mounted earlier
if server['Mounted']:
continue
else:
try:
# Test connection
run_program('ping -w 800 -n 2 {IP}'.format(**server))
# Mount
run_program('net use \\\\{IP}\\{Share} /user:{User} {Pass}'.format(**server))
print_info('Mounted {Name}'.format(**server))
server['Mounted'] = True
except subprocess.CalledProcessError:
print_error('Failed to mount \\\\{Name}\\{Share}, {IP} unreachable.'.format(**server))
time.sleep(1)
except:
print_warning('Failed to mount \\\\{Name}\\{Share} ({IP})'.format(**server))
time.sleep(1)
def mount_windows_share():
"""Mount the Windows images share unless labeled as already mounted."""
# Blindly skip if we mounted earlier
if WINDOWS_SERVER['Mounted']:
return None
else:
try:
# Test connection
run_program('ping -w 800 -n 2 {IP}'.format(**WINDOWS_SERVER))
# Mount
run_program('net use \\\\{IP}\\{Share} /user:{User} {Pass}'.format(**WINDOWS_SERVER))
print_info('Mounted {Name}'.format(**WINDOWS_SERVER))
WINDOWS_SERVER['Mounted'] = True
except subprocess.CalledProcessError:
print_error('Failed to mount \\\\{Name}\\{Share}, {IP} unreachable.'.format(**WINDOWS_SERVER))
time.sleep(1)
except:
print_warning('Failed to mount \\\\{Name}\\{Share}'.format(**WINDOWS_SERVER))
time.sleep(1)
def pause(prompt='Press Enter to continue... '):
"""Simple pause implementation."""
input(prompt)
def print_error(message='Generic error', log_file=None, **kwargs):
"""Prints message to screen in RED and writes it to log_file if provided."""
print('{RED}{message}{CLEAR}'.format(message=message, **COLORS, **kwargs))
if log_file is not None:
with open(log_file, 'a') as f:
f.write(message + '\n')
def print_info(message='Generic info', log_file=None, **kwargs):
"""Prints message to screen in BLUE and writes it to log_file if provided."""
print('{BLUE}{message}{CLEAR}'.format(message=message, **COLORS, **kwargs))
if log_file is not None:
with open(log_file, 'a') as f:
f.write(message + '\n')
def print_warning(message='Generic warning', log_file=None, **kwargs):
"""Prints message to screen in YELLOW and writes it to log_file if provided."""
print('{YELLOW}{message}{CLEAR}'.format(message=message, **COLORS, **kwargs))
if log_file is not None:
with open(log_file, 'a') as f:
f.write(message + '\n')
def print_standard(message='Generic info', log_file=None, **kwargs):
"""Prints message to screen and writes it to log_file if provided."""
print('{message}'.format(message=message, **COLORS, **kwargs))
if log_file is not None:
with open(log_file, 'a') as f:
f.write(message + '\n')
def print_success(message='Generic success', log_file=None, **kwargs):
"""Prints message to screen in GREEN and writes it to log_file if provided."""
print('{GREEN}{message}{CLEAR}'.format(message=message, **COLORS, **kwargs))
if log_file is not None:
with open(log_file, 'a') as f:
f.write(message + '\n')
def remove_volume_letters(keep=None):
"""Remove the assigned drive letter for all attached volumes."""
with open(diskpart_script, 'w') as script:
script.write('list volume\n')
process_return = run_program('diskpart /s {script}'.format(script=diskpart_script))
with open(diskpart_script, 'w') as script:
for tmp in re.findall(r'Volume (\d+)\s+([A-Za-z]?)\s+', process_return.stdout.decode()):
if tmp[1] != '' and tmp[1] != keep:
script.write('select volume {number}\n'.format(number=tmp[0]))
script.write('remove\n')
try:
run_program('diskpart /s {script}'.format(script=diskpart_script))
except:
pass
def run_program(cmd=None, args=[], check=True, pipe=True, shell=False):
"""Run program and return a subprocess.CompletedProcess instance."""
if cmd is None:
raise Exception('No program passed.')
_cmd = cmd
if len(args) > 0:
_cmd = [cmd] + args
if pipe:
process_return = subprocess.run(_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=check, shell=shell)
else:
process_return = subprocess.run(_cmd, check=check, shell=shell)
return process_return
def select_backup(ticket):
"""Find any backups for the ticket stored on one of the BACKUP_SERVERS. Returns path as a os.DirEntry."""
_backups = []
mount_backup_shares()
for server in BACKUP_SERVERS:
if server['Mounted']:
for d in os.scandir('\\\\{IP}\\{Share}'.format(**server)):
if d.is_dir() and re.match('^{}'.format(ticket), d.name):
_backups.append({'Name': '{s_name}: {backup}'.format(s_name=server['Name'], backup=d.name), 'Dir': d})
actions = [{'Name': 'Quit', 'Letter': 'Q'}]
# Select backup path
if len(_backups) > 0:
selection = menu_select('Which backup are we using?', _backups, actions)
if selection == 'Q':
return None
else:
return _backups[int(selection)-1]['Dir']
else:
print_error('No backups found for ticket: {ticket}.'.format(ticket=ticket))
return None
def select_destination():
"""Select backup destination and return a dict."""
# Build menu
dests = []
for server in BACKUP_SERVERS:
if server['Mounted']:
dests.append(server)
actions = [
{'Name': 'Main Menu', 'Letter': 'M'},
]
# Size check
for dest in dests:
if 'IP' in dest:
dest['Usage'] = shutil.disk_usage('\\\\{IP}\\{Share}'.format(**dest))
else:
dest['Usage'] = shutil.disk_usage('{Letter}:\\'.format(**dest))
dest['Free Space'] = human_readable_size(dest['Usage'].free)
dest['Display Name'] = '{Name} ({Free Space} available)'.format(**dest)
# Show menu or bail
if len(dests) > 0:
selection = menu_select('Where are we backing up to?', dests, actions)
if selection == 'M':
return None
else:
return dests[int(selection)-1]
else:
print_warning('No backup destinations found.')
return None
def select_disk(prompt='Which disk?'):
"""Select a disk from the attached disks and return the disk number as an int."""
disks = get_attached_disk_info()
# Build menu
disk_options = []
for disk in disks:
display_name = '{Size}\t[{Table}] ({Type}) {Name}'.format(**disk)
if len(disk['Partitions']) > 0:
pwidth=len(str(len(disk['Partitions'])))
for par in disk['Partitions']:
# Show unsupported partition(s) in RED
par_skip = False
if 'Letter' not in par or re.search(r'(RAW|Unknown)', par['FileSystem']):
par_skip = True
if par_skip:
display_name += COLORS['YELLOW']
# Main text
display_name += '\n\t\t\tPartition {Number:>{pwidth}}: {Size} ({FileSystem})'.format(pwidth=pwidth, **par)
if par['Name'] != '':
display_name += '\t"{Name}"'.format(**par)
# Clear color (if set above)
if par_skip:
display_name += COLORS['CLEAR']
else:
display_name += '{YELLOW}\n\t\t\tNo partitions found.{CLEAR}'.format(**COLORS)
disk_options.append({'Name': display_name, 'Disk': disk})
actions = [
{'Name': 'Main Menu', 'Letter': 'M'},
]
# Menu loop
selection = menu_select(prompt, disk_options, actions)
if (selection.isnumeric()):
return disk_options[int(selection)-1]['Disk']
elif (selection == 'M'):
# -1 here means cancel
return -1
def select_minidump_path():
"""Have the user select from all found MiniDump locations and return a dict."""
dumps = []
# Assign volume letters first
assign_volume_letters()
# Search for minidumps
tmp = run_program('mountvol')
tmp = [d for d in re.findall(r'.*([A-Za-z]):\\', tmp.stdout.decode())]
# Remove RAMDisk letter
if 'X' in tmp:
tmp.remove('X')
for drive in tmp:
if os.path.exists('{drive}:\\Windows\\MiniDump'.format(drive=drive)):
dumps.append({'Name': '{drive}:\\Windows\\MiniDump'.format(drive=drive)})
# Check results before showing menu
if len(dumps) == 0:
print_error(' No BSoD / MiniDump paths found')
time.sleep(2)
return None
# Menu
selection = menu_select('Which BSoD / MiniDump path are we scanning?', dumps, [])
return dumps[int(selection) - 1]['Name']
def select_windows_version():
"""Select Windows version and return a dict."""
versions = [
{'Name': 'Windows 7 Home Basic',
'ImageFile': 'Win7',
'ImageName': 'Windows 7 HOMEBASIC',
'Family': '7'},
{'Name': 'Windows 7 Home Premium',
'ImageFile': 'Win7',
'ImageName': 'Windows 7 HOMEPREMIUM',
'Family': '7'},
{'Name': 'Windows 7 Professional',
'ImageFile': 'Win7',
'ImageName': 'Windows 7 PROFESSIONAL',
'Family': '7'},
{'Name': 'Windows 7 Ultimate',
'ImageFile': 'Win7',
'ImageName': 'Windows 7 ULTIMATE',
'Family': '7'},
{'Name': 'Windows 8.1',
'ImageFile': 'Win8',
'ImageName': 'Windows 8.1',
'Family': '8',
'CRLF': True},
{'Name': 'Windows 8.1 Pro',
'ImageFile': 'Win8',
'ImageName': 'Windows 8.1 Pro',
'Family': '8'},
{'Name': 'Windows 10 Home',
'ImageFile': 'Win10',
'ImageName': 'Windows 10 Home',
'Family': '10',
'CRLF': True},
{'Name': 'Windows 10 Pro',
'ImageFile': 'Win10',
'ImageName': 'Windows 10 Pro',
'Family': '10'},
]
actions = [
{'Name': 'Main Menu', 'Letter': 'M'},
]
# Menu loop
selection = menu_select('Which version of Windows are we installing?', versions, actions)
if selection.isnumeric():
return versions[int(selection)-1]
elif selection == 'M':
return None
def sleep(seconds=2):
time.sleep(seconds)
def umount_backup_shares():
"""Unnount the backup shares regardless of current status."""
for server in BACKUP_SERVERS:
try:
# Umount
run_program('net use \\\\{IP}\\{Share} /delete'.format(**server))
print_info('Umounted {Name}'.format(**server))
server['Mounted'] = False
except:
print_error('Failed to umount \\\\{Name}\\{Share}.'.format(**server))
time.sleep(1)
# Init functions
def init_vars():
"""Sets common variables and returns a dict."""
print('Initializing...')
# Find base path
_wd = os.getcwd()
_base = None
while _base is None:
if os.path.exists('.bin'):
_base = os.getcwd()
break
if re.fullmatch(r'\w:\\', os.getcwd()):
break
os.chdir('..')
os.chdir(_wd)
if _base is None:
print_error('".bin" not found.')
pause('Press any key to exit...')
quit()
# Set vars
_vars = {
'BaseDir': _base,
'Date': time.strftime("%Y-%m-%d"),
'Date-Time': time.strftime("%Y-%m-%d_%H%M_%z"),
'Env': os.environ.copy()
}
_vars['BinDir'] = '{BaseDir}\\.bin'.format(**_vars)
_vars['ClientDir'] = '{SYSTEMDRIVE}\\WK'.format(**_vars['Env'])
_vars['LogDir'] = '{ClientDir}\\Info\\{Date}'.format(**_vars)
_vars['TmpDir'] = '{BinDir}\\tmp'.format(**_vars)
return _vars
def init_vars_os():
"""Sets variables relating to the installed OS and returns a dict."""
print('Checking OS...')
_vars_os = {}
_env = os.environ.copy()
# Query registry
_reg_path = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion')
for key in ['CSDVersion', 'CurrentBuild', 'CurrentBuildNumber', 'CurrentVersion', 'ProductName']:
try:
_vars_os[key] = winreg.QueryValueEx(_reg_path, key)[0]
if key in ['CurrentBuild', 'CurrentBuildNumber']:
_vars_os[key] = int(_vars_os[key])
except ValueError:
# Couldn't convert Build to int so this should return interesting results...
_vars_os[key] = 0
except:
_vars_os[key] = 'Unknown'
# Determine Windows version
if _vars_os['CurrentVersion'] == '6.0':
_vars_os['Version'] = 'Vista'
elif _vars_os['CurrentVersion'] == '6.1':
_vars_os['Version'] = '7'
elif _vars_os['CurrentVersion'] == '6.2':
_vars_os['Version'] = '8'
elif _vars_os['CurrentVersion'] == '6.3':
if int(_vars_os['CurrentBuildNumber']) <= 9600:
_vars_os['Version'] = '8'
elif int(_vars_os['CurrentBuildNumber']) >= 10240:
_vars_os['Version'] = '10'
# Determine OS bit depth
_vars_os['Arch'] = 32
if 'PROGRAMFILES(X86)' in _env:
_vars_os['Arch'] = 64
# Determine OS Name
_vars_os['Name'] = '{ProductName} {CSDVersion}'.format(**_vars_os)
if _vars_os['CurrentBuild'] == 9600:
_vars_os['Name'] += ' Update'
if _vars_os['CurrentBuild'] == 10240:
_vars_os['Name'] += ' Release 1507 "Threshold 1"'
if _vars_os['CurrentBuild'] == 10586:
_vars_os['Name'] += ' Release 1511 "Threshold 2"'
if _vars_os['CurrentBuild'] == 14393:
_vars_os['Name'] += ' Release 1607 "Redstone 1" / "Anniversary Update"'
_vars_os['Name'] = _vars_os['Name'].replace('Service Pack ', 'SP')
_vars_os['Name'] = re.sub(r'\s+', ' ', _vars_os['Name'])
# == vista ==
# 6.0.6000
# 6.0.6001
# 6.0.6002
# ==== 7 ====
# 6.1.7600
# 6.1.7601
# 6.1.7602
# ==== 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 "Anniversary Update" "Redstone 1" ==
# 6.3.14393
# === 10 v???? "Redstone 2" ==
# 6.3.?????
# Determine bootup type
_vars_os['SafeMode'] = False
if 'SAFEBOOT_OPTION' in _env:
_vars_os['SafeMode'] = True
# Determine activation status
if _vars_os['SafeMode']:
_vars_os['Activation'] = 'Activation status unavailable in safe mode'
else:
_out = run_program('cscript /nologo {WINDIR}\\System32\\slmgr.vbs /xpr'.format(**_env))
_out = _out.stdout.decode().splitlines()
_out = [l for l in _out if re.match(r'^\s', l)]
if len(_out) > 0:
_vars_os['Activation'] = re.sub(r'^\s+', '', _out[0])
else:
_vars_os['Activation'] = 'Activation status unknown'
return _vars_os
if __name__ == '__main__':
print("This file is not meant to be called directly.")

View file

@ -1,6 +1,4 @@
# WK-Init # Wizard Kit: Common settings and functions
#
# Some common settings and functions
$host.UI.RawUI.BackgroundColor = "black" $host.UI.RawUI.BackgroundColor = "black"
$host.UI.RawUI.ForegroundColor = "green" $host.UI.RawUI.ForegroundColor = "green"
@ -20,10 +18,10 @@ $programfiles86 = $programfiles
if (test-path env:"programfiles(x86)") { if (test-path env:"programfiles(x86)") {
$programfiles86 = (gci env:"programfiles(x86)").value $programfiles86 = (gci env:"programfiles(x86)").value
} }
$WKPath = "$systemdrive\WK" $ClientPath = "$systemdrive\WK"
$date = get-date -uformat "%Y-%m-%d" $date = get-date -uformat "%Y-%m-%d"
$date_time = get-date -uformat "%Y-%m-%d_%H%M" $date_time = get-date -uformat "%Y-%m-%d_%H%M"
$logpath = "$WKPath\Info\$date" $logpath = "$ClientPath\Info\$date"
function ask { function ask {
param([string]$text = "Kotaero", [string]$log = "WK.log") param([string]$text = "Kotaero", [string]$log = "WK.log")
@ -43,17 +41,17 @@ function ask {
out-file -filepath $log -inputobject $text -append out-file -filepath $log -inputobject $text -append
return $answer return $answer
} }
function wk-error { function WK-error {
param([string]$text = "ERROR", [string]$log = "WK.log") param([string]$text = "ERROR", [string]$log = "WK.log")
write-host ($text) -foreground "red" write-host ($text) -foreground "red"
out-file -filepath $log -inputobject $text -append out-file -filepath $log -inputobject $text -append
} }
function wk-warn { function WK-warn {
param([string]$text = "WARNING", [string]$log = "WK.log") param([string]$text = "WARNING", [string]$log = "WK.log")
write-host ($text) -foreground "yellow" write-host ($text) -foreground "yellow"
out-file -filepath $log -inputobject $text -append out-file -filepath $log -inputobject $text -append
} }
function wk-write { function WK-write {
param([string]$text = "<TODO>", [string]$log = "WK.log") param([string]$text = "<TODO>", [string]$log = "WK.log")
write-host ($text) write-host ($text)
out-file -filepath $log -inputobject $text -append out-file -filepath $log -inputobject $text -append

View file

@ -0,0 +1,53 @@
:: Wizard Kit: Create Info folder using current date
@echo off
:Flags
set _backups=
set _info=
set _office=
set _quarantine=
set _transfer=
for %%f in (%*) do (
if /i "%%f" == "/DEBUG" (@echo on)
if /i "%%f" == "/Backups" set _backups=True
if /i "%%f" == "/Info" set _info=True
if /i "%%f" == "/Office" set _office=True
if /i "%%f" == "/Quarantine" set _quarantine=True
if /i "%%f" == "/Transfer" set _transfer=True
)
:GetDate
:: Credit to SS64.com Code taken from http://ss64.com/nt/syntax-getdate.html
:: Use WMIC to retrieve date and time in ISO 8601 format.
for /f "skip=1 tokens=1-6" %%G in ('WMIC Path Win32_LocalTime Get Day^,Hour^,Minute^,Month^,Second^,Year /Format:table') do (
if "%%~L"=="" goto s_done
set _yyyy=%%L
set _mm=00%%J
set _dd=00%%G
set _hour=00%%H
set _minute=00%%I
)
:s_done
:: Pad digits with leading zeros
set _mm=%_mm:~-2%
set _dd=%_dd:~-2%
set _hour=%_hour:~-2%
set _minute=%_minute:~-2%
set iso_date=%_yyyy%-%_mm%-%_dd%
:SetVariables
set "client_dir=%systemdrive%\WK"
set "log_dir=%client_dir%\Info\%iso_date%"
:CreateDirs
if defined _backups mkdir "%client_dir%\Backups">nul 2>&1
if defined _info mkdir "%client_dir%\Info">nul 2>&1
if defined _office mkdir "%client_dir%\Office">nul 2>&1
if defined _quarantine mkdir "%client_dir%\Quarantine">nul 2>&1
if defined _transfer mkdir "%client_dir%\Transfer">nul 2>&1
:Done
goto Exit
:Exit

View file

@ -0,0 +1,79 @@
# Wizard Kit: Install the standard SW bundle based on the OS version
import os
import re
# Init
os.chdir(os.path.dirname(os.path.realpath(__file__)))
os.system('title Wizard Kit: SW Bundle Tool')
from functions import *
vars = init_vars()
vars_os = init_vars_os()
if __name__ == '__main__':
# Adobe Reader
if vars_os['Version'] != 'Vista':
print('Installing Adobe Reader DC...')
_prog = '{BaseDir}/Installers/Extras/Office/Adobe Reader DC.exe'.format(**vars)
_args = ['/sAll', '/msi', '/norestart', '/quiet', 'ALLUSERS=1', 'EULA_ACCEPT=YES']
try:
run_program(_prog, _args)
except:
print_error('Failed to install Adobe Reader DC')
# Visual C++ Redists
print('Installing Visual C++ Runtimes...')
os.chdir('{BinDir}/_vcredists'.format(**vars))
_redists = [
# 2005
{'Prog': 'msiexec',
'Args': ['/i', '2005sp1\\x86\\vcredist.msi', '/qb!', '/norestart']},
{'Prog': 'msiexec',
'Args': ['/i', '2005sp1\\x64\\vcredist.msi', '/qb!', '/norestart']},
# 2008
{'Prog': '2008sp1\\vcredist_x86.exe',
'Args': ['/qb! /norestart']},
{'Prog': '2008sp1\\vcredist_x64.exe',
'Args': ['/qb! /norestart']},
# 2010
{'Prog': '2010\\vcredist_x86.exe',
'Args': ['/passive', '/norestart']},
{'Prog': '2010\\vcredist_x64.exe',
'Args': ['/passive', '/norestart']},
# 2012
{'Prog': '2012u4\\vcredist_x86.exe',
'Args': ['/passive', '/norestart']},
{'Prog': '2012u4\\vcredist_x64.exe',
'Args': ['/passive', '/norestart']},
# 2013
{'Prog': '2013\\vcredist_x86.exe',
'Args': ['/install', '/passive', '/norestart']},
{'Prog': '2013\\vcredist_x64.exe',
'Args': ['/install', '/passive', '/norestart']},
# 2015
{'Prog': '2015u3\\vc_redist.x86.exe',
'Args': ['/install', '/passive', '/norestart']},
{'Prog': '2015u3\\vc_redist.x64.exe',
'Args': ['/install', '/passive', '/norestart']},
]
for vcr in _redists:
try:
run_program(vcr['Prog'], vcr['Args'], check=False)
except:
print_error('Failed to install {}'.format(vcr['Prog']))
# Main Bundle
if vars_os['Version'] in ['Vista', '7']:
# Legacy selection
if ask('Install MSE?'):
_prog = '{BaseDir}/Installers/Extras/Security/Microsoft Security Essentials.exe'.format(**vars)
run_program(_prog, check=False)
_prog = '{BaseDir}/Installers/Extras/Bundles/Legacy.exe'.format(**vars)
run_program(_prog, check=False)
elif vars_os['Version'] in ['8', '10']:
# Modern selection
_prog = '{BaseDir}/Installers/Extras/Bundles/Modern.exe'.format(**vars)
run_program(_prog, check=False)
pause("Press Enter to exit...")
quit()

View file

@ -1,3 +1,5 @@
# Wizard Kit: List installed RAM (and speed if possible)
param([string]$log) param([string]$log)
cd $(Split-Path $MyInvocation.MyCommand.Path) cd $(Split-Path $MyInvocation.MyCommand.Path)
@ -34,9 +36,9 @@ foreach ($dev in $mem) {
$_size = $dev.Capacity/1gb $_size = $dev.Capacity/1gb
$_loc = $dev.DeviceLocator $_loc = $dev.DeviceLocator
$_type = $ram_speeds."$($dev.Speed)" $_type = $ram_speeds."$($dev.Speed)"
wk-write $(" {0:N2} Gb ({1}) {2}" -f $_size,$_loc,$_type) "$log" WK-write $(" {0:N2} Gb ({1}) {2}" -f $_size,$_loc,$_type) "$log"
$total += $dev.Capacity $total += $dev.Capacity
} }
wk-write " -------" "$log" WK-write " -------" "$log"
wk-write $(" {0:N2} Gb Usable" -f $($cs.TotalPhysicalMemory/1gb)) "$log" WK-write $(" {0:N2} Gb Usable" -f $($cs.TotalPhysicalMemory/1gb)) "$log"
wk-write $(" {0:N2} Gb Installed" -f $($total/1gb)) "$log" WK-write $(" {0:N2} Gb Installed" -f $($total/1gb)) "$log"

368
.bin/Scripts/menu.py Normal file
View file

@ -0,0 +1,368 @@
# Wizard Kit: Menu
import os
import re
import subprocess
import time
import traceback
import winreg
from functions import *
# Init
os.chdir(os.path.dirname(os.path.realpath(__file__)))
bin = os.path.abspath('..\\')
## Check bootup type
BOOT_TYPE = 'Legacy'
try:
reg_key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, 'System\\CurrentControlSet\\Control')
reg_value = winreg.QueryValueEx(reg_key, 'PEFirmwareType')[0]
if reg_value == 2:
BOOT_TYPE = 'UEFI'
except:
BOOT_TYPE = 'Unknown'
class AbortException(Exception):
pass
def abort_to_main_menu(message='Returning to main menu...'):
print_warning(message)
pause('Press Enter to return to main menu... ')
raise AbortException
def menu_backup_imaging():
"""Take backup images of partition(s) in the WIM format and save them to a backup share"""
# Mount backup shares
os.system('cls')
mount_backup_shares()
# Set ticket number
ticket = None
while ticket is None:
tmp = input('Enter ticket number: ')
if re.match(r'^([0-9]+([-_]?\w+|))$', tmp):
ticket = tmp
# Select disk to backup
disk = select_disk('For which drive are we creating backups?')
if disk is None:
abort_to_main_menu()
# Get list of partitions that can't be imaged
bad_parts = [p['Number'] for p in disk['Partitions'] if 'Letter' not in p or re.search(r'(RAW|Unknown)', p['FileSystem'])]
# Bail if no partitions are found (that can be imaged)
num_parts = len(disk['Partitions'])
if num_parts == 0 or num_parts == len(bad_parts):
abort_to_main_menu(' No partitions can be imaged for the selected drive')
# Select destination
dest = select_destination()
if dest is None:
abort_to_main_menu('Aborting Backup Creation')
# List (and update) partition details for selected drive
os.system('cls')
print('Create Backup - Details:\n')
print(' Drive: {Size}\t[{Table}] ({Type}) {Name}\n'.format(**disk))
clobber_risk = 0
width=len(str(len(disk['Partitions'])))
for par in disk['Partitions']:
# Detail each partition
if par['Number'] in bad_parts:
print_warning(' * Partition {Number:>{width}}:\t{Size} {FileSystem}\t\t{q}{Name}{q}\t{Description} ({OS})'.format(
width=width,
q='"' if par['Name'] != '' else '',
**par))
else:
# Update info for WIM capture
par['ImageName'] = str(par['Name'])
if par['ImageName'] == '':
par['ImageName'] = 'Unknown'
if 'IP' in dest:
par['ImagePath'] = '\\\\{IP}\\{Share}\\{ticket}'.format(ticket=ticket, **dest)
else:
par['ImagePath'] = '{Letter}:\\{ticket}'.format(ticket=ticket, **dest)
par['ImageFile'] = '{Number}_{ImageName}'.format(**par)
par['ImageFile'] = '{fixed_name}.wim'.format(fixed_name=re.sub(r'\W', '_', par['ImageFile']))
# Check for existing backups
par['ImageExists'] = False
if os.path.exists('{ImagePath}\\{ImageFile}'.format(**par)):
par['ImageExists'] = True
clobber_risk += 1
print_info(' + Partition {Number:>{width}}:\t{Size} {FileSystem} (Used: {Used Space})\t{q}{Name}{q}'.format(
width=width,
q='"' if par['Name'] != '' else '',
**par))
else:
print(' Partition {Number:>{width}}:\t{Size} {FileSystem} (Used: {Used Space})\t{q}{Name}{q}'.format(
width=width,
q='"' if par['Name'] != '' else '',
**par))
print('') # Spacer
# Add warning about partition(s) that will be skipped
if len(bad_parts) > 1:
print_warning(' * Unable to backup these partitions')
elif len(bad_parts) == 1:
print_warning(' * Unable to backup this partition')
if clobber_risk > 1:
print_info(' + These partitions already have backup images on {Display Name}:'.format(**dest))
elif clobber_risk == 1:
print_info(' + This partition already has a backup image on {Display Name}:'.format(**dest))
if clobber_risk + len(bad_parts) > 1:
print_warning('\nIf you continue the partitions marked above will NOT be backed up.\n')
if clobber_risk + len(bad_parts) == 1:
print_warning('\nIf you continue the partition marked above will NOT be backed up.\n')
# (re)display the destination
print(' Destination:\t{name}\n'.format(name=dest.get('Display Name', dest['Name'])))
# Ask to proceed
if (not ask('Proceed with backup?')):
abort_to_main_menu('Aborting Backup Creation')
# Backup partition(s)
print('\n\nStarting task.\n')
errors = False
for par in disk['Partitions']:
print(' Partition {Number} Backup...\t\t'.format(**par), end='', flush=True)
if par['Number'] in bad_parts:
print_warning('Skipped.')
else:
cmd = '{bin}\\wimlib\\wimlib-imagex capture {Letter}:\\ "{ImagePath}\\{ImageFile}" "{ImageName}" "{ImageName}" --compress=fast'.format(bin=bin, **par)
if par['ImageExists']:
print_warning('Skipped.')
else:
try:
os.makedirs('{ImagePath}'.format(**par), exist_ok=True)
run_program(cmd)
print_success('Complete.')
except subprocess.CalledProcessError as err:
print_error('Failed.')
errors = True
par['Error'] = err.stderr.decode().splitlines()
# Verify backup(s)
if len(par) - len(bad_parts) > 1:
print('\n\n Verifying backups\n')
else:
print('\n\n Verifying backup\n')
for par in disk['Partitions']:
if par['Number'] not in bad_parts:
print(' Partition {Number} Image...\t\t'.format(**par), end='', flush=True)
cmd = '{bin}\\wimlib\\wimlib-imagex verify "{ImagePath}\\{ImageFile}" --nocheck'.format(bin=bin, **par)
if not os.path.exists('{ImagePath}\\{ImageFile}'.format(**par)):
print_error('Missing.')
else:
try:
run_program(cmd)
print_success('OK.')
except subprocess.CalledProcessError as err:
print_error('Damaged.')
errors = True
par['Error'] = par.get('Error', []) + err.stderr.decode().splitlines()
# Print summary
if errors:
print_warning('\nErrors were encountered and are detailed below.')
for par in [p for p in disk['Partitions'] if 'Error' in p]:
print(' Partition {Number} Error:'.format(**par))
for line in par['Error']:
line = line.strip()
if line != '':
print_error('\t{line}'.format(line=line))
time.sleep(300)
else:
print_success('\nNo errors were encountered during imaging.')
time.sleep(10)
pause('\nPress Enter to return to main menu... ')
def menu_windows_setup():
"""Format a drive, partition for MBR or GPT, apply a Windows image, and rebuild the boot files"""
# Select the version of Windows to apply
os.system('cls')
selected_windows_version = select_windows_version()
if selected_windows_version is None:
abort_to_main_menu('Aborting Windows setup')
# Find Windows image
image = find_windows_image(selected_windows_version['ImageFile'])
if not any(image):
print_error('Failed to find Windows source image for {winver}'.format(winver=selected_windows_version['Name']))
abort_to_main_menu('Aborting Windows setup')
# Select drive to use as the OS drive
dest_drive = select_disk('To which drive are we installing Windows?')
if dest_drive is None:
abort_to_main_menu('Aborting Windows setup')
# Confirm drive format
print_warning('All data will be deleted from the following drive:')
print_warning('\t{Size}\t({Table}) {Name}'.format(**dest_drive))
if (not ask('Is this correct?')):
abort_to_main_menu('Aborting Windows setup')
# MBR/Legacy or GPT/UEFI?
use_gpt = True
if (BOOT_TYPE == 'UEFI'):
if (not ask("Setup drive using GPT (UEFI) layout?")):
use_gpt = False
else:
if (ask("Setup drive using MBR (legacy) layout?")):
use_gpt = False
# Safety check
print_warning('SAFETY CHECK\n')
print_error(' FORMATTING:\tDrive: {Size}\t[{Table}] ({Type}) {Name}'.format(**dest_drive))
if len(dest_drive['Partitions']) > 0:
width=len(str(len(dest_drive['Partitions'])))
for par in dest_drive['Partitions']:
if 'Letter' not in par or re.search(r'(RAW)', par['FileSystem']):
print_error('\t\tPartition {Number:>{width}}:\t{Size} {q}{Name}{q} ({FileSystem})\t\t{Description} ({OS})'.format(
width=width,
q='"' if par['Name'] != '' else '',
**par))
else:
print_error('\t\tPartition {Number:>{width}}:\t{Size} {q}{Name}{q} ({FileSystem})\t\t(Used space: {Used Space})'.format(
width=width,
q='"' if par['Name'] != '' else '',
**par))
else:
print_warning('\t\tNo partitions found')
if (use_gpt):
print(' Using: \tGPT (UEFI) layout')
else:
print(' Using: \tMBR (legacy) layout')
print_info(' Installing:\t{winver}'.format(winver=selected_windows_version['Name']))
if (not ask('\nIs this correct?')):
abort_to_main_menu('Aborting Windows setup')
# Release currently used volume letters (ensures that the drives will get S, T, & W as needed below)
remove_volume_letters(keep=image['Source'])
# Format and partition drive
if (use_gpt):
format_gpt(dest_drive, selected_windows_version['Family'])
else:
format_mbr(dest_drive)
# Apply Windows image
errors = False
print(' Applying image...')
cmd = '{bin}\\wimlib\\wimlib-imagex apply "{File}.{Ext}" "{ImageName}" W:\\ {Glob}'.format(bin=bin, **image, **selected_windows_version)
try:
run_program(cmd)
except subprocess.CalledProcessError:
errors = True
print_error('Failed to apply Windows image.')
# Create boot files
if not errors:
print(' Creating boot files...'.format(**selected_windows_version))
try:
run_program('bcdboot W:\\Windows /s S: /f ALL')
except subprocess.CalledProcessError:
errors = True
print_error('Failed to create boot files.')
if re.search(r'^(8|10)', selected_windows_version['Family']):
try:
run_program('W:\\Windows\\System32\\reagentc /setreimage /path T:\\Recovery\\WindowsRE /target W:\\Windows')
except subprocess.CalledProcessError:
# errors = True # Changed to warning.
print_warning('Failed to setup WindowsRE files.')
# Print summary
if errors:
print_warning('\nErrors were encountered during setup.')
time.sleep(300)
else:
print_success('\nNo errors were encountered during setup.')
time.sleep(10)
pause('\nPress Enter to return to main menu... ')
def menu_tools():
tools = [
{'Name': 'Blue Screen View', 'Folder': 'BlueScreenView', 'File': 'BlueScreenView.exe'},
{'Name': 'CPU-Z', 'Folder': 'CPU-Z', 'File': 'cpuz.exe'},
{'Name': 'Explorer++', 'Folder': 'Explorer++', 'File': 'Explorer++.exe'},
{'Name': 'Fast Copy', 'Folder': 'FastCopy', 'File': 'FastCopy.exe', 'Args': ['/log', '/logfile=X:\WK\Info\FastCopy.log', '/cmd=noexist_only', '/utf8', '/skip_empty_dir', '/linkdest', '/open_window', '/balloon=FALSE', r'/exclude=$RECYCLE.BIN;$Recycle.Bin;.AppleDB;.AppleDesktop;.AppleDouble;.com.apple.timemachine.supported;.dbfseventsd;.DocumentRevisions-V100*;.DS_Store;.fseventsd;.PKInstallSandboxManager;.Spotlight*;.SymAV*;.symSchedScanLockxz;.TemporaryItems;.Trash*;.vol;.VolumeIcon.icns;desktop.ini;Desktop?DB;Desktop?DF;hiberfil.sys;lost+found;Network?Trash?Folder;pagefile.sys;Recycled;RECYCLER;System?Volume?Information;Temporary?Items;Thumbs.db']},
{'Name': 'HWiNFO', 'Folder': 'HWiNFO', 'File': 'HWiNFO.exe'},
{'Name': 'HW Monitor', 'Folder': 'HWMonitor', 'File': 'HWMonitor.exe'},
{'Name': 'NT Password Editor', 'Folder': 'NT Password Editor', 'File': 'ntpwedit.exe'},
{'Name': 'Notepad2', 'Folder': 'Notepad2', 'File': 'Notepad2-Mod.exe'},
{'Name': 'PhotoRec', 'Folder': 'TestDisk', 'File': 'photorec_win.exe', 'Args': ['-new_console:n']},
{'Name': 'Prime95', 'Folder': 'Prime95', 'File': 'prime95.exe'},
{'Name': 'ProduKey', 'Folder': 'ProduKey', 'File': 'ProduKey.exe', 'Args': ['/external', '/ExtractEdition:1']},
{'Name': 'Q-Dir', 'Folder': 'Q-Dir', 'File': 'Q-Dir.exe'},
{'Name': 'TestDisk', 'Folder': 'TestDisk', 'File': 'testdisk_win.exe', 'Args': ['-new_console:n']},
]
actions = [
{'Name': 'Main Menu', 'Letter': 'M'},
]
# Menu loop
while True:
selection = menu_select('Tools Menu', tools, actions)
if (selection.isnumeric()):
tool = tools[int(selection)-1]
cmd = ['{bin}\\{folder}\\{file}'.format(bin=bin, folder=tool['Folder'], file=tool['File'])]
if tool['Name'] == 'Blue Screen View':
# Select path to scan
minidump_path = select_minidump_path()
if minidump_path is not None:
tool['Args'] = ['/MiniDumpFolder', minidump_path]
if 'Args' in tool:
cmd += tool['Args']
try:
subprocess.Popen(cmd)
except:
print_error('Failed to run {prog}'.format(prog=tool['Name']))
time.sleep(2)
elif (selection == 'M'):
break
def menu_main():
menus = [
{'Name': 'Create Backups', 'Menu': menu_backup_imaging},
{'Name': 'Install Windows', 'Menu': menu_windows_setup},
{'Name': 'Misc Tools', 'Menu': menu_tools},
]
actions = [
{'Name': 'Command Prompt', 'Letter': 'C'},
{'Name': 'Reboot', 'Letter': 'R'},
{'Name': 'Shutdown', 'Letter': 'S'},
]
# Main loop
while True:
selection = menu_select('Main Menu', menus, actions, secret_exit=True)
if (selection.isnumeric()):
try:
menus[int(selection)-1]['Menu']()
except AbortException:
pass
except:
print_error('Major exception in: {menu}'.format(menu=menus[int(selection)-1]['Name']))
print_warning(' Please let The Wizard know and he\'ll look into it (Please include the details below).')
print(traceback.print_exc())
print_info(' You can reboot and try again but if this crashes again an alternative approach is required.')
time.sleep(300)
pause('Press Enter to shutdown...')
run_program(['wpeutil', 'shutdown'])
elif (selection == 'C'):
run_program(['cmd', '-new_console:n'], check=False)
elif (selection == 'R'):
run_program(['wpeutil', 'reboot'])
elif (selection == 'S'):
run_program(['wpeutil', 'shutdown'])
else:
quit()
if __name__ == '__main__':
menu_main()

View file

@ -0,0 +1,325 @@
# Wizard Kit: - PARTITION UIDs
# sources: https://en.wikipedia.org/wiki/GUID_Partition_Table
# https://en.wikipedia.org/wiki/Partition_type
PARTITION_UIDS = {
'00': {'OS': 'All', 'Description': 'Empty partition entry'},
'01': {'OS': 'DOS 2.0+', 'Description': 'FAT12 as primary partition in first physical 32 MB of disk or as logical drive anywhere on disk (else use 06hinstead)'},
'02': {'OS': 'XENIX', 'Description': 'XENIX root'},
'03': {'OS': 'XENIX', 'Description': 'XENIX usr'},
'04': {'OS': 'DOS 3.0+', 'Description': 'FAT16 with less than 65536 sectors (32 MB). As primary partition it must reside in first physical 32 MB of disk, or as logical drive anywhere on disk (else use 06h instead).'},
'05': {'OS': 'DOS (3.2) 3.3+ / SpeedStor', 'Description': 'Extended partition with CHS addressing. It must reside in first physical 8 GB of disk, else use 0Fh instead / can occur in SpeedStor MBRs'},
'06': {'OS': 'DOS 3.31+', 'Description': 'FAT16B with 65536 or more sectors. It must reside in first physical 8 GB of disk, unless used for logical drives in an 0Fh extended partition (else use 0Eh instead). Also used for FAT12 and FAT16 volumes in primary partitions if they are not residing in first physical 32 MB of disk.'},
'07': {'OS': 'OS/2 1.2+ / OS/2 1.2+, Windows NT / Windows NT / Windows Embedded CE / QNX 2', 'Description': 'IFS / HPFS / NTFS / exFAT / QNX "qnx" (7) (pre-1988 only)'},
'08': {'OS': 'Commodore MS-DOS 3.x / OS/2 1.0-1.3 / AIX / QNX 1.x/2.x', 'Description': 'Logical sectored FAT12 or FAT16 / OS/2 (FAT?) / AIX boot/split / SplitDrive / QNX "qny" (8) / partition spanning multiple drives'},
'09': {'OS': 'AIX / QNX 1.x/2.x / Coherent / OS-9', 'Description': 'AIX data/boot / QNX "qnz" (9) / Coherent file system / OS-9 RBF'},
'0A': {'OS': 'OS/2 / Coherent', 'Description': 'OS/2 Boot Manager / Coherent swap partition'},
'0B': {'OS': 'DOS 7.1+', 'Description': 'FAT32 with CHS addressing'},
'0C': {'OS': 'DOS 7.1+', 'Description': 'FAT32 with LBA'},
'0D': {'OS': 'Silicon Safe', 'Description': 'Reserved'},
'0E': {'OS': 'DOS 7.0+', 'Description': 'FAT16B with LBA'},
'0F': {'OS': 'DOS 7.0+', 'Description': 'Extended partition with LBA'},
'10': {'OS': 'OPUS', 'Description': 'Unknown'},
'11': {'OS': 'Leading Edge MS-DOS 3.x / OS/2 Boot Manager', 'Description': 'Logical sectored FAT12 or FAT16 / Hidden FAT12 '},
'12': {'OS': 'Compaq Contura', 'Description': 'configuration partition (bootable FAT) / configuration partition / hibernation partition / diagnostics and firmware partition (bootable FAT) / service partition (bootable FAT) / Rescue and Recovery partition'},
'14': {'OS': 'AST MS-DOS 3.x / OS/2 Boot Manager / Maverick OS', 'Description': 'Logical sectored FAT12 or FAT16 / Hidden FAT16 / Omega file system'},
'15': {'OS': 'OS/2 Boot Manager / Maverick OS', 'Description': 'Hidden extended partition with CHS addressing / swap'},
'16': {'OS': 'OS/2 Boot Manager', 'Description': 'Hidden FAT16B '},
'17': {'OS': 'OS/2 Boot Manager', 'Description': 'Hidden IFS / Hidden HPFS / Hidden NTFS / Hidden exFAT '},
'18': {'OS': 'AST Windows', 'Description': 'AST Zero Volt Suspend or SmartSleep partition'},
'19': {'OS': 'Willowtech Photon coS', 'Description': 'Willowtech Photon coS'},
'1B': {'OS': 'OS/2 Boot Manager', 'Description': 'Hidden FAT32 '},
'1C': {'OS': 'OS/2 Boot Manager', 'Description': 'Hidden FAT32 with LBA '},
'1E': {'OS': 'OS/2 Boot Manager', 'Description': 'Hidden FAT16 with LBA '},
'1F': {'OS': 'OS/2 Boot Manager', 'Description': 'Hidden extended partition with LBA addressing '},
'20': {'OS': 'Windows Mobile', 'Description': 'Windows Mobile update XIP / Willowsoft Overture File System (OFS1)'},
'21': {'OS': 'Oxygen', 'Description': 'HP Volume Expansion (SpeedStor) / FSo2 (Oxygen File System)'},
'22': {'OS': 'Oxygen', 'Description': 'Oxygen Extended Partition Table'},
'23': {'OS': 'Windows Mobile', 'Description': 'Reserved / Windows Mobile boot XIP'},
'24': {'OS': 'NEC MS-DOS 3.30', 'Description': 'Logical sectored FAT12 or FAT16 '},
'25': {'OS': 'Windows Mobile', 'Description': 'Windows Mobile IMGFS[citation needed]'},
'26': {'OS': 'Microsoft, IBM', 'Description': 'Reserved'},
'27': {'OS': 'Windows / PQservice / MirOS BSD / RooterBOOT', 'Description': 'Windows Recovery Environment (RE) partition (hidden NTFS partition type 07h) / FAT32 or NTFS rescue partition / MirOS partition / RooterBOOT kernel partition (contains a raw ELF Linux kernel, no file system)'},
'2A': {'OS': 'AtheOS', 'Description': 'AtheOS file system (AthFS, AFS) (an extension of BFS, see 2Bh and EBh) / Reserved'},
'2B': {'OS': 'SyllableOS', 'Description': 'SyllableSecure (SylStor), a variant of AthFS (an extension of BFS, see 2Ah and EBh)'},
'31': {'OS': 'Microsoft, IBM', 'Description': 'Reserved'},
'32': {'OS': 'NOS', 'Description': 'Unknown'},
'33': {'OS': 'Microsoft, IBM', 'Description': 'Reserved'},
'34': {'OS': 'Microsoft, IBM', 'Description': 'Reserved'},
'35': {'OS': 'OS/2 Warp Server /eComStation', 'Description': 'JFS (OS/2 implementation of AIX Journaling File system)'},
'36': {'OS': 'Microsoft, IBM', 'Description': 'Reserved'},
'38': {'OS': 'THEOS', 'Description': 'THEOS version 3.2, 2 GB partition'},
'39': {'OS': 'Plan 9 / THEOS', 'Description': 'Plan 9 edition 3 partition (sub-partitions described in second sector of partition) / THEOS version 4 spanned partition'},
'3A': {'OS': 'THEOS', 'Description': 'THEOS version 4, 4 GB partition'},
'3B': {'OS': 'THEOS', 'Description': 'THEOS version 4 extended partition'},
'3C': {'OS': 'PartitionMagic', 'Description': 'PqRP (PartitionMagic or DriveImage in progress)'},
'3D': {'OS': 'PartitionMagic', 'Description': 'Hidden NetWare'},
'3F': {'OS': 'OS/32', 'Description': 'Unknown'},
'40': {'OS': 'PICK / Venix', 'Description': 'PICK R83 / Venix 80286'},
'41': {'OS': 'Personal RISC / Linux / PowerPC', 'Description': 'Personal RISC Boot / Old Linux/Minix (disk shared with DR DOS 6.0) / PPC PReP (Power PC Reference Platform) Boot'},
'42': {'OS': 'SFS / Linux / Windows 2000, XP, etc.', 'Description': 'Secure File system (SFS) / Old Linux swap (disk shared with DR DOS 6.0) / Dynamic extended partition marker'},
'43': {'OS': 'Linux', 'Description': 'Old Linux native (disk shared with DR DOS 6.0) '},
'44': {'OS': 'GoBack', 'Description': 'Norton GoBack, WildFile GoBack, Adaptec GoBack, Roxio GoBack'},
'45': {'OS': 'Boot-US / EUMEL/ELAN', 'Description': 'Priam / Boot-US boot manager (1 cylinder) / EUMEL/ELAN (L2)'},
'46': {'OS': 'EUMEL/ELAN', 'Description': 'EUMEL/ELAN (L2)'},
'47': {'OS': 'EUMEL/ELAN', 'Description': 'EUMEL/ELAN (L2)'},
'48': {'OS': 'EUMEL/ELAN', 'Description': 'EUMEL/ELAN (L2), ERGOS L3'},
'4A': {'OS': 'AdaOS / ALFS/THIN', 'Description': 'Aquila / ALFS/THIN advanced lightweight file system for DOS'},
'4C': {'OS': 'ETH Oberon', 'Description': 'Aos (A2) file system (76)'},
'4D': {'OS': 'QNX 4.x, Neutrino', 'Description': 'Primary QNX POSIX volume on disk (77)'},
'4E': {'OS': 'QNX 4.x, Neutrino', 'Description': 'Secondary QNX POSIX volume on disk (78)'},
'4F': {'OS': 'QNX 4.x, Neutrino / ETH Oberon', 'Description': 'Tertiary QNX POSIX volume on disk (79) / boot / native file system (79)'},
'50': {'OS': 'ETH Oberon / Disk Manager 4 / LynxOS / Novell', 'Description': 'Alternative native file system (80) / Read-only partition (old) / Lynx RTOS'},
'51': {'OS': 'Disk Manager 4-6', 'Description': 'Read-write partition (Aux 1)'},
'52': {'OS': 'CP/M-80 / System V/AT, V/386', 'Description': 'CP/M-80'},
'53': {'OS': 'Disk Manager 6', 'Description': 'Auxiliary 3 (WO)'},
'54': {'OS': 'Disk Manager 6', 'Description': 'Dynamic Drive Overlay (DDO)'},
'55': {'OS': 'EZ-Drive', 'Description': 'EZ-Drive, Maxtor, MaxBlast, or DriveGuide INT 13h redirector volume'},
'56': {'OS': 'AT&T MS-DOS 3.x / EZ-Drive / VFeature', 'Description': 'Logical sectored FAT12 or FAT16 / Disk Manager partition converted to EZ-BIOS / VFeature partitionned volume'},
'57': {'OS': 'DrivePro', 'Description': 'VNDI partition'},
'5C': {'OS': 'EDISK', 'Description': 'Priam EDisk Partitioned Volume '},
'61': {'OS': 'SpeedStor', 'Description': 'Unknown'},
'63': {'OS': 'Unix', 'Description': 'SCO Unix, ISC, UnixWare, AT&T System V/386, ix, MtXinu BSD 4.3 on Mach, GNU HURD'},
'64': {'OS': 'SpeedStor / NetWare', 'Description': 'NetWare File System 286/2 / PC-ARMOUR'},
'65': {'OS': 'NetWare', 'Description': 'NetWare File System 386'},
'66': {'OS': 'NetWare / NetWare', 'Description': 'NetWare File System 386 / Storage Management Services (SMS)'},
'67': {'OS': 'NetWare', 'Description': 'Wolf Mountain'},
'68': {'OS': 'NetWare', 'Description': 'Unknown'},
'69': {'OS': 'NetWare 5 / NetWare', 'Description': 'Novell Storage Services (NSS)'},
'6E': {'Description': 'Unknown'},
'70': {'OS': 'DiskSecure', 'Description': 'DiskSecure multiboot'},
'71': {'OS': 'Microsoft, IBM', 'Description': 'Reserved'},
'72': {'OS': 'APTI conformant systems / Unix V7/x86', 'Description': 'APTI alternative FAT12 (CHS, SFN) / V7/x86'},
'73': {'OS': 'Microsoft, IBM', 'Description': 'Reserved'},
'74': {'OS': 'Microsoft, IBM', 'Description': 'Reserved / Scramdisk'},
'75': {'OS': 'PC/IX', 'Description': 'Unknown'},
'76': {'OS': 'Microsoft, IBM', 'Description': 'Reserved'},
'77': {'OS': 'Novell', 'Description': 'VNDI, M2FS, M2CS'},
'78': {'OS': 'Geurt Vos', 'Description': 'XOSL bootloader file system'},
'79': {'OS': 'APTI conformant systems', 'Description': 'APTI alternative FAT16 (CHS, SFN) '},
'7A': {'OS': 'APTI conformant systems', 'Description': 'APTI alternative FAT16 (LBA, SFN) '},
'7B': {'OS': 'APTI conformant systems', 'Description': 'APTI alternative FAT16B (CHS, SFN) '},
'7C': {'OS': 'APTI conformant systems', 'Description': 'APTI alternative FAT32 (LBA, SFN) '},
'7D': {'OS': 'APTI conformant systems', 'Description': 'APTI alternative FAT32 (CHS, SFN) '},
'7E': {'OS': 'F.I.X. (claim) / PrimoCache', 'Description': 'Level 2 cache'},
'7F': {'OS': 'Varies', 'Description': 'Alternative OS Development Partition Standard - reserved for individual or local use and temporary or experimental projects'},
'80': {'OS': 'Minix 1.1-1.4a', 'Description': 'Minix file system (old)'},
'81': {'OS': 'Minix 1.4b+ / Linux', 'Description': 'MINIX file system / Mitac Advanced Disk Manager'},
'82': {'OS': 'Linux / Sun Microsystems', 'Description': 'Linux swap space / Solaris x86 (for Sun disklabels up to 2005) / Prime'},
'83': {'OS': 'GNU/Linux', 'Description': 'Any native Linux file system '},
'84': {'OS': 'OS/2 / Windows 7', 'Description': 'APM hibernation (suspend to disk, S2D) / Hidden C: (FAT16) / Rapid Start technology'},
'85': {'OS': 'GNU/Linux', 'Description': 'Linux extended '},
'86': {'OS': 'Windows NT 4 Server / Linux', 'Description': 'Fault-tolerant FAT16B mirrored volume set / Linux RAID superblock with auto-detect (old)'},
'87': {'OS': 'Windows NT 4 Server', 'Description': 'Fault-tolerant HPFS/NTFS mirrored volume set '},
'88': {'OS': 'GNU/Linux', 'Description': 'Linux plaintext partition table'},
'8A': {'OS': 'AiR-BOOT', 'Description': 'Linux kernel image'},
'8B': {'OS': 'Windows NT 4 Server', 'Description': 'Legacy fault-tolerant FAT32 mirrored volume set '},
'8C': {'OS': 'Windows NT 4 Server', 'Description': 'Legacy fault-tolerant FAT32 mirrored volume set '},
'8D': {'OS': 'Free FDISK', 'Description': 'Hidden FAT12 '},
'8E': {'OS': 'Linux', 'Description': 'Linux LVM'},
'90': {'OS': 'Free FDISK', 'Description': 'Hidden FAT16 '},
'91': {'OS': 'Free FDISK', 'Description': 'Hidden extended partition with CHS addressing '},
'92': {'OS': 'Free FDISK', 'Description': 'Hidden FAT16B '},
'93': {'OS': 'Amoeba / Linux', 'Description': 'Amoeba native file system / Hidden Linux file system'},
'94': {'OS': 'Amoeba', 'Description': 'Amoeba bad block table'},
'95': {'OS': 'EXOPC', 'Description': 'EXOPC native'},
'96': {'OS': 'CHRP', 'Description': 'ISO-9660 file system'},
'97': {'OS': 'Free FDISK', 'Description': 'Hidden FAT32 '},
'98': {'OS': 'Free FDISK / ROM-DOS', 'Description': 'Hidden FAT32 / service partition (bootable FAT) ROM-DOS SuperBoot / service partition (bootable FAT)'},
'99': {'OS': 'early Unix', 'Description': 'Unknown'},
'9A': {'OS': 'Free FDISK', 'Description': 'Hidden FAT16 '},
'9B': {'OS': 'Free FDISK', 'Description': 'Hidden extended partition with LBA '},
'9E': {'OS': 'VSTA / ForthOS', 'Description': 'ForthOS (eForth port)'},
'9F': {'OS': 'BSD/OS 3.0+, BSDI', 'Description': 'Unknown'},
'A0': {'OS': 'Hewlett Packard / Phoenix, IBM, Toshiba, Sony', 'Description': 'Diagnostic partition for HP laptops / Hibernate partition'},
'A1': {'OS': 'Hewlett Packard / Phoenix, NEC', 'Description': 'HP Volume Expansion (SpeedStor) / Hibernate partition'},
'A2': {'OS': 'Cyclone V', 'Description': 'Hard Processor System (HPS) ARM preloader'},
'A3': {'OS': 'Hewlett Packard', 'Description': 'HP Volume Expansion (SpeedStor)'},
'A4': {'OS': 'Hewlett Packard', 'Description': 'HP Volume Expansion (SpeedStor)'},
'A5': {'OS': 'BSD', 'Description': 'BSD slice (BSD/386, 386BSD, NetBSD (old), FreeBSD)'},
'A6': {'OS': 'OpenBSD', 'Description': 'HP Volume Expansion (SpeedStor) / OpenBSD slice'},
'A7': {'OS': 'NeXT', 'Description': 'NeXTSTEP'},
'A8': {'OS': 'Darwin, Mac OS X', 'Description': 'Apple Darwin, Mac OS X UFS'},
'A9': {'OS': 'NetBSD', 'Description': 'NetBSD slice'},
'AA': {'OS': 'MS-DOS', 'Description': 'Olivetti MS-DOS FAT12 (1.44 MB) '},
'AB': {'OS': 'Darwin, Mac OS X / GO! OS', 'Description': 'Apple Darwin, Mac OS X boot / GO!'},
'AD': {'OS': 'RISC OS', 'Description': 'ADFS / FileCore format'},
'AE': {'OS': 'ShagOS', 'Description': 'ShagOS file system'},
'AF': {'OS': 'ShagOS', 'Description': 'Apple Mac OS X HFS and HFS+ / ShagOS swap'},
'B0': {'OS': 'Boot-Star', 'Description': 'Boot-Star dummy partition'},
'B1': {'OS': 'QNX 6.x', 'Description': 'HP Volume Expansion (SpeedStor) / QNX Neutrino power-safe file system'},
'B2': {'OS': 'QNX 6.x', 'Description': 'QNX Neutrino power-safe file system'},
'B3': {'OS': 'QNX 6.x', 'Description': 'HP Volume Expansion (SpeedStor) / QNX Neutrino power-safe file system'},
'B4': {'OS': 'Hewlett Packard', 'Description': 'HP Volume Expansion (SpeedStor)'},
'B6': {'OS': 'Windows NT 4 Server', 'Description': 'HP Volume Expansion (SpeedStor) / Corrupted fault-tolerant FAT16B mirrored master volume '},
'B7': {'OS': 'BSDI (before 3.0) / Windows NT 4 Server', 'Description': 'BSDI native file system / swap / Corrupted fault-tolerant HPFS/NTFS mirrored master volume '},
'B8': {'OS': 'BSDI (before 3.0)', 'Description': 'BSDI swap / native file system'},
'BB': {'OS': 'BootWizard, OS Selector / Acronis True Image / Windows NT 4 Server', 'Description': 'PTS BootWizard 4 / OS Selector 5 for hidden partitions other than 01h, 04h, 06h, 07h, 0Bh, 0Ch, 0Eh and unformatted partitions / OEM Secure Zone (corresponds to BCh) / Corrupted fault-tolerant FAT32 mirrored master volume '},
'BC': {'OS': 'Windows NT 4 Server / Acronis True Image / Backup Capsule', 'Description': 'Corrupted fault-tolerant FAT32 mirrored master volume / Acronis Secure Zone / Backup Capsule'},
'BD': {'OS': 'BonnyDOS/286', 'Description': 'Unknown'},
'BE': {'OS': 'Solaris 8', 'Description': 'Solaris 8 boot'},
'BF': {'OS': 'Solaris', 'Description': 'Solaris x86 (for Sun disklabels, since 2005)'},
'C0': {'OS': 'DR-DOS, Multiuser DOS,REAL/32', 'Description': 'Secured FAT partition (smaller than 32 MB)'},
'C1': {'OS': 'DR DOS 6.0+', 'Description': 'Secured FAT12 '},
'C2': {'OS': 'Power Boot', 'Description': 'Hidden Linux native file system'},
'C3': {'OS': 'Power Boot', 'Description': 'Hidden Linux swap'},
'C4': {'OS': 'DR DOS 6.0+', 'Description': 'Secured FAT16 '},
'C5': {'OS': 'DR DOS 6.0+', 'Description': 'Secured extended partition with CHS addressing '},
'C6': {'OS': 'DR DOS 6.0+ / Windows NT 4 Server', 'Description': 'Secured FAT16B / Corrupted fault-tolerant FAT16B mirrored slave volume '},
'C7': {'OS': 'Syrinx / Windows NT 4 Server', 'Description': 'Syrinx boot / Corrupted fault-tolerant HPFS/NTFS mirrored slave volume '},
'C8': {'Description': 'Reserved for DR-DOS since 1997'},
'C9': {'Description': 'Reserved for DR-DOS since 1997'},
'CA': {'Description': 'Reserved for DR-DOS since 1997'},
'CB': {'OS': 'DR-DOS 7.0x / Windows NT 4 Server', 'Description': 'Secured FAT32 / Corrupted fault-tolerant FAT32 mirrored slave volume '},
'CC': {'OS': 'DR-DOS 7.0x / Windows NT 4 Server', 'Description': 'Secured FAT32 / Corrupted fault-tolerant FAT32 mirrored slave volume '},
'CD': {'OS': 'CTOS', 'Description': 'Memory dump'},
'CE': {'OS': 'DR-DOS 7.0x', 'Description': 'Secured FAT16B '},
'CF': {'OS': 'DR-DOS 7.0x', 'Description': 'Secured extended partition with LBA '},
'D0': {'OS': 'Multiuser DOS, REAL/32', 'Description': 'Secured FAT partition (larger than 32 MB)'},
'D1': {'OS': 'Multiuser DOS', 'Description': 'Secured FAT12 '},
'D4': {'OS': 'Multiuser DOS', 'Description': 'Secured FAT16 '},
'D5': {'OS': 'Multiuser DOS', 'Description': 'Secured extended partition with CHS addressing '},
'D6': {'OS': 'Multiuser DOS', 'Description': 'Secured FAT16B '},
'D8': {'OS': 'Digital Research', 'Description': 'CP/M-86 [citation needed]'},
'DA': {'OS': 'Powercopy Backup', 'Description': 'Non-file system data / Shielded disk'},
'DB': {'OS': 'CP/M-86,Concurrent CP/M-86,Concurrent DOS / CTOS / D800 / DRMK', 'Description': 'CP/M-86, Concurrent CP/M-86, Concurrent DOS / boot image for x86 supervisor CPU (SCPU) module / FAT32 system restore partition (DSR)'},
'DD': {'OS': 'CTOS', 'Description': 'Hidden memory dump'},
'DE': {'OS': 'Dell', 'Description': 'FAT16 utility/diagnostic partition'},
'DF': {'OS': 'DG/UX / BootIt / Aviion', 'Description': 'DG/UX virtual disk manager / EMBRM'},
'E0': {'OS': 'STMicroelectronics', 'Description': 'ST AVFS'},
'E1': {'OS': 'SpeedStor', 'Description': 'Extended FAT12 (> 1023 cylinder)'},
'E2': {'Description': 'DOS read-only (XFDISK)'},
'E3': {'OS': 'SpeedStor', 'Description': 'DOS read-only'},
'E4': {'OS': 'SpeedStor', 'Description': 'Extended FAT16 (< 1024 cylinder)'},
'E5': {'OS': 'Tandy MS-DOS', 'Description': 'Logical sectored FAT12 or FAT16'},
'E6': {'OS': 'SpeedStor', 'Description': 'Unknown'},
'E8': {'OS': 'LUKS', 'Description': 'Linux Unified Key Setup'},
'EB': {'OS': 'BeOS, Haiku', 'Description': 'BFS'},
'EC': {'OS': 'SkyOS', 'Description': 'SkyFS'},
'ED': {'OS': 'Sprytix / EDD 4', 'Description': 'EDC loader / GPT hybrid MBR'},
'EE': {'OS': 'EFI', 'Description': 'GPT protective MBR'},
'EF': {'OS': 'EFI', 'Description': 'EFI system partition can be a FAT12, FAT16, FAT32 (or other) file system'},
'F0': {'OS': 'Linux / OS/32', 'Description': 'PA-RISC Linux boot loader. It must reside in first physical 2 GB. / floppy'},
'F1': {'OS': 'SpeedStor', 'Description': 'Unknown'},
'F2': {'OS': 'Sperry IT MS-DOS 3.x, Unisys MS-DOS 3.3, Digital ResearchDOS Plus 2.1', 'Description': 'Logical sectored FAT12 or FAT16 secondary partition'},
'F3': {'OS': 'SpeedStor', 'Description': 'Unknown'},
'F4': {'OS': 'SpeedStor / Prologue', 'Description': '"large" DOS partition / single volume partition for NGF or TwinFS'},
'F5': {'OS': 'Prologue', 'Description': 'MD0-MD9 multi volume partition for NGF or TwinFS'},
'F6': {'OS': 'SpeedStor', 'Description': 'Unknown'},
'F7': {'OS': 'O.S.G. / X1', 'Description': 'EFAT / Solid State file system'},
'F9': {'OS': 'Linux', 'Description': 'pCache ext2/ext3 persistent cache'},
'FA': {'OS': 'Bochs', 'Description': 'x86 emulator'},
'FB': {'OS': 'VMware', 'Description': 'VMware VMFS file system partition'},
'FC': {'OS': 'VMware', 'Description': 'VMware swap / VMKCORE kernel dump partition'},
'FD': {'OS': 'Linux / FreeDOS', 'Description': 'Linux RAID superblock with auto-detect / Reserved for FreeDOS'},
'FE': {'OS': 'SpeedStor / LANstep / Windows NT / Linux', 'Description': 'partition > 1024 cylinder / PS/2 IML partition / PS/2 recovery partition (FAT12 reference disk floppy image), / Disk Administration hidden partition / old Linux LVM'},
'FF': {'OS': 'XENIX', 'Description': 'XENIX bad block table'},
'00000000-0000-0000-0000-000000000000': {'Description': 'Unused entry'},
'024DEE41-33E7-11D3-9D69-0008C781F39F': {'Description': 'MBR partition scheme'},
'C12A7328-F81F-11D2-BA4B-00A0C93EC93B': {'Description': 'EFI System partition'},
'21686148-6449-6E6F-744E-656564454649': {'Description': 'BIOS Boot partition'},
'D3BFE2DE-3DAF-11DF-BA40-E3A556D89593': {'Description': 'Intel Fast Flash (iFFS) partition (for Intel Rapid Start technology)'},
'F4019732-066E-4E12-8273-346C5641494F': {'Description': 'Sony boot partition'},
'BFBFAFE7-A34F-448A-9A5B-6213EB736C22': {'Description': 'Lenovo boot partition'},
'E3C9E316-0B5C-4DB8-817D-F92DF00215AE': {'OS': 'Windows', 'Description': 'Microsoft Reserved Partition (MSR)'},
'EBD0A0A2-B9E5-4433-87C0-68B6B72699C7': {'OS': 'Windows', 'Description': 'Basic data partition'},
'5808C8AA-7E8F-42E0-85D2-E1E90434CFB3': {'OS': 'Windows', 'Description': 'Logical Disk Manager (LDM) metadata partition'},
'AF9B60A0-1431-4F62-BC68-3311714A69AD': {'OS': 'Windows', 'Description': 'Logical Disk Manager data partition'},
'DE94BBA4-06D1-4D40-A16A-BFD50179D6AC': {'OS': 'Windows', 'Description': 'Windows Recovery Environment'},
'37AFFC90-EF7D-4E96-91C3-2D7AE055B174': {'OS': 'Windows', 'Description': 'IBM General Parallel File System (GPFS) partition'},
'E75CAF8F-F680-4CEE-AFA3-B001E56EFC2D': {'OS': 'Windows', 'Description': 'Storage Spaces partition'},
'75894C1E-3AEB-11D3-B7C1-7B03A0000000': {'OS': 'HP-UX', 'Description': 'Data partition'},
'E2A1E728-32E3-11D6-A682-7B03A0000000': {'OS': 'HP-UX', 'Description': 'Service Partition'},
'0FC63DAF-8483-4772-8E79-3D69D8477DE4': {'OS': 'Linux', 'Description': 'Linux filesystem data'},
'A19D880F-05FC-4D3B-A006-743F0F84911E': {'OS': 'Linux', 'Description': 'RAID partition'},
'44479540-F297-41B2-9AF7-D131D5F0458A': {'OS': 'Linux', 'Description': 'Root partition (x86)'},
'4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709': {'OS': 'Linux', 'Description': 'Root partition (x86-64)'},
'69DAD710-2CE4-4E3C-B16C-21A1D49ABED3': {'OS': 'Linux', 'Description': 'Root partition (32-bit ARM)'},
'B921B045-1DF0-41C3-AF44-4C6F280D3FAE': {'OS': 'Linux', 'Description': 'Root partition (64-bit ARM/AArch64)'},
'0657FD6D-A4AB-43C4-84E5-0933C84B4F4F': {'OS': 'Linux', 'Description': 'Swap partition'},
'E6D6D379-F507-44C2-A23C-238F2A3DF928': {'OS': 'Linux', 'Description': 'Logical Volume Manager (LVM) partition'},
'933AC7E1-2EB4-4F13-B844-0E14E2AEF915': {'OS': 'Linux', 'Description': '/home partition'},
'3B8F8425-20E0-4F3B-907F-1A25A76F98E8': {'OS': 'Linux', 'Description': '/srv (server data) partition'},
'7FFEC5C9-2D00-49B7-8941-3EA10A5586B7': {'OS': 'Linux', 'Description': 'Plain dm-crypt partition'},
'CA7D7CCB-63ED-4C53-861C-1742536059CC': {'OS': 'Linux', 'Description': 'LUKS partition'},
'8DA63339-0007-60C0-C436-083AC8230908': {'OS': 'Linux', 'Description': 'Reserved'},
'83BD6B9D-7F41-11DC-BE0B-001560B84F0F': {'OS': 'FreeBSD', 'Description': 'Boot partition'},
'516E7CB4-6ECF-11D6-8FF8-00022D09712B': {'OS': 'FreeBSD', 'Description': 'Data partition'},
'516E7CB5-6ECF-11D6-8FF8-00022D09712B': {'OS': 'FreeBSD', 'Description': 'Swap partition'},
'516E7CB6-6ECF-11D6-8FF8-00022D09712B': {'OS': 'FreeBSD', 'Description': 'Unix File System (UFS) partition'},
'516E7CB8-6ECF-11D6-8FF8-00022D09712B': {'OS': 'FreeBSD', 'Description': 'Vinum volume manager partition'},
'516E7CBA-6ECF-11D6-8FF8-00022D09712B': {'OS': 'FreeBSD', 'Description': 'ZFS partition'},
'48465300-0000-11AA-AA11-00306543ECAC': {'OS': 'OS X Darwin', 'Description': 'Hierarchical File System Plus (HFS+) partition'},
'55465300-0000-11AA-AA11-00306543ECAC': {'OS': 'OS X Darwin', 'Description': 'Apple UFS'},
'6A898CC3-1DD2-11B2-99A6-080020736631': {'OS': 'OS X Darwin', 'Description': 'ZFS'},
'52414944-0000-11AA-AA11-00306543ECAC': {'OS': 'OS X Darwin', 'Description': 'Apple RAID partition'},
'52414944-5F4F-11AA-AA11-00306543ECAC': {'OS': 'OS X Darwin', 'Description': 'Apple RAID partition, offline'},
'426F6F74-0000-11AA-AA11-00306543ECAC': {'OS': 'OS X Darwin', 'Description': 'Apple Boot partition (Recovery HD)'},
'4C616265-6C00-11AA-AA11-00306543ECAC': {'OS': 'OS X Darwin', 'Description': 'Apple Label'},
'5265636F-7665-11AA-AA11-00306543ECAC': {'OS': 'OS X Darwin', 'Description': 'Apple TV Recovery partition'},
'53746F72-6167-11AA-AA11-00306543ECAC': {'OS': 'OS X Darwin', 'Description': 'Apple Core Storage (i.e. Lion FileVault) partition'},
'6A82CB45-1DD2-11B2-99A6-080020736631': {'OS': 'Solaris illumos', 'Description': 'Boot partition'},
'6A85CF4D-1DD2-11B2-99A6-080020736631': {'OS': 'Solaris illumos', 'Description': 'Root partition'},
'6A87C46F-1DD2-11B2-99A6-080020736631': {'OS': 'Solaris illumos', 'Description': 'Swap partition'},
'6A8B642B-1DD2-11B2-99A6-080020736631': {'OS': 'Solaris illumos', 'Description': 'Backup partition'},
'6A898CC3-1DD2-11B2-99A6-080020736631': {'OS': 'Solaris illumos', 'Description': '/usr partition'},
'6A8EF2E9-1DD2-11B2-99A6-080020736631': {'OS': 'Solaris illumos', 'Description': '/var partition'},
'6A90BA39-1DD2-11B2-99A6-080020736631': {'OS': 'Solaris illumos', 'Description': '/home partition'},
'6A9283A5-1DD2-11B2-99A6-080020736631': {'OS': 'Solaris illumos', 'Description': 'Alternate sector'},
'6A945A3B-1DD2-11B2-99A6-080020736631': {'OS': 'Solaris illumos', 'Description': 'Reserved partition'},
'6A9630D1-1DD2-11B2-99A6-080020736631': {'OS': 'Solaris illumos'},
'6A980767-1DD2-11B2-99A6-080020736631': {'OS': 'Solaris illumos'},
'6A96237F-1DD2-11B2-99A6-080020736631': {'OS': 'Solaris illumos'},
'6A8D2AC7-1DD2-11B2-99A6-080020736631': {'OS': 'Solaris illumos'},
'49F48D32-B10E-11DC-B99B-0019D1879648': {'OS': 'NetBSD', 'Description': 'Swap partition'},
'49F48D5A-B10E-11DC-B99B-0019D1879648': {'OS': 'NetBSD', 'Description': 'FFS partition'},
'49F48D82-B10E-11DC-B99B-0019D1879648': {'OS': 'NetBSD', 'Description': 'LFS partition'},
'49F48DAA-B10E-11DC-B99B-0019D1879648': {'OS': 'NetBSD', 'Description': 'RAID partition'},
'2DB519C4-B10F-11DC-B99B-0019D1879648': {'OS': 'NetBSD', 'Description': 'Concatenated partition'},
'2DB519EC-B10F-11DC-B99B-0019D1879648': {'OS': 'NetBSD', 'Description': 'Encrypted partition'},
'FE3A2A5D-4F32-41A7-B725-ACCC3285A309': {'OS': 'ChromeOS', 'Description': 'ChromeOS kernel'},
'3CB8E202-3B7E-47DD-8A3C-7FF2A13CFCEC': {'OS': 'ChromeOS', 'Description': 'ChromeOS rootfs'},
'2E0A753D-9E48-43B0-8337-B15192CB1B5E': {'OS': 'ChromeOS', 'Description': 'ChromeOS future use'},
'42465331-3BA3-10F1-802A-4861696B7521': {'OS': 'Haiku', 'Description': 'Haiku BFS'},
'85D5E45E-237C-11E1-B4B3-E89A8F7FC3A7': {'OS': 'MidnightBSD', 'Description': 'Boot partition'},
'85D5E45A-237C-11E1-B4B3-E89A8F7FC3A7': {'OS': 'MidnightBSD', 'Description': 'Data partition'},
'85D5E45B-237C-11E1-B4B3-E89A8F7FC3A7': {'OS': 'MidnightBSD', 'Description': 'Swap partition'},
'0394EF8B-237E-11E1-B4B3-E89A8F7FC3A7': {'OS': 'MidnightBSD', 'Description': 'Unix File System (UFS) partition'},
'85D5E45C-237C-11E1-B4B3-E89A8F7FC3A7': {'OS': 'MidnightBSD', 'Description': 'Vinum volume manager partition'},
'85D5E45D-237C-11E1-B4B3-E89A8F7FC3A7': {'OS': 'MidnightBSD', 'Description': 'ZFS partition'},
'45B0969E-9B03-4F30-B4C6-B4B80CEFF106': {'OS': 'Ceph', 'Description': 'Ceph Journal'},
'45B0969E-9B03-4F30-B4C6-5EC00CEFF106': {'OS': 'Ceph', 'Description': 'Ceph dm-crypt Encrypted Journal'},
'4FBD7E29-9D25-41B8-AFD0-062C0CEFF05D': {'OS': 'Ceph', 'Description': 'Ceph OSD'},
'4FBD7E29-9D25-41B8-AFD0-5EC00CEFF05D': {'OS': 'Ceph', 'Description': 'Ceph dm-crypt OSD'},
'89C57F98-2FE5-4DC0-89C1-F3AD0CEFF2BE': {'OS': 'Ceph', 'Description': 'Ceph disk in creation'},
'89C57F98-2FE5-4DC0-89C1-5EC00CEFF2BE': {'OS': 'Ceph', 'Description': 'Ceph dm-crypt disk in creation'},
'824CC7A0-36A8-11E3-890A-952519AD3F61': {'OS': 'OpenBSD', 'Description': 'Data partition'},
'CEF5A9AD-73BC-4601-89F3-CDEEEEE321A1': {'OS': 'QNX', 'Description': 'Power-safe (QNX6) file system'},
'C91818F9-8025-47AF-89D2-F030D7000C2C': {'OS': 'Plan 9', 'Description': 'Plan 9 partition'},
'9D275380-40AD-11DB-BF97-000C2911D1B8': {'OS': 'VMware ESX', 'Description': 'vmkcore (coredump partition)'},
'AA31E02A-400F-11DB-9590-000C2911D1B8': {'OS': 'VMware ESX', 'Description': 'VMFS filesystem partition'},
'9198EFFC-31C0-11DB-8F78-000C2911D1B8': {'OS': 'VMware ESX', 'Description': 'VMware Reserved'},
'2568845D-2332-4675-BC39-8FA5A4748D15': {'OS': 'Android-IA', 'Description': 'Bootloader'},
'114EAFFE-1552-4022-B26E-9B053604CF84': {'OS': 'Android-IA', 'Description': 'Bootloader2'},
'49A4D17F-93A3-45C1-A0DE-F50B2EBE2599': {'OS': 'Android-IA', 'Description': 'Boot'},
'4177C722-9E92-4AAB-8644-43502BFD5506': {'OS': 'Android-IA', 'Description': 'Recovery'},
'EF32A33B-A409-486C-9141-9FFB711F6266': {'OS': 'Android-IA', 'Description': 'Misc'},
'20AC26BE-20B7-11E3-84C5-6CFDB94711E9': {'OS': 'Android-IA', 'Description': 'Metadata'},
'38F428E6-D326-425D-9140-6E0EA133647C': {'OS': 'Android-IA', 'Description': 'System'},
'A893EF21-E428-470A-9E55-0668FD91A2D9': {'OS': 'Android-IA', 'Description': 'Cache'},
'DC76DDA9-5AC1-491C-AF42-A82591580C0D': {'OS': 'Android-IA', 'Description': 'Data'},
'EBC597D0-2053-4B15-8B64-E0AAC75F4DB1': {'OS': 'Android-IA', 'Description': 'Persistent'},
'8F68CC74-C5E5-48DA-BE91-A0C8C15E9C80': {'OS': 'Android-IA', 'Description': 'Factory'},
'767941D0-2085-11E3-AD3B-6CFDB94711E9': {'OS': 'Android-IA', 'Description': 'Fastboot / Tertiary'},
'AC6D7924-EB71-4DF8-B48D-E267B27148FF': {'OS': 'Android-IA', 'Description': 'OEM'},
'7412F7D5-A156-4B13-81DC-867174929325': {'OS': 'ONIE', 'Description': 'Boot'},
'D4E6E2CD-4469-46F3-B5CB-1BFF57AFC149': {'OS': 'ONIE', 'Description': 'Config'},
'9E1A2D38-C612-4316-AA26-8B49521E5A8B': {'OS': 'PowerPC', 'Description': 'PReP boot'},
'BC13C2FF-59E6-4262-A352-B275FD6F7172': {'OS': 'Freedesktop', 'Description': 'Extended Boot Partition ($BOOT)'},
}
def lookup_guid(guid):
return PARTITION_UIDS.get(guid.upper(), None)
if __name__ == '__main__':
print("This file is not meant to be called directly.")

View file

@ -1,13 +1,13 @@
# WK-BrowserReset # Wizard Kit: Reset web browsers to safe default while saving user data
## Init ## ## Init ##
$wd = $(Split-Path $MyInvocation.MyCommand.Path) $wd = $(Split-Path $MyInvocation.MyCommand.Path)
pushd "$wd" pushd "$wd"
. .\init.ps1 . .\init.ps1
clear clear
$host.UI.RawUI.WindowTitle = "WK Browser Reset Tool" $host.UI.RawUI.WindowTitle = "Wizard Kit: Browser Reset Tool"
$backup_path = "$WKPath\Backups\$username\$date" $backup_path = "$ClientPath\Backups\$username\$date"
$logpath = "$WKPath\Info\$date" $logpath = "$ClientPath\Info\$date"
md "$backup_path" 2>&1 | out-null md "$backup_path" 2>&1 | out-null
md "$logpath" 2>&1 | out-null md "$logpath" 2>&1 | out-null
$log = "$logpath\Browsers.log" $log = "$logpath\Browsers.log"
@ -22,15 +22,15 @@ if (test-path "$programfiles\Mozilla Firefox\firefox.exe") {
$ff_exe = "$programfiles\Mozilla Firefox\firefox.exe" $ff_exe = "$programfiles\Mozilla Firefox\firefox.exe"
} }
$ff_profile_list = @(gci "$ff_appdata\Profiles" 2> $null | ?{ $_.PSIsContainer }) $ff_profile_list = @(gci "$ff_appdata\Profiles" 2> $null | ?{ $_.PSIsContainer })
$ff_profile_list = $ff_profile_list -inotmatch '\.wkbak' $ff_profile_list = $ff_profile_list -inotmatch '\.WKBak'
$chrome_appdata = "$localappdata\Google\Chrome" $chrome_appdata = "$localappdata\Google\Chrome"
$chrome_clean = $false $chrome_clean = $false
$chrome_exe = "$programfiles86\Google\Chrome\Application\chrome.exe" $chrome_exe = "$programfiles86\Google\Chrome\Application\chrome.exe"
$chrome_profile_list = @(gci "$chrome_appdata\User Data" 2> $null | ?{ $_.PSIsContainer }) $chrome_profile_list = @(gci "$chrome_appdata\User Data" 2> $null | ?{ $_.PSIsContainer })
$chrome_profile_list = $chrome_profile_list -inotmatch '\.wkbak' -imatch '^(Default|Profile)' $chrome_profile_list = $chrome_profile_list -inotmatch '\.WKBak' -imatch '^(Default|Profile)'
# OS Check # OS Check
. .\os_check.ps1 . .\check_os.ps1
if ($arch -eq 64) { if ($arch -eq 64) {
$sz = "$bin\7-Zip\7za64.exe" $sz = "$bin\7-Zip\7za64.exe"
} }
@ -39,27 +39,27 @@ if ($arch -eq 64) {
function gen-backup-name { function gen-backup-name {
param ([String]$name) param ([String]$name)
# Add .wkbak to name # Add .WKBak to name
$newname = "$name.wkbak" $newname = "$name.WKBak"
# Check if the new name exists # Check if the new name exists
if (test-path "$newname") { if (test-path "$newname") {
# Change name to avoid overwriting any backups # Change name to avoid overwriting any backups
$x = 2 $x = 2
$newname = "$name.wkbak$x" $newname = "$name.WKBak$x"
while (test-path "$newname") { while (test-path "$newname") {
$x += 1 $x += 1
$newname = "$name.wkbak$x" $newname = "$name.WKBak$x"
} }
} }
return $newname return $newname
} }
function ff-create-default-profile { function ff-create-default-profile {
wk-write " Creating new default profile" "$log" WK-write " Creating new default profile" "$log"
# Check for existing profiles # Check for existing profiles
if ($ff_profile_list.length -gt 0) { if ($ff_profile_list.length -gt 0) {
wk-error " Firefox profile folders found. Possibly corrupt?" "$log" WK-error " Firefox profile folders found. Possibly corrupt?" "$log"
return $false return $false
} }
@ -78,7 +78,7 @@ function ff-create-default-profile {
"default") "default")
start -wait "$ff_exe" -argumentlist $ff_args -windowstyle minimized start -wait "$ff_exe" -argumentlist $ff_args -windowstyle minimized
} else { } else {
wk-error " firefox.exe not found. Please verify installation." "$log" WK-error " firefox.exe not found. Please verify installation." "$log"
return $false return $false
} }
return $true return $true
@ -86,11 +86,11 @@ function ff-create-default-profile {
## Internet Explorer ## ## Internet Explorer ##
wk-write "==== Internet Explorer ====" "$log" WK-write "==== Internet Explorer ====" "$log"
# Cleanup # Cleanup
if (test-path ".bin\Bleachbit") { if (test-path ".bin\Bleachbit") {
wk-write " Removing temporary files" "$log" WK-write " Removing temporary files" "$log"
pushd ".bin\Bleachbit" pushd ".bin\Bleachbit"
start -wait "bleachbit_console.exe" -argumentlist @("-c", "internet_explorer.forms", "internet_explorer.temporary_files", "winapp2_internet.internet_explorer_10_11") -verb runas -windowstyle minimized start -wait "bleachbit_console.exe" -argumentlist @("-c", "internet_explorer.forms", "internet_explorer.temporary_files", "winapp2_internet.internet_explorer_10_11") -verb runas -windowstyle minimized
popd popd
@ -98,7 +98,7 @@ if (test-path ".bin\Bleachbit") {
# Backup Favorites # Backup Favorites
if (test-path "$userprofile\Favorites") { if (test-path "$userprofile\Favorites") {
wk-write " Backing up Favorites" "$log" WK-write " Backing up Favorites" "$log"
pushd "$userprofile" pushd "$userprofile"
$sz_args = @( $sz_args = @(
"a", "a",
@ -123,10 +123,10 @@ if (ask " Reset to default settings?" "$log") {
$_current_homepage = $ie_settings."Start Page" $_current_homepage = $ie_settings."Start Page"
if ($_current_homepage -ne $null -and $_current_homepage.Length -ne 0) { if ($_current_homepage -ne $null -and $_current_homepage.Length -ne 0) {
$_secondary_homepages = @($ie_settings."Secondary Start Pages") $_secondary_homepages = @($ie_settings."Secondary Start Pages")
wk-write " Current homepage: $_current_homepage" "$log" WK-write " Current homepage: $_current_homepage" "$log"
foreach ($p in $_secondary_homepages) { foreach ($p in $_secondary_homepages) {
if ($p -ne $null -and $p.Length -ne 0) { if ($p -ne $null -and $p.Length -ne 0) {
wk-write " $p" "$log" WK-write " $p" "$log"
} }
} }
if ($_current_homepage -inotmatch '^https://www\.google\.com/$' -or $_secondary_homepages -imatch '^.+') { if ($_current_homepage -inotmatch '^https://www\.google\.com/$' -or $_secondary_homepages -imatch '^.+') {
@ -135,7 +135,7 @@ if ($_current_homepage -ne $null -and $_current_homepage.Length -ne 0) {
} }
# Set homepage(s) # Set homepage(s)
wk-write " Setting homepage" "$log" WK-write " Setting homepage" "$log"
if ($reset_homepage) { if ($reset_homepage) {
sp -path hkcu:"Software\Microsoft\Internet Explorer\Main" -name "Start Page" -Value "https://www.google.com/" 2>&1 | out-null sp -path hkcu:"Software\Microsoft\Internet Explorer\Main" -name "Start Page" -Value "https://www.google.com/" 2>&1 | out-null
rp -path hkcu:"Software\Microsoft\Internet Explorer\Main" -name "Secondary Start Pages" 2>&1 | out-null rp -path hkcu:"Software\Microsoft\Internet Explorer\Main" -name "Secondary Start Pages" 2>&1 | out-null
@ -153,19 +153,18 @@ if (test-path "$programfiles86\Internet Explorer\iexplore.exe") {
# start -wait "$programfiles86\Internet Explorer\iexplore.exe" -argumentlist "https://adblockplus.org" # start -wait "$programfiles86\Internet Explorer\iexplore.exe" -argumentlist "https://adblockplus.org"
#} #}
} else { } else {
wk-error " $programfiles86\Internet Explorer\iexplore.exe not found" "$log" WK-error " $programfiles86\Internet Explorer\iexplore.exe not found" "$log"
} }
wk-write "" "$log" WK-write "" "$log"
pause
## Mozilla Firefox ## ## Mozilla Firefox ##
wk-write "==== Mozilla Firefox ====" "$log" WK-write "==== Mozilla Firefox ====" "$log"
$ff_errors = 0 $ff_errors = 0
# Reduce size of AppData folder # Reduce size of AppData folder
if (test-path ".bin\Bleachbit") { if (test-path ".bin\Bleachbit") {
wk-write " Removing temporary files" "$log" WK-write " Removing temporary files" "$log"
pushd ".bin\Bleachbit" pushd ".bin\Bleachbit"
start -wait "bleachbit_console.exe" -argumentlist @("-c", "firefox.cache", "firefox.forms", "firefox.session_restore", "firefox.vacuum", "winapp2_mozilla.corrupt_sqlites") -verb runas -nonewwindow start -wait "bleachbit_console.exe" -argumentlist @("-c", "firefox.cache", "firefox.forms", "firefox.session_restore", "firefox.vacuum", "winapp2_mozilla.corrupt_sqlites") -verb runas -nonewwindow
popd popd
@ -173,7 +172,7 @@ if (test-path ".bin\Bleachbit") {
# Backup AppData # Backup AppData
if (test-path "$ff_appdata") { if (test-path "$ff_appdata") {
wk-write " Backing up AppData" "$log" WK-write " Backing up AppData" "$log"
pushd "$ff_appdata" pushd "$ff_appdata"
$sz_args = @( $sz_args = @(
"a", "a",
@ -192,20 +191,20 @@ if ($ff_profile_list.length -eq 0) {
# Update profile list to catch newly created profiles # Update profile list to catch newly created profiles
sleep -s 1 sleep -s 1
$ff_profile_list = @(gci "$ff_appdata\Profiles" 2> $null | ?{ $_.PSIsContainer }) $ff_profile_list = @(gci "$ff_appdata\Profiles" 2> $null | ?{ $_.PSIsContainer })
$ff_profile_list = $ff_profile_list -inotmatch '\.wkbak\d*$' $ff_profile_list = $ff_profile_list -inotmatch '\.WKBak\d*$'
if ($ff_profile_list.length -eq 0) { if ($ff_profile_list.length -eq 0) {
wk-warn " Failed to create default profile." "$log" WK-warn " Failed to create default profile." "$log"
$ff_errors += 1 $ff_errors += 1
} else { } else {
# Configure new profile # Configure new profile
$ff_clean = $true $ff_clean = $true
} }
} else { } else {
wk-error " Failed to create default profile." "$log" WK-error " Failed to create default profile." "$log"
$ff_errors += 1 $ff_errors += 1
} }
} else { } else {
wk-write " Profiles found: $($ff_profile_list.length)" "$log" WK-write " Profiles found: $($ff_profile_list.length)" "$log"
$ff_clean = (ask " Reset profile(s) to safe settings?" "$log") $ff_clean = (ask " Reset profile(s) to safe settings?" "$log")
} }
@ -213,7 +212,7 @@ if ($ff_profile_list.length -eq 0) {
if ($ff_clean -and $ff_errors -eq 0) { if ($ff_clean -and $ff_errors -eq 0) {
pushd "$ff_appdata\Profiles" pushd "$ff_appdata\Profiles"
foreach ($ff_profile in $ff_profile_list) { foreach ($ff_profile in $ff_profile_list) {
wk-write " Resetting profile: $ff_profile" "$log" WK-write " Resetting profile: $ff_profile" "$log"
# Backup old settings and only preserve essential settings # Backup old settings and only preserve essential settings
$ff_profile_bak = (gen-backup-name "$ff_profile") $ff_profile_bak = (gen-backup-name "$ff_profile")
@ -249,7 +248,7 @@ if ($ff_clean -and $ff_errors -eq 0) {
} }
# Set homepage and search settings # Set homepage and search settings
wk-write " Setting homepage and default search" "$log" WK-write " Setting homepage and default search" "$log"
out-file -encoding 'ascii' -filepath "$ff_profile\prefs.js" -inputobject 'user_pref("browser.search.geoSpecificDefaults", false);' out-file -encoding 'ascii' -filepath "$ff_profile\prefs.js" -inputobject 'user_pref("browser.search.geoSpecificDefaults", false);'
out-file -encoding 'ascii' -filepath "$ff_profile\prefs.js" -inputobject 'user_pref("browser.search.defaultenginename", "Google");' -append out-file -encoding 'ascii' -filepath "$ff_profile\prefs.js" -inputobject 'user_pref("browser.search.defaultenginename", "Google");' -append
out-file -encoding 'ascii' -filepath "$ff_profile\prefs.js" -inputobject 'user_pref("browser.search.defaultenginename.US", "Google");' -append out-file -encoding 'ascii' -filepath "$ff_profile\prefs.js" -inputobject 'user_pref("browser.search.defaultenginename.US", "Google");' -append
@ -261,7 +260,7 @@ if ($ff_clean -and $ff_errors -eq 0) {
$_current_homepage = $_current_homepage -ireplace 'user_pref\("browser.startup.homepage", "(.*)"\);', '$1' $_current_homepage = $_current_homepage -ireplace 'user_pref\("browser.startup.homepage", "(.*)"\);', '$1'
$_header = " Current homepage:" $_header = " Current homepage:"
foreach ($url in @("$_current_homepage".split("|"))) { foreach ($url in @("$_current_homepage".split("|"))) {
wk-write "$_header $_current_homepage" "$log" WK-write "$_header $_current_homepage" "$log"
$_header = " " $_header = " "
} }
if ($_current_homepage -inotmatch '^https://www\.google\.com/$') { if ($_current_homepage -inotmatch '^https://www\.google\.com/$') {
@ -273,7 +272,7 @@ if ($ff_clean -and $ff_errors -eq 0) {
} }
$homepage = 'user_pref("browser.startup.homepage", "' + $homepage + '");' $homepage = 'user_pref("browser.startup.homepage", "' + $homepage + '");'
out-file -encoding 'ascii' -filepath "$ff_profile\prefs.js" -inputobject $homepage -append out-file -encoding 'ascii' -filepath "$ff_profile\prefs.js" -inputobject $homepage -append
wk-write "" "$log" WK-write "" "$log"
} }
popd popd
} }
@ -284,20 +283,19 @@ if (test-path "$ff_exe") {
start -wait "$ff_exe" -argumentlist "https://addons.mozilla.org/en-us/firefox/addon/ublock-origin/" start -wait "$ff_exe" -argumentlist "https://addons.mozilla.org/en-us/firefox/addon/ublock-origin/"
} }
} else { } else {
wk-error " firefox.exe not found. Please verify installation." "$log" WK-error " firefox.exe not found. Please verify installation." "$log"
} }
wk-write "" "$log" WK-write "" "$log"
pause
## Google Chrome ## ## Google Chrome ##
wk-write "==== Google Chrome ====" "$log" WK-write "==== Google Chrome ====" "$log"
$chrome_errors = 0 $chrome_errors = 0
# Reduce size of AppData folder # Reduce size of AppData folder
if (test-path ".bin\Bleachbit") { if (test-path ".bin\Bleachbit") {
wk-write " Removing temporary files" "$log" WK-write " Removing temporary files" "$log"
pushd ".bin\Bleachbit" pushd ".bin\Bleachbit"
start -wait "bleachbit_console.exe" -argumentlist @("-c", "google_chrome.cache", "google_chrome.form_history", "google_chrome.search_engines", "google_chrome.session", "google_chrome.vacuum") -verb runas -nonewwindow start -wait "bleachbit_console.exe" -argumentlist @("-c", "google_chrome.cache", "google_chrome.form_history", "google_chrome.search_engines", "google_chrome.session", "google_chrome.vacuum") -verb runas -nonewwindow
popd popd
@ -305,7 +303,7 @@ if (test-path ".bin\Bleachbit") {
# Backup AppData # Backup AppData
if (test-path "$chrome_appdata") { if (test-path "$chrome_appdata") {
wk-write " Backing up AppData" "$log" WK-write " Backing up AppData" "$log"
pushd "$chrome_appdata" pushd "$chrome_appdata"
$sz_args = @( $sz_args = @(
"a", "a",
@ -319,17 +317,17 @@ if (test-path "$chrome_appdata") {
# Check for profiles # Check for profiles
if ($chrome_profile_list.length -gt 0) { if ($chrome_profile_list.length -gt 0) {
wk-write " Profiles found: $($chrome_profile_list.length)" "$log" WK-write " Profiles found: $($chrome_profile_list.length)" "$log"
$chrome_clean = (ask " Reset profile(s) to safe settings?" "$log") $chrome_clean = (ask " Reset profile(s) to safe settings?" "$log")
} else { } else {
wk-warn " No profiles found" "$log" WK-warn " No profiles found" "$log"
} }
# Reset profile(s) to safe defaults # Reset profile(s) to safe defaults
if ($chrome_clean -and $chrome_errors -eq 0) { if ($chrome_clean -and $chrome_errors -eq 0) {
pushd "$chrome_appdata\User Data" pushd "$chrome_appdata\User Data"
foreach ($chrome_profile in $chrome_profile_list) { foreach ($chrome_profile in $chrome_profile_list) {
wk-write " Cleaning profile: $chrome_profile" "$log" WK-write " Cleaning profile: $chrome_profile" "$log"
$chrome_profile_bak = (gen-backup-name "$chrome_profile") $chrome_profile_bak = (gen-backup-name "$chrome_profile")
mv "$chrome_profile" "$chrome_profile_bak" mv "$chrome_profile" "$chrome_profile_bak"
md "$chrome_profile" 2>&1 | out-null md "$chrome_profile" 2>&1 | out-null
@ -349,7 +347,7 @@ if ($chrome_clean -and $chrome_errors -eq 0) {
'"Visited Links"', '"Visited Links"',
'"Web Data"') '"Web Data"')
start "robocopy" -argumentlist $robocopy_args -wait -windowstyle minimized start "robocopy" -argumentlist $robocopy_args -wait -windowstyle minimized
wk-write "" "$log" WK-write "" "$log"
} }
popd popd
} }
@ -357,7 +355,7 @@ if ($chrome_clean -and $chrome_errors -eq 0) {
# Test for single-user installation # Test for single-user installation
if (test-path "$chrome_appdata\Application\chrome.exe") { if (test-path "$chrome_appdata\Application\chrome.exe") {
if (test-path "$chrome_exe") { if (test-path "$chrome_exe") {
wk-warn " Single-user and multi-user installations present. Please reinstall Chrome." "$log" WK-warn " Single-user and multi-user installations present. Please reinstall Chrome." "$log"
} else { } else {
$chrome_exe = "$chrome_appdata\Application\chrome.exe" $chrome_exe = "$chrome_appdata\Application\chrome.exe"
} }
@ -372,9 +370,9 @@ if (test-path "$chrome_exe") {
start -wait "$chrome_exe" -argumentlist "https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm?hl=en" start -wait "$chrome_exe" -argumentlist "https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm?hl=en"
} }
} else { } else {
wk-error " chrome.exe not found. Please verify installation." "$log" WK-error " chrome.exe not found. Please verify installation." "$log"
} }
wk-write "" "$log" WK-write "" "$log"
## Done ## ## Done ##

View file

@ -8,7 +8,7 @@ for %%f in (%*) do (
) )
:Init :Init
title WK System File Checker title Wizard Kit: System File Checker
color 1b color 1b
:ScheduleCheck :ScheduleCheck

View file

@ -0,0 +1,354 @@
# Wizard Kit: Software Diagnostics
## Init ##
$wd = $(Split-Path $MyInvocation.MyCommand.Path)
pushd "$wd"
. .\init.ps1
clear
$host.UI.RawUI.WindowTitle = "Wizard Kit: Diagnostics Tool"
$backup_path = "$ClientPath\Backups\$username\$date"
$logpath = "$ClientPath\Info\$date"
md "$backup_path" 2>&1 | out-null
md "$logpath" 2>&1 | out-null
$log = "$logpath\Diagnostics.log"
$bin = (Get-Item $wd).Parent.FullName
$diag_dest = "/srv/Diagnostics"
$diag_server = "10.0.0.10"
$diag_user = "wkdiag"
$conemu = "$bin\ConEmu\ConEmu.exe"
$sz = "$bin\7-Zip\7za.exe"
$produkey = "$bin\tmp\ProduKey.exe"
$siv = "$bin\SIV\SIV.exe"
# OS Check
. .\check_os.ps1
if ($arch -eq 64) {
$conemu = "$bin\ConEmu\ConEmu64.exe"
$sz = "$bin\7-Zip\7za64.exe"
$produkey = "$bin\tmp\ProduKey64.exe"
$siv = "$bin\SIV\SIV64.exe"
}
# Set Service Order
while ($service_order -notmatch '^\d+') {
$service_order = read-host "Please enter the service order number"
if ($service_order -notmatch '^\d+') {
write-host "ERROR: Invalid SO`r`n" -foreground "red"
}
}
clear
out-file -filepath "$logpath\TicketNumber" -inputobject $service_order -append
WK-write "Starting SW diagnostics for Ticket #$service_order" "$log"
WK-write "" "$log"
## Sanitize Environment ##
#~# BROKEN #~#
#~# # ProcessKiller
#~# # adapted from TronScript (reddit.com/r/TronScript) and credit to /u/cuddlychops06
#~# #WK-write "* Stopping all processes" "$log"
#~# taskkill.exe /F /FI "USERNAME eq Demo" /FI "IMAGENAME ne ClassicShellService.exe" /FI "IMAGENAME ne explorer.exe" /FI "IMAGENAME ne dwm.exe" /FI "IMAGENAME ne cmd.exe" /FI "IMAGENAME ne Taskmgr.exe" /FI "IMAGENAME ne MsMpEng.exe" /FI "IMAGENAME ne powershell.exe" /FI "IMAGENAME ne rkill.exe" /FI "IMAGENAME ne rkill64.exe" /FI "IMAGENAME ne rkill.com" /FI "IMAGENAME ne rkill64.com" /FI "IMAGENAME ne conhost.exe" /FI "IMAGENAME ne dashost.exe" /FI "IMAGENAME ne vmtoolsd.exe" /FI "IMAGENAME ne conhost.exe" 2>&1 | out-null
# RKill
WK-write "* Running RKill" "$log"
start -wait "$conemu" -argumentlist @("/cmd", "$bin\RKill\RKill.exe", "-l", "$logpath\rkill.log")
if (!(ask "Did RKill run correctly?" "$log")) {
start -wait "$conemu" -argumentlist @("/cmd", "$bin\RKill\explorer.exe", "-l", "$logpath\rkill.log")
if (!(ask "Did RKill run correctly?" "$log")) {
WK-warn "Since RKill has failed to run, please try an alternative version." "$log"
WK-warn "Opening RKill folder..." "$log"
WK-write "" "$log"
sleep -s 2
ii "$bin\RKill\"
pause
}
}
# TDSSKiller Rootkit scan
WK-write "* Running Rootkit scan" "$log"
if (test-path "$bin\TDSSKiller.exe") {
md "$ClientPath\Quarantine\TDSSKiller" 2>&1 | out-null
start -wait "$bin\TDSSKiller.exe" -argumentlist @("-l", "$logpath\TDSSKiller.log", "-qpath", "$ClientPath\Quarantine\TDSSKiller", "-accepteula", "-accepteulaksn", "-dcexact", "-tdlfs")
} else {
WK-error " TDSSKiller.exe missing. Please verify Wizard-Kit was copied correctly."
}
## Network Check ##
WK-write "* Testing Internet Connection" "$log"
while (!(test-connection "google.com" -count 2 -quiet)) {
WK-warn "System appears offline. Please connect to the internet." "$log"
if (!(ask "Try again?" "$log")) {
WK-error "System still appears offline; aborting script." "$log"
exit 1
}
}
## Misc Configuration ##
# Export current power plans
$pow_backup_path = "$ClientPath\Backups\$date\Power Plans"
md "$pow_backup_path" > $null 2>&1 | out-null
foreach ($plan in (powercfg /L)) {
if ($plan -imatch '^Power Scheme.*') {
$guid = $plan -replace 'Power Scheme GUID:\s+([0-9a-f\-]+).*', '$1'
$name = $plan -replace 'Power Scheme GUID:\s+[0-9a-f\-]+\s+\(([^\)]+)\).*', '$1'
$set = ($plan -imatch '.*\*$')
if (!(test-path "$pow_backup_path\$name.pow")) {
powercfg /export "$pow_backup_path\$name.pow" $guid
}
}
}
# Change Power Plan
WK-write "* Changing power plan to 'High Performance'" "$log"
start "powercfg.exe" -argumentlist @("-restoredefaultschemes") -nonewwindow -redirectstandardoutput out-null
start -wait "powercfg" -argumentlist @("-setactive", "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c") -nonewwindow -redirectstandardoutput out-null
## Begin Diagnostics ##
# Infection Scan
WK-write "* Starting background infection scan" "$log"
if ($arch -eq 64) {
$prog = "$bin\HitmanPro\HitmanPro64.exe"
} else {
$prog = "$bin\HitmanPro\HitmanPro.exe"
}
start $prog -argumentlist @("/quiet", "/noinstall", "/noupload", "/log=$logpath\hitman.xml") -workingdirectory "$bin\HitmanPro"
#~# BROKEN #~#
#~# # OS Health Checks
#~# ## DISM
#~# if ($win_version -match '^8|10$') {
#~# start "$conemu" -argumentlist @("/cmd", "$windir\System32\dism.exe", "/online", "/cleanup-image", "/checkhealth", "/logpath:$logpath\DISM.log", "-new_console:c")
#~# }
#~# ## SFC
#~# start "$conemu" -argumentlist @("/cmd", "$windir\System32\sfc.exe", "/scannow", "-new_console:c")
#~# ## CHKDSK
#~# start "$conemu" -argumentlist @("/cmd", "$windir\System32\chkdsk.exe", "$systemdrive", "-new_console:c")
# Backup Registry
if (!(test-path "$logpath\Registry")) {
WK-write "* Backing up registry" "$log"
start -wait "$bin\Erunt\ERUNT.EXE" -argumentlist @("$logpath\Registry", "sysreg", "curuser", "otherusers", "/noprogresswindow") -workingdirectory "$bin\Erunt"
}
# Backup Browsers
if (test-path "$localappdata\Google\Chrome") {
WK-write "* Backing up Google Chrome" "$log"
pushd "$localappdata\Google\Chrome"
$sz_args = @(
"a", "-t7z", "-mx=1",
"$backup_path\Chrome.7z",
'"User Data"')
start $sz -argumentlist $sz_args -wait -windowstyle minimized
popd
}
if (test-path "$appdata\Mozilla\Firefox") {
WK-write "* Backing up Mozilla Firefox" "$log"
pushd "$appdata\Mozilla\Firefox"
$sz_args = @(
"a", "-t7z", "-mx=1",
"$backup_path\Firefox.7z",
"Profiles",
"profiles.ini")
start $sz -argumentlist $sz_args -wait -windowstyle minimized
popd
}
if (test-path "$userprofile\Favorites") {
WK-write "* Backing up Internet Explorer" "$log"
pushd "$userprofile"
$sz_args = @(
"a", "-t7z", "-mx=1",
"$backup_path\IE Favorites.7z",
"Favorites")
start $sz -argumentlist $sz_args -wait -windowstyle minimized
popd
}
# Get total size of temporary files
if (!(test-path "$logpath\bleachbit.log")) {
WK-write "* Checking for temporary files" "$log"
start -wait "$bin\BleachBit\bleachbit_console.exe" -argumentlist @("--preview", "--preset") -nonewwindow -workingdirectory "$bin\BleachBit" -redirectstandarderror "$logpath\bleachbit.err" -redirectstandardoutput "$logpath\bleachbit.log"
}
# Autoruns
if (!(test-path "$logpath\autoruns.arn")) {
WK-write "* Starting background autoruns scan" "$log"
New-Item -Path "HKCU:\Software\Sysinternals\AutoRuns" -Force 2>&1 | out-null
Set-ItemProperty -Path "HKCU:\Software\Sysinternals\AutoRuns" -Name "checkvirustotal" -Value 1 -Type "DWord" | out-null
Set-ItemProperty -Path "HKCU:\Software\Sysinternals\AutoRuns" -Name "EulaAccepted" -Value 1 -Type "DWord" | out-null
Set-ItemProperty -Path "HKCU:\Software\Sysinternals\AutoRuns" -Name "shownomicrosoft" -Value 1 -Type "DWord" | out-null
Set-ItemProperty -Path "HKCU:\Software\Sysinternals\AutoRuns" -Name "shownowindows" -Value 1 -Type "DWord" | out-null
Set-ItemProperty -Path "HKCU:\Software\Sysinternals\AutoRuns" -Name "showonlyvirustotal" -Value 1 -Type "DWord" | out-null
Set-ItemProperty -Path "HKCU:\Software\Sysinternals\AutoRuns" -Name "submitvirustotal" -Value 0 -Type "DWord" | out-null
Set-ItemProperty -Path "HKCU:\Software\Sysinternals\AutoRuns" -Name "verifysignatures" -Value 1 -Type "DWord" | out-null
New-Item "HKCU:\Software\Sysinternals\AutoRuns\SigCheck" 2>&1 | out-null
Set-ItemProperty -Path "HKCU:\Software\Sysinternals\AutoRuns\SigCheck" -Name "EulaAccepted" -Value 1 -Type "DWord" | out-null
New-Item "HKCU:\Software\Sysinternals\AutoRuns\Streams" 2>&1 | out-null
Set-ItemProperty -Path "HKCU:\Software\Sysinternals\AutoRuns\Streams" -Name "EulaAccepted" -Value 1 -Type "DWord" | out-null
New-Item "HKCU:\Software\Sysinternals\AutoRuns\VirusTotal" 2>&1 | out-null
Set-ItemProperty -Path "HKCU:\Software\Sysinternals\AutoRuns\VirusTotal" -Name "VirusTotalTermsAccepted" -Value 1 -Type "DWord" | out-null
start "$bin\SysinternalsSuite\autoruns.exe" -workingdirectory "$bin\SysinternalsSuite" -windowstyle "minimized"
}
# AIDA64
if (!(test-path "$logpath\keys-aida64.txt")) {
WK-write "* Running AIDA64 (Product Keys)" "$log"
start -wait "$bin\AIDA64\aida64.exe" -argumentlist @("/R", "$logpath\keys-aida64.txt", "/CUSTOM", "$bin\AIDA64\licenses.rpf", "/TEXT", "/SILENT", "/SAFEST") -workingdirectory "$bin\AIDA64"
}
if (!(test-path "$logpath\program_list-aida64.txt")) {
WK-write "* Running AIDA64 (SW listing)" "$log"
start -wait "$bin\AIDA64\aida64.exe" -argumentlist @("/R", "$logpath\program_list-aida64.txt", "/CUSTOM", "$bin\AIDA64\installed_programs.rpf", "/TEXT", "/SILENT", "/SAFEST") -workingdirectory "$bin\AIDA64"
}
if (!(test-path "$logpath\aida64.htm")) {
WK-write "* Running AIDA64 (Full listing) in background" "$log"
start "$bin\AIDA64\aida64.exe" -argumentlist @("/R", "$logpath\aida64.html", "/CUSTOM", "$bin\AIDA64\full.rpf", "/HTML", "/SILENT") -workingdirectory "$bin\AIDA64"
}
# SIV
if (!(test-path "$logpath\keys-siv.txt")) {
WK-write "* Running SIV (Product Keys)" "$log"
start -wait "$siv" -argumentlist @("-KEYS", "-LOCAL", "-UNICODE", "-SAVE=[product-ids]=$logpath\keys-siv.txt") -workingdirectory "$bin\SIV"
}
if (!(test-path "$logpath\program_list-siv.txt")) {
WK-write "* Running SIV (SW listing)" "$log"
start -wait "$siv" -argumentlist @("-KEYS", "-LOCAL", "-UNICODE", "-SAVE=[software]=$logpath\program_list-siv.txt") -workingdirectory "$bin\SIV"
}
if (!(test-path "$logpath\aida64.htm")) {
WK-write "* Running SIV (Full listing) in background" "$log"
start -wait "$siv" -argumentlist @("-KEYS", "-LOCAL", "-UNICODE", "-SAVE=$logpath\siv.txt") -workingdirectory "$bin\SIV"
}
# Product Keys
## Extract
md "$bin\tmp" 2>&1 | out-null
start -wait $sz -argumentlist @("e", "$bin\ProduKey.7z", "-otmp", "-aoa", "-pAbracadabra", "-bsp0", "-bso0") -workingdirectory "$bin" -nonewwindow
rm "$bin\tmp\ProduKey*.cfg"
sleep -s 1
## Run
if (!(test-path "$logpath\keys-produkey.txt")) {
WK-write "* Saving Product Keys" "$log"
start -wait $produkey -argumentlist @("/nosavereg", "/stext", "$logpath\keys-produkey.txt") -workingdirectory "$bin\tmp"
}
## Summary ##
WK-write "" "$log"
# Removed temp file size
WK-write "==== Temp Files ====" "$log"
$bb = (gc "$logpath\bleachbit.log") -imatch '^(disk space.*recovered|files.*deleted)'
foreach ($_ in $bb) {
$_ = " " + $_
WK-write $_ "$log"
}
WK-write "" "$log"
# Free Space
WK-write "==== Free Space ====" "$log"
& "$wd\free_space.ps1" "$log"
WK-write "" "$log"
# RAM
WK-write "==== RAM ====" "$log"
& "$wd\installed_ram.ps1" "$log"
WK-write "" "$log"
# List installed Office programs
WK-write "==== Installed Office Programs ====" "$log"
$installed_office = (gc "$logpath\program_list-aida64.txt") -imatch 'Office' | sort
foreach ($_ in $installed_office) {
$_ = $_ -ireplace '^\s+(.*?)\s\s+.*', '$1'
WK-write " $_" "$log"
}
WK-write "" "$log"
# Saved keys
WK-write "==== Found Product Keys ====" "$log"
$keys = (gc "$logpath\keys-produkey.txt") -imatch '(product.name)'
foreach ($_ in $keys) {
$_ = $_ -ireplace '^product name\s+: ', ' '
WK-write $_ "$log"
}
WK-write "" "$log"
# OS Info
WK-write "==== Operating System ====" "$log"
if ($arch -eq 32) {
WK-error " $os_name x$arch" "$log"
} elseif ($win_info.CurrentVersion -match "6.0") {
if ($win_info.CurrentBuildNumber -match "6002") {
WK-warn " $os_name x$arch" "$log"
} elseif ($win_info.CurrentBuildNumber -match "6001") {
WK-error " $os_name x$arch (very out of date)" "$log"
} elseif ($win_info.CurrentBuildNumber -match "6000") {
WK-error " $os_name x$arch (very out of date)" "$log"
}
} elseif ($win_info.CurrentVersion -match "6.2") {
WK-error " $os_name x$arch (very out of date)" "$log"
} elseif ($win_info.CurrentBuildNumber -match "10240") {
WK-error " $os_name x$arch (Release 1511 not installed)" "$log"
} else {
WK-write " $os_name x$arch" "$log"
}
if ($win_act -imatch 'unavailable') {
WK-warn "$win_act" "$log"
} elseif ($win_act -notmatch "permanent") {
WK-error "$win_act" "$log"
} else {
WK-write "$win_act" "$log"
}
WK-write "" "$log"
# Updates Check
# TODO: Finish and test this
#WK-write "==== Windows Updates ====" "$log"
#import-module "$bin\Scripts\PSWindowsUpdate"
# Check last install date
#get-wuhistory | sort-object date -descending | select-object -first 1
# Check if installs CS
# TODO
# Return avail updates
#get-wulist
#WK-write "" "$log"
# Battery Check
WK-write "==== Battery Check ====" "$log"
& "$wd\check_battery.ps1" "$log"
WK-write "" "$log"
# User Data
WK-write "==== User Data ====" "$log"
& "$wd\user_data.ps1" "$log"
WK-write "" "$log"
# Upload info
write-host "Uploading info to NAS..."
## Write batch
$batch = "lcd `"{0}`"`r`n" -f $ClientPath
$batch += "cd `"{0}`"`r`n" -f $diag_dest
$batch += "put -r Info `"{0}`"`r`n" -f $service_order
out-file -encoding "ASCII" -filepath "$wd\psftp_batch" -inputobject $batch
## Upload files
$psftp_args = @(
"-noagent",
"-i", "$bin\PuTTY\WK.ppk",
"$diag_user@$diag_server",
"-b", "$wd\psftp_batch")
start "$bin\PuTTY\PSFTP.exe" -argumentlist $psftp_args -wait -windowstyle minimized
## Done ##
popd
pause "Press Enter to exit..."
# Open log
$notepad2 = "$bin\Notepad2\Notepad2-Mod.exe"
if (test-path $notepad2) {
start "$notepad2" -argumentlist $log
} else {
start "notepad" -argumentlist $log
}

View file

@ -1,93 +1,88 @@
@echo off :: Wizard Kit: Scan all transferred software hive for product keys
rem This script assumes it is running as admin, as such it is not meant to be run directly. @echo off
:Flags :Flags
for %%f in (%*) do ( for %%f in (%*) do (
if /i "%%f" == "/DEBUG" (@echo on) if /i "%%f" == "/DEBUG" (@echo on)
) )
:FindBin
set bin= & pushd "%~dp0"
:FindBinInner
if exist ".bin" goto FindBinDone
if "%~d0\" == "%cd%" goto ErrorNoBin
cd .. & goto FindBinInner
:FindBinDone
set "bin=%cd%\.bin" & popd
:Init :Init
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
color 1b color 1b
title WK Key Finder title Wizard Kit: Key Finder
set "bin=.." rem Create %client_dir%\Info\YYYY-MM-DD and set path as %log_dir%
call "%bin%\Scripts\init_client_dir.cmd" /Info
set "transfer_dir=%client_dir%\Transfer"
:WKInfo :ClearConfigs
rem Create WK\Info\YYYY-MM-DD and set path as !log_dir! if not exist "%bin%\tmp" goto Extract
call "wk_info.cmd" pushd "%bin%\tmp"
if exist "ProduKey.cfg" del "ProduKey.cfg"
if exist "ProduKey64.cfg" del "ProduKey64.cfg"
popd
:Extract
mkdir "%bin%\tmp" >nul 2>&1
"%bin%\7-Zip\7za.exe" e "%bin%\ProduKey.7z" -o"%bin%\tmp" -aoa -pAbracadabra -bsp0 -bso0
ping -n 2 127.0.0.1>nul
set "prog=%bin%\tmp\ProduKey.exe"
if /i "!PROCESSOR_ARCHITECTURE!" == "AMD64" (
if exist "!prog:.=64.!" set "prog=!prog:.=64.!"
)
:FindHives :FindHives
cls
echo Scanning for transferred software hive(s)... echo Scanning for transferred software hive(s)...
set "found_hive=" call :ScanHive "%transfer_dir%\Software"
rem Transferred (Main) call :ScanHive "%transfer_dir%\config\Software"
set "sw_hive=%systemdrive%\WK\Transfer\Software" call :ScanHive "%transfer_dir%\config\RegBack\Software"
if exist "!sw_hive!" ( call :ScanHive "%transfer_dir%\Windows\System32\config\Software"
set "found_hive=true" call :ScanHive "%transfer_dir%\Windows\System32\config\RegBack\Software"
echo. !sw_hive! call :ScanHive "%transfer_dir%\Windows.old\Software"
echo ==== !sw_hive! ====>> "!log_dir!\transferred_keys.txt" call :ScanHive "%transfer_dir%\Windows.old\config\Software"
call "Launch.cmd" Program "!bin!\tmp" "ProduKey.exe" "/IEKeys 0 /ExtractEdition 1 /nosavereg /regfile !sw_hive! /stext !log_dir!\transferred_keys.tmp" /wait /admin call :ScanHive "%transfer_dir%\Windows.old\config\RegBack\Software"
type "!log_dir!\transferred_keys.tmp">> "!log_dir!\transferred_keys.txt" call :ScanHive "%transfer_dir%\Windows.old\Windows\System32\config\Software"
del "!log_dir!\transferred_keys.tmp" call :ScanHive "%transfer_dir%\Windows.old\Windows\System32\config\RegBack\Software"
) call :ScanHive "%transfer_dir%\Win.old\Software"
set "sw_hive=%systemdrive%\WK\Transfer\Windows\System32\config\Software" call :ScanHive "%transfer_dir%\Win.old\config\Software"
if exist "!sw_hive!" ( call :ScanHive "%transfer_dir%\Win.old\config\RegBack\Software"
set "found_hive=true" call :ScanHive "%transfer_dir%\Win.old\Windows\System32\config\Software"
echo. !sw_hive! call :ScanHive "%transfer_dir%\Win.old\Windows\System32\config\RegBack\Software"
echo ==== !sw_hive! ====>> "!log_dir!\transferred_keys.txt"
call "Launch.cmd" Program "!bin!\tmp" "ProduKey.exe" "/IEKeys 0 /ExtractEdition 1 /nosavereg /regfile !sw_hive! /stext !log_dir!\transferred_keys.tmp" /wait /admin
type "!log_dir!\transferred_keys.tmp">> "!log_dir!\transferred_keys.txt"
del "!log_dir!\transferred_keys.tmp"
)
set "sw_hive=%systemdrive%\WK\Transfer\Windows\System32\config\RegBack\Software"
if exist "!sw_hive!" (
set "found_hive=true"
echo. !sw_hive!
echo ==== !sw_hive! ====>> "!log_dir!\transferred_keys.txt"
call "Launch.cmd" Program "!bin!\tmp" "ProduKey.exe" "/IEKeys 0 /ExtractEdition 1 /nosavereg /regfile !sw_hive! /stext !log_dir!\transferred_keys.tmp" /wait /admin
type "!log_dir!\transferred_keys.tmp">> "!log_dir!\transferred_keys.txt"
del "!log_dir!\transferred_keys.tmp"
)
rem Transferred (Win.old)
set "sw_hive=%systemdrive%\WK\Transfer\Win.old\Software"
if exist "!sw_hive!" (
set "found_hive=true"
echo. !sw_hive!
echo ==== !sw_hive! ====>> "!log_dir!\transferred_keys.txt"
call "Launch.cmd" Program "!bin!\tmp" "ProduKey.exe" "/IEKeys 0 /ExtractEdition 1 /nosavereg /regfile !sw_hive! /stext !log_dir!\transferred_keys.tmp" /wait /admin
type "!log_dir!\transferred_keys.tmp">> "!log_dir!\transferred_keys.txt"
del "!log_dir!\transferred_keys.tmp"
)
set "sw_hive=%systemdrive%\WK\Transfer\Windows.old\Windows\System32\config\Software"
if exist "!sw_hive!" (
set "found_hive=true"
echo. !sw_hive!
echo ==== !sw_hive! ====>> "!log_dir!\transferred_keys.txt"
call "Launch.cmd" Program "!bin!\tmp" "ProduKey.exe" "/IEKeys 0 /ExtractEdition 1 /nosavereg /regfile !sw_hive! /stext !log_dir!\transferred_keys.tmp" /wait /admin
type "!log_dir!\transferred_keys.tmp">> "!log_dir!\transferred_keys.txt"
del "!log_dir!\transferred_keys.tmp"
)
set "sw_hive=%systemdrive%\WK\Transfer\Windows.old\Windows\System32\config\RegBack\Software"
if exist "!sw_hive!" (
set "found_hive=true"
echo. !sw_hive!
echo ==== !sw_hive! ====>> "!log_dir!\transferred_keys.txt"
call "Launch.cmd" Program "!bin!\tmp" "ProduKey.exe" "/IEKeys 0 /ExtractEdition 1 /nosavereg /regfile !sw_hive! /stext !log_dir!\transferred_keys.tmp" /wait /admin
type "!log_dir!\transferred_keys.tmp">> "!log_dir!\transferred_keys.txt"
del "!log_dir!\transferred_keys.tmp"
)
:ShowResults :ShowResults
if not defined found_hive (goto NoResults) if not exist "%log_dir%\transferred_keys.txt" (goto NoResults)
call "Launch.cmd" Program "%bin%\Notepad2" "Notepad2-Mod.exe" "%log_dir%\transferred_keys.txt" call "%bin%\Scripts\Launch.cmd" Program "%bin%\Notepad2" "Notepad2-Mod.exe" "%log_dir%\transferred_keys.txt"
goto Done goto Done
:ScanHive
if exist "%~1" (
echo. %~1
echo ==== %~1 ====>> "%log_dir%\transferred_keys.txt"
"%prog%" /IEKeys 0 /WindowsKeys 1 /OfficeKeys 1 /ExtractEdition 1 /nosavereg /regfile "%~1" /stext "" >> %log_dir%\transferred_keys.txt
)
goto :EOF
:NoResults :NoResults
echo. echo.
echo No keys found. echo No keys found.
goto Error goto Error
:ErrorNoBin
popd
echo ".bin" folder not found, aborting script.
echo.
goto Error
:Error :Error
color 4e color 4e
echo. echo.
@ -99,7 +94,8 @@ goto Exit
goto Exit goto Exit
:Exit :Exit
rem pause
popd popd
color color
endlocal endlocal
:EOF

312
.bin/Scripts/update_kit.ps1 Normal file
View file

@ -0,0 +1,312 @@
# Wizard Kit: Download the latest versions of the programs in the kit
## Init ##
$wd = $(Split-Path $MyInvocation.MyCommand.Path)
pushd "$wd"
. .\init.ps1
clear
$host.UI.RawUI.WindowTitle = "Wizard Kit: Kit Update Tool"
$bin = (Get-Item $wd).Parent.FullName
$curl = "$bin\curl\curl.exe"
$sz = "$bin\7-Zip\7za.exe"
# OS Check
. .\check_os.ps1
if ($arch -eq 64) {
$sz = "$bin\7-Zip\7za64.exe"
}
## Functions ##
function download-file {
param ([String]$path, [String]$name, [String]$url)
$output = "{0}\{1}" -f $path, $name
write-host ("Downloading {0}" -f $name)
New-Item -Type Directory $path 2>&1 | Out-Null
start "$curl" -argumentlist @("-#LSfo", "`"$output`"", "`"$url`"") -nonewwindow -wait
}
function find-dynamic-url {
param ([String]$source_page, [String]$regex)
$d_url = ""
# Get source page
start "$curl" -argumentlist @("-Lfso", "tmp_page", "`"$source_page`"") -nonewwindow -wait
# Search for real url
$d_url = Get-Content "tmp_page" | Where-Object {$_ -imatch $regex}
$d_url = $d_url -ireplace '.*(a |)href="([^"]+)".*', '$2'
$d_url = $d_url -ireplace ".*(a |)href='([^']+)'.*", '$2'
# Remove tmp_page
Remove-Item "tmp_page"
return $d_url
}
## Diagnostics ##
# HitmanPro
$path = "$bin\HitmanPro"
$name = "HitmanPro.exe"
$url = "http://dl.surfright.nl/HitmanPro.exe"
download-file $path $name $url
$name = "HitmanPro64.exe"
$url = "http://dl.surfright.nl/HitmanPro_x64.exe"
download-file $path $name $url
## VR-OSR ##
# AdwCleaner
$path = "$bin"
$name = "AdwCleaner.exe"
$dl_page = "http://www.bleepingcomputer.com/download/adwcleaner/dl/125/"
$regex = "href=.*http(s|)://download\.bleepingcomputer\.com/dl/[a-zA-Z0-9]+/[a-zA-Z0-9]+/windows/security/security-utilities/a/adwcleaner/AdwCleaner\.exe"
$url = find-dynamic-url $dl_page $regex
download-file $path $name $url
# ESET Online Scanner
$path = "$bin"
$name = "ESET.exe"
$url = "http://download.eset.com/special/eos/esetsmartinstaller_enu.exe"
download-file $path $name $url
# Junkware Removal Tool
$path = "$bin"
$name = "JRT.exe"
$url = "http://downloads.malwarebytes.org/file/jrt"
download-file $path $name $url
# Kaspersky Virus Removal Tool
$path = "$bin"
$name = "KVRT.exe"
$url = "http://devbuilds.kaspersky-labs.com/devbuilds/KVRT/latest/full/KVRT.exe"
download-file $path $name $url
# RKill
$path = "$bin\RKill"
$name = "RKill.exe"
$dl_page = "http://www.bleepingcomputer.com/download/rkill/dl/10/"
$regex = "href=.*http(s|)://download\.bleepingcomputer\.com/dl/[a-zA-Z0-9]+/[a-zA-Z0-9]+/windows/security/security-utilities/r/rkill/rkill\.exe"
$url = find-dynamic-url $dl_page $regex
download-file $path $name $url
# TDSSKiller
$path = "$bin"
$name = "TDSSKiller.exe"
$url = "http://media.kaspersky.com/utilities/VirusUtilities/EN/tdsskiller.exe"
download-file $path $name $url
## Driver Tools ##
# Acer Serial Number Detect Tool
$path = "$bin\_Drivers"
$name = "Acer Serial Number Detect Tool.exe"
$url = "http://global-download.acer.com/SupportFiles/Files/SNID/APP/SerialNumberDetectionTool.exe"
download-file $path $name $url
# AMD Autodetect
$path = "$bin\_Drivers"
$name = "AMD Autodetect.exe"
$url = "http://www2.ati.com/drivers/auto/autodetectutility.exe"
download-file $path $name $url
# AMD Gaming Evolved
$path = "$bin\_Drivers"
$name = "AMD Gaming Evolved.exe"
$url = "http://clientupdater.raptr.com/client/pc/amd/raptr_installer.exe"
download-file $path $name $url
# Dell System Detect
$path = "$bin\_Drivers"
$name = "Dell System Detect.exe"
$url = "https://downloads.dell.com/tools/dellsystemdetect/dellsystemdetectlauncher.exe"
download-file $path $name $url
# GeForce Experience
$path = "$bin\_Drivers"
$name = "GeForce Experience.exe"
$dl_page = "http://www.geforce.com/geforce-experience/download"
$regex = "href=.*http(s|)://us\.download\.nvidia\.com/GFE/GFEClient/[0-9\.]+/GeForce_Experience_v[0-9\.]+\.exe"
$url = find-dynamic-url $dl_page $regex
download-file $path $name $url
# HP Support Solutions Framework
$path = "$bin\_Drivers"
$name = "HP Support Solutions Framework.exe"
$url = "http://h20614.www2.hp.com/ediags/filehosting/api/installer"
download-file $path $name $url
# Intel Driver Update Utility
$path = "$bin\_Drivers"
$name = "Intel Driver Update Utility.exe"
$dl_page = "http://www.intel.com/content/www/us/en/support/detect.html"
$regex = "a href.*http(s|)://downloadmirror\.intel\.com/[a-zA-Z0-9]+/[a-zA-Z0-9]+/Intel%20Driver%20Update%20Utility%20Installer.exe"
$url = find-dynamic-url $dl_page $regex
$url = find-dynamic-url $dl_page $regex
download-file $path $name $url
# Intel SSD Toolbox
$path = "$bin\_Drivers"
$name = "Intel SSD Toolbox.exe"
$dl_page = "https://downloadcenter.intel.com/download/26085/Intel-Solid-State-Drive-Toolbox"
$regex = "href=./downloads/eula/[0-9]+/Intel-Solid-State-Drive-Toolbox.httpDown=https\%3A\%2F\%2Fdownloadmirror\.intel\.com\%2F[0-9]+\%2Feng\%2FIntel\%20SSD\%20Toolbox\%20-\%20v[0-9\.]+.exe"
$url = find-dynamic-url $dl_page $regex
$url = $url -ireplace '.*httpDown=(.*)', '$1'
$url = $url -ireplace '%3A', ':'
$url = $url -ireplace '%2F', '/'
download-file $path $name $url
# Lenovo Service Bridge
$path = "$bin\_Drivers"
$name = "Lenovo Service Bridge.exe"
$url = "https://download.lenovo.com/lsb/LSBsetup.exe"
download-file $path $name $url
# Samsung Magician
$path = "$bin\_Drivers"
$name = "Samsung Magician.zip"
$dl_page = "http://www.samsung.com/semiconductor/minisite/ssd/download/tools.html"
$regex = "href=./semiconductor/minisite/ssd/downloads/software/Samsung_Magician_Setup_v[0-9]+.zip"
$url = "http://www.samsung.com{0}" -f (find-dynamic-url $dl_page $regex)
download-file $path $name $url
start $sz -argumentlist @("e", "`"$bin\_Drivers\Samsung Magician.zip`"", "-aoa", "-bso0", "-bsp0", "-o$bin\_Drivers") -nonewwindow -wait
Remove-Item "$bin\_Drivers\Samsung Magician.exe" $path 2>&1 | Out-Null
Remove-Item "$bin\_Drivers\Samsung Magician.zip" $path 2>&1 | Out-Null
Move-Item "$bin\_Drivers\Samsung*exe" "$bin\_Drivers\Samsung Magician.exe" $path 2>&1 | Out-Null
# SanDisk Express Cache
$path = "$bin\_Drivers"
$name = "SanDisk Express Cache.exe"
$url = "http://mp3support.sandisk.com/ReadyCache/ExpressCacheSetup.exe"
download-file $path $name $url
# Toshiba System Detect
$path = "$bin\_Drivers"
$name = "Toshiba System Detect.exe"
$url = "http://cdgenp01.csd.toshiba.com/content/support/downloads/GetProductInfo.exe"
download-file $path $name $url
## Installers ##
$path = (Get-Item $wd).Parent.Parent.FullName
$path = "$path\Installers"
# Ninite - Main
download-file "$path" "MSE.exe" "https://ninite.com/essentials/ninite.exe"
download-file "$path" "Runtimes.exe" "https://ninite.com/.net4.6.2-air-java8-silverlight/ninite.exe"
download-file "$path" "Win7.exe" "https://ninite.com/.net4.6.2-7zip-air-chrome-firefox-java8-silverlight-vlc/ninite.exe"
download-file "$path" "Win8.exe" "https://ninite.com/.net4.6.2-7zip-air-chrome-classicstart-firefox-java8-silverlight-vlc/ninite.exe"
download-file "$path" "Win10.exe" "https://ninite.com/.net4.6.2-7zip-air-chrome-classicstart-firefox-java8-silverlight-vlc/ninite.exe"
# Ninite - Audio-Video
download-file "$path\Extras\Audio-Video" "AIMP.exe" "https://ninite.com/aimp/ninite.exe"
download-file "$path\Extras\Audio-Video" "Audacity.exe" "https://ninite.com/audacity/ninite.exe"
download-file "$path\Extras\Audio-Video" "CCCP.exe" "https://ninite.com/cccp/ninite.exe"
download-file "$path\Extras\Audio-Video" "Foobar2000.exe" "https://ninite.com/foobar/ninite.exe"
download-file "$path\Extras\Audio-Video" "GOM.exe" "https://ninite.com/gom/ninite.exe"
download-file "$path\Extras\Audio-Video" "iTunes.exe" "https://ninite.com/itunes/ninite.exe"
download-file "$path\Extras\Audio-Video" "K-Lite Codecs.exe" "https://ninite.com/klitecodecs/ninite.exe"
download-file "$path\Extras\Audio-Video" "KMPlayer.exe" "https://ninite.com/kmplayer/ninite.exe"
download-file "$path\Extras\Audio-Video" "MediaMonkey.exe" "https://ninite.com/mediamonkey/ninite.exe"
download-file "$path\Extras\Audio-Video" "MusicBee.exe" "https://ninite.com/musicbee/ninite.exe"
download-file "$path\Extras\Audio-Video" "Spotify.exe" "https://ninite.com/spotify/ninite.exe"
download-file "$path\Extras\Audio-Video" "VLC.exe" "https://ninite.com/vlc/ninite.exe"
download-file "$path\Extras\Audio-Video" "Winamp.exe" "https://ninite.com/winamp/ninite.exe"
# Ninite - Cloud Storage
download-file "$path\Extras\Cloud Storage" "BitTorrent Sync.exe" "https://ninite.com/bittorrentsync/ninite.exe"
download-file "$path\Extras\Cloud Storage" "Dropbox.exe" "https://ninite.com/dropbox/ninite.exe"
download-file "$path\Extras\Cloud Storage" "Google Drive.exe" "https://ninite.com/googledrive/ninite.exe"
download-file "$path\Extras\Cloud Storage" "Mozy.exe" "https://ninite.com/mozy/ninite.exe"
download-file "$path\Extras\Cloud Storage" "OneDrive.exe" "https://ninite.com/onedrive/ninite.exe"
download-file "$path\Extras\Cloud Storage" "SugarSync.exe" "https://ninite.com/sugarsync/ninite.exe"
# Ninite - Communication
download-file "$path\Extras\Communication" "AIM.exe" "https://ninite.com/aim/ninite.exe"
download-file "$path\Extras\Communication" "Pidgin.exe" "https://ninite.com/pidgin/ninite.exe"
download-file "$path\Extras\Communication" "Skype.exe" "https://ninite.com/skype/ninite.exe"
download-file "$path\Extras\Communication" "Trillian.exe" "https://ninite.com/trillian/ninite.exe"
# Ninite - Compression
download-file "$path\Extras\Compression" "7-Zip.exe" "https://ninite.com/7zip/ninite.exe"
download-file "$path\Extras\Compression" "PeaZip.exe" "https://ninite.com/peazip/ninite.exe"
download-file "$path\Extras\Compression" "WinRAR.exe" "https://ninite.com/winrar/ninite.exe"
# Ninite - Developer
download-file "$path\Extras\Developer" "Eclipse.exe" "https://ninite.com/eclipse/ninite.exe"
download-file "$path\Extras\Developer" "FileZilla.exe" "https://ninite.com/filezilla/ninite.exe"
download-file "$path\Extras\Developer" "JDK 8.exe" "https://ninite.com/jdk8/ninite.exe"
download-file "$path\Extras\Developer" "JDK 8 (x64).exe" "https://ninite.com/jdkx8/ninite.exe"
download-file "$path\Extras\Developer" "Notepad++.exe" "https://ninite.com/notepadplusplus/ninite.exe"
download-file "$path\Extras\Developer" "PuTTY.exe" "https://ninite.com/putty/ninite.exe"
download-file "$path\Extras\Developer" "Python 2.exe" "https://ninite.com/python/ninite.exe"
download-file "$path\Extras\Developer" "Visual Studio Code.exe" "https://ninite.com/vscode/ninite.exe"
download-file "$path\Extras\Developer" "WinMerge.exe" "https://ninite.com/winmerge/ninite.exe"
download-file "$path\Extras\Developer" "WinSCP.exe" "https://ninite.com/winscp/ninite.exe"
# Ninite - File Sharing
download-file "$path\Extras\File Sharing" "eMule.exe" "https://ninite.com/emule/ninite.exe"
download-file "$path\Extras\File Sharing" "qBittorrent.exe" "https://ninite.com/qbittorrent/ninite.exe"
# Ninite - Image-Photo
download-file "$path\Extras\Image-Photo" "FastStone.exe" "https://ninite.com/faststone/ninite.exe"
download-file "$path\Extras\Image-Photo" "GIMP.exe" "https://ninite.com/gimp/ninite.exe"
download-file "$path\Extras\Image-Photo" "Greenshot.exe" "https://ninite.com/greenshot/ninite.exe"
download-file "$path\Extras\Image-Photo" "Inkscape.exe" "https://ninite.com/inkscape/ninite.exe"
download-file "$path\Extras\Image-Photo" "IrfanView.exe" "https://ninite.com/irfanview/ninite.exe"
download-file "$path\Extras\Image-Photo" "Paint.NET.exe" "https://ninite.com/paint.net/ninite.exe"
download-file "$path\Extras\Image-Photo" "ShareX.exe" "https://ninite.com/sharex/ninite.exe"
download-file "$path\Extras\Image-Photo" "XnView.exe" "https://ninite.com/xnview/ninite.exe"
# Ninite - Misc
download-file "$path\Extras\Misc" "Classic Start.exe" "https://ninite.com/classicstart/ninite.exe"
download-file "$path\Extras\Misc" "Evernote.exe" "https://ninite.com/evernote/ninite.exe"
download-file "$path\Extras\Misc" "Everything.exe" "https://ninite.com/everything/ninite.exe"
download-file "$path\Extras\Misc" "Google Earth.exe" "https://ninite.com/googleearth/ninite.exe"
download-file "$path\Extras\Misc" "NV Access.exe" "https://ninite.com/nvda/ninite.exe"
download-file "$path\Extras\Misc" "Steam.exe" "https://ninite.com/steam/ninite.exe"
# Ninite - Office
download-file "$path\Extras\Office" "CutePDF.exe" "https://ninite.com/cutepdf/ninite.exe"
download-file "$path\Extras\Office" "Foxit Reader.exe" "https://ninite.com/foxit/ninite.exe"
download-file "$path\Extras\Office" "LibreOffice.exe" "https://ninite.com/libreoffice/ninite.exe"
download-file "$path\Extras\Office" "OpenOffice.exe" "https://ninite.com/openoffice/ninite.exe"
download-file "$path\Extras\Office" "PDFCreator.exe" "https://ninite.com/pdfcreator/ninite.exe"
download-file "$path\Extras\Office" "SumatraPDF.exe" "https://ninite.com/sumatrapdf/ninite.exe"
download-file "$path\Extras\Office" "Thunderbird.exe" "https://ninite.com/thunderbird/ninite.exe"
# Ninite - Runtimes
download-file "$path\Extras\Runtimes" "dotNET.exe" "https://ninite.com/.net4.6.2/ninite.exe"
download-file "$path\Extras\Runtimes" "Adobe Air.exe" "https://ninite.com/air/ninite.exe"
download-file "$path\Extras\Runtimes" "Java 8.exe" "https://ninite.com/java8/ninite.exe"
download-file "$path\Extras\Runtimes" "Shockwave.exe" "https://ninite.com/shockwave/ninite.exe"
download-file "$path\Extras\Runtimes" "Silverlight.exe" "https://ninite.com/silverlight/ninite.exe"
# Ninite - Security
download-file "$path\Extras\Security" "Ad-Aware.exe" "https://ninite.com/adaware/ninite.exe"
download-file "$path\Extras\Security" "Avast.exe" "https://ninite.com/avast/ninite.exe"
download-file "$path\Extras\Security" "AVG.exe" "https://ninite.com/avg/ninite.exe"
download-file "$path\Extras\Security" "Avira.exe" "https://ninite.com/avira/ninite.exe"
download-file "$path\Extras\Security" "Microsoft Security Essentials.exe" "https://ninite.com/essentials/ninite.exe"
download-file "$path\Extras\Security" "Malwarebytes Anti-Malware.exe" "https://ninite.com/malwarebytes/ninite.exe"
download-file "$path\Extras\Security" "Spybot 2.exe" "https://ninite.com/spybot2/ninite.exe"
download-file "$path\Extras\Security" "SUPERAntiSpyware.exe" "https://ninite.com/super/ninite.exe"
# Ninite - Utilities
download-file "$path\Extras\Utilities" "Auslogics DiskDefrag.exe" "https://ninite.com/auslogics/ninite.exe"
download-file "$path\Extras\Utilities" "CDBurnerXP.exe" "https://ninite.com/cdburnerxp/ninite.exe"
download-file "$path\Extras\Utilities" "Glary Utilities.exe" "https://ninite.com/glary/ninite.exe"
download-file "$path\Extras\Utilities" "ImgBurn.exe" "https://ninite.com/imgburn/ninite.exe"
download-file "$path\Extras\Utilities" "InfraRecorder.exe" "https://ninite.com/infrarecorder/ninite.exe"
download-file "$path\Extras\Utilities" "KeePass 2.exe" "https://ninite.com/keepass2/ninite.exe"
download-file "$path\Extras\Utilities" "Launchy.exe" "https://ninite.com/launchy/ninite.exe"
download-file "$path\Extras\Utilities" "RealVNC.exe" "https://ninite.com/realvnc/ninite.exe"
download-file "$path\Extras\Utilities" "Revo Uninstaller.exe" "https://ninite.com/revo/ninite.exe"
download-file "$path\Extras\Utilities" "TeamViewer 11.exe" "https://ninite.com/teamviewer11/ninite.exe"
download-file "$path\Extras\Utilities" "TeraCopy.exe" "https://ninite.com/teracopy/ninite.exe"
download-file "$path\Extras\Utilities" "WinDirStat.exe" "https://ninite.com/windirstat/ninite.exe"
# Ninite - Web Browsers
download-file "$path\Extras\Web Browsers" "Google Chrome.exe" "https://ninite.com/chrome/ninite.exe"
download-file "$path\Extras\Web Browsers" "Firefox.exe" "https://ninite.com/firefox/ninite.exe"
download-file "$path\Extras\Web Browsers" "Opera.exe" "https://ninite.com/operaChromium/ninite.exe"
## Done ##
popd
pause "Press Enter to exit..."

453
.bin/Scripts/update_kit.py Normal file
View file

@ -0,0 +1,453 @@
# Wizard Kit: Download the latest versions of the programs in the kit
import os
import re
# Init
os.chdir(os.path.dirname(os.path.realpath(__file__)))
os.system('title Wizard Kit: Kit Update Tool')
from functions import *
vars = init_vars()
vars_os = init_vars_os()
curl = '{BinDir}/curl/curl.exe'.format(**vars)
seven_zip = '{BinDir}/7-Zip/7za.exe'.format(**vars)
if vars_os['Arch'] == 64:
seven_zip = seven_zip.replace('7za', '7za64')
def download_file(out_dir, out_name, source_url):
"""Downloads a file using curl."""
print('Downloading: {out_name}'.format(out_name=out_name))
_args = [
'-#LSfo',
'{out_dir}/{out_name}'.format(out_dir=out_dir, out_name=out_name),
source_url
]
try:
os.makedirs(out_dir, exist_ok=True)
run_program(curl, _args, pipe=False)
except:
print_error('Falied to download file.')
def resolve_dynamic_url(source_url, regex):
"""Download the "download page" and scan for a url using the regex provided; returns str."""
# Download the file
_tmp_file = '{TmpDir}/webpage.tmp'.format(**vars)
_args = ['-#LSfo', _tmp_file, source_url]
try:
<<<<<<< HEAD
run_program(cmd)
except subprocess.CalledProcessError:
errors = True
print_error('Failed to apply Windows image.')
# Create boot files
if not errors:
print(' Creating boot files...'.format(**selected_windows_version))
try:
run_program('bcdboot W:\\Windows /s S: /f ALL')
except subprocess.CalledProcessError:
errors = True
print_error('Failed to create boot files.')
if re.search(r'^(8|10)', selected_windows_version['Family']):
try:
run_program('W:\\Windows\\System32\\reagentc /setreimage /path T:\\Recovery\\WindowsRE /target W:\\Windows')
except subprocess.CalledProcessError:
# errors = True # Changed to warning.
print_warning('Failed to setup WindowsRE files.')
# Print summary
if errors:
print_warning('\nErrors were encountered during setup.')
time.sleep(300)
else:
print_success('\nNo errors were encountered during setup.')
time.sleep(10)
pause('\nPress Enter to return to main menu... ')
def menu_tools():
tools = [
{'Name': 'Blue Screen View', 'Folder': 'BlueScreenView', 'File': 'BlueScreenView.exe'},
{'Name': 'CPU-Z', 'Folder': 'CPU-Z', 'File': 'cpuz.exe'},
{'Name': 'Explorer++', 'Folder': 'Explorer++', 'File': 'Explorer++.exe'},
{'Name': 'Fast Copy', 'Folder': 'FastCopy', 'File': 'FastCopy.exe', 'Args': ['/log', '/logfile=X:\WK\Info\FastCopy.log', '/cmd=noexist_only', '/utf8', '/skip_empty_dir', '/linkdest', '/open_window', '/balloon=FALSE', r'/exclude=$RECYCLE.BIN;$Recycle.Bin;.AppleDB;.AppleDesktop;.AppleDouble;.com.apple.timemachine.supported;.dbfseventsd;.DocumentRevisions-V100*;.DS_Store;.fseventsd;.PKInstallSandboxManager;.Spotlight*;.SymAV*;.symSchedScanLockxz;.TemporaryItems;.Trash*;.vol;.VolumeIcon.icns;desktop.ini;Desktop?DB;Desktop?DF;hiberfil.sys;lost+found;Network?Trash?Folder;pagefile.sys;Recycled;RECYCLER;System?Volume?Information;Temporary?Items;Thumbs.db']},
{'Name': 'HWiNFO', 'Folder': 'HWiNFO', 'File': 'HWiNFO.exe'},
{'Name': 'HW Monitor', 'Folder': 'HWMonitor', 'File': 'HWMonitor.exe'},
{'Name': 'NT Password Editor', 'Folder': 'NT Password Editor', 'File': 'ntpwedit.exe'},
{'Name': 'Notepad2', 'Folder': 'Notepad2', 'File': 'Notepad2-Mod.exe'},
{'Name': 'PhotoRec', 'Folder': 'TestDisk', 'File': 'photorec_win.exe', 'Args': ['-new_console:n']},
{'Name': 'Prime95', 'Folder': 'Prime95', 'File': 'prime95.exe'},
{'Name': 'ProduKey', 'Folder': 'ProduKey', 'File': 'ProduKey.exe', 'Args': ['/external', '/ExtractEdition:1']},
{'Name': 'Q-Dir', 'Folder': 'Q-Dir', 'File': 'Q-Dir.exe'},
{'Name': 'TestDisk', 'Folder': 'TestDisk', 'File': 'testdisk_win.exe', 'Args': ['-new_console:n']},
]
actions = [
{'Name': 'Main Menu', 'Letter': 'M'},
]
# Menu loop
while True:
selection = menu_select('Tools Menu', tools, actions)
if (selection.isnumeric()):
tool = tools[int(selection)-1]
cmd = ['{bin}\\{folder}\\{file}'.format(bin=bin, folder=tool['Folder'], file=tool['File'])]
if tool['Name'] == 'Blue Screen View':
# Select path to scan
minidump_path = select_minidump_path()
if minidump_path is not None:
tool['Args'] = ['/MiniDumpFolder', minidump_path]
if 'Args' in tool:
cmd += tool['Args']
try:
subprocess.Popen(cmd)
except:
print_error('Failed to run {prog}'.format(prog=tool['Name']))
time.sleep(2)
elif (selection == 'M'):
break
def menu_main():
menus = [
{'Name': 'Create Backups', 'Menu': menu_backup_imaging},
{'Name': 'Install Windows', 'Menu': menu_windows_setup},
{'Name': 'Misc Tools', 'Menu': menu_tools},
]
actions = [
{'Name': 'Command Prompt', 'Letter': 'C'},
{'Name': 'Reboot', 'Letter': 'R'},
{'Name': 'Shutdown', 'Letter': 'S'},
]
# Main loop
while True:
selection = menu_select('Main Menu', menus, actions, secret_exit=True)
if (selection.isnumeric()):
try:
menus[int(selection)-1]['Menu']()
except AbortException:
pass
except:
print_error('Major exception in: {menu}'.format(menu=menus[int(selection)-1]['Name']))
print_warning(' Please let The Wizard know and he\'ll look into it (Please include the details below).')
print(traceback.print_exc())
print_info(' You can reboot and try again but if this crashes again an alternative approach is required.')
time.sleep(300)
pause('Press Enter to shutdown...')
run_program(['wpeutil', 'shutdown'])
elif (selection == 'C'):
run_program(['cmd', '-new_console:n'], check=False)
elif (selection == 'R'):
run_program(['wpeutil', 'reboot'])
elif (selection == 'S'):
run_program(['wpeutil', 'shutdown'])
else:
quit()
=======
os.makedirs(vars['TmpDir'], exist_ok=True)
run_program(curl, _args)
except:
print_error('Falied to resolve dynamic url')
# Scan the file for the regex
with open(_tmp_file, 'r') as file:
for line in file:
if re.search(regex, line):
_url = line.strip()
_url = re.sub(r'.*(a |)href="([^"]+)".*', r'\2', _url)
_url = re.sub(r".*(a |)href='([^']+)'.*", r'\2', _url)
break
# Cleanup and return
os.remove(_tmp_file)
return _url
>>>>>>> d9a6f8abf55c460cf0adeea19aded1786b3bc5d0
if __name__ == '__main__':
## Diagnostics ##
# HitmanPro
_path = '{BinDir}/HitmanPro'.format(**vars)
_name = 'HitmanPro.exe'
_url = 'http://dl.surfright.nl/HitmanPro.exe'
download_file(_path, _name, _url)
_name = 'HitmanPro64.exe'
_url = 'http://dl.surfright.nl/HitmanPro_x64.exe'
download_file(_path, _name, _url)
## VR-OSR ##
# AdwCleaner
_path = vars['BinDir']
_name = 'AdwCleaner.exe'
_dl_page = 'http://www.bleepingcomputer.com/download/adwcleaner/dl/125/'
_regex = r'href=.*http(s|)://download\.bleepingcomputer\.com/dl/[a-zA-Z0-9]+/[a-zA-Z0-9]+/windows/security/security-utilities/a/adwcleaner/AdwCleaner\.exe'
_url = resolve_dynamic_url(_dl_page, _regex)
download_file(_path, _name, _url)
# ESET Online Scanner
_path = vars['BinDir']
_name = 'ESET.exe'
_url = 'http://download.eset.com/special/eos/esetsmartinstaller_enu.exe'
download_file(_path, _name, _url)
# Junkware Removal Tool
_path = vars['BinDir']
_name = 'JRT.exe'
_url = 'http://downloads.malwarebytes.org/file/jrt'
download_file(_path, _name, _url)
# Kaspersky Virus Removal Tool
_path = vars['BinDir']
_name = 'KVRT.exe'
_url = 'http://devbuilds.kaspersky-labs.com/devbuilds/KVRT/latest/full/KVRT.exe'
download_file(_path, _name, _url)
# RKill
_path = '{BinDir}/RKill'.format(**vars)
_name = 'RKill.exe'
_dl_page = 'http://www.bleepingcomputer.com/download/rkill/dl/10/'
_regex = r'href=.*http(s|)://download\.bleepingcomputer\.com/dl/[a-zA-Z0-9]+/[a-zA-Z0-9]+/windows/security/security-utilities/r/rkill/rkill\.exe'
_url = resolve_dynamic_url(_dl_page, _regex)
download_file(_path, _name, _url)
# TDSSKiller
_path = vars['BinDir']
_name = 'TDSSKiller.exe'
_url = 'http://media.kaspersky.com/utilities/VirusUtilities/EN/tdsskiller.exe'
download_file(_path, _name, _url)
## Driver Tools ##
# Acer Serial Number Detect Tool
_path = '{BinDir}/_Drivers'.format(**vars)
_name = 'Acer Serial Number Detect Tool.exe'
_url = 'http://global-download.acer.com/SupportFiles/Files/SNID/APP/SerialNumberDetectionTool.exe'
download_file(_path, _name, _url)
# AMD Autodetect
_path = '{BinDir}/_Drivers'.format(**vars)
_name = 'AMD Autodetect.exe'
_url = 'http://www2.ati.com/drivers/auto/autodetectutility.exe'
download_file(_path, _name, _url)
# AMD Gaming Evolved
_path = '{BinDir}/_Drivers'.format(**vars)
_name = 'AMD Gaming Evolved.exe'
_url = 'http://clientupdater.raptr.com/client/pc/amd/raptr_installer.exe'
download_file(_path, _name, _url)
# Dell System Detect
_path = '{BinDir}/_Drivers'.format(**vars)
_name = 'Dell System Detect.exe'
_url = 'https://downloads.dell.com/tools/dellsystemdetect/dellsystemdetectlauncher.exe'
download_file(_path, _name, _url)
#~Broken~# # GeForce Experience
#~Broken~# _path = '{BinDir}/_Drivers'.format(**vars)
#~Broken~# _name = 'GeForce Experience.exe'
#~Broken~# _dl_page = 'http://www.geforce.com/geforce-experience/download'
#~Broken~# _regex = r'href=.*http(s|)://us\.download\.nvidia\.com/GFE/GFEClient/[0-9\.]+/GeForce_Experience_v[0-9\.]+\.exe'
#~Broken~# _url = resolve_dynamic_url(_dl_page, _regex)
#~Broken~# download_file(_path, _name, _url)
# HP Support Solutions Framework
_path = '{BinDir}/_Drivers'.format(**vars)
_name = 'HP Support Solutions Framework.exe'
_url = 'http://h20614.www2.hp.com/ediags/filehosting/api/installer'
download_file(_path, _name, _url)
# Intel Driver Update Utility
_path = '{BinDir}/_Drivers'.format(**vars)
_name = 'Intel Driver Update Utility.exe'
_dl_page = 'http://www.intel.com/content/www/us/en/support/detect.html'
_regex = r'a href.*http(s|)://downloadmirror\.intel\.com/[a-zA-Z0-9]+/[a-zA-Z0-9]+/Intel%20Driver%20Update%20Utility%20Installer.exe'
_url = resolve_dynamic_url(_dl_page, _regex)
_url = resolve_dynamic_url(_dl_page, _regex)
download_file(_path, _name, _url)
# Intel SSD Toolbox
_path = '{BinDir}/_Drivers'.format(**vars)
_name = 'Intel SSD Toolbox.exe'
_dl_page = 'https://downloadcenter.intel.com/download/26085/Intel-Solid-State-Drive-Toolbox'
_regex = r'href=./downloads/eula/[0-9]+/Intel-Solid-State-Drive-Toolbox.httpDown=https\%3A\%2F\%2Fdownloadmirror\.intel\.com\%2F[0-9]+\%2Feng\%2FIntel\%20SSD\%20Toolbox\%20-\%20v[0-9\.]+.exe'
_url = resolve_dynamic_url(_dl_page, _regex)
_url = re.sub(r'.*httpDown=(.*)', r'\1', _url, flags=re.IGNORECASE)
_url = _url.replace('%3A', ':')
_url = _url.replace('%2F', '/')
download_file(_path, _name, _url)
# Lenovo Service Bridge
_path = '{BinDir}/_Drivers'.format(**vars)
_name = 'Lenovo Service Bridge.exe'
_url = 'https://download.lenovo.com/lsb/LSBsetup.exe'
download_file(_path, _name, _url)
#~Broken~# # Samsung Magician
print_warning('Samsung Magician section is broken.')
print('Please manually put "Samsung Magician.exe" into "{BinDir}\\_Drivers\\"')
#~Broken~# _path = '{BinDir}/_Drivers'.format(**vars)
#~Broken~# _name = 'Samsung Magician.zip'
#~Broken~# _dl_page = 'http://www.samsung.com/semiconductor/minisite/ssd/download/tools.html'
#~Broken~# _regex = r'href=./semiconductor/minisite/ssd/downloads/software/Samsung_Magician_Setup_v[0-9]+.zip'
#~Broken~# _url = resolve_dynamic_url(_dl_page, _regex)
#~Broken~# # Convert relative url to absolute
#~Broken~# _url = 'http://www.samsung.com' + _url
#~Broken~# download_file(_path, _name, _url)
#~Broken~# # Extract and replace old copy
#~Broken~# _args = [
#~Broken~# 'e', '"{BinDir}/_Drivers/Samsung Magician.zip"'.format(**vars),
#~Broken~# '-aoa', '-bso0', '-bsp0',
#~Broken~# '-o"{BinDir}/_Drivers"'.format(**vars)
#~Broken~# ]
#~Broken~# run_program(seven_zip, _args)
#~Broken~# try:
#~Broken~# os.remove('{BinDir}/_Drivers/Samsung Magician.zip'.format(**vars))
#~Broken~# #~PoSH~# Move-Item "$bin\_Drivers\Samsung*exe" "$bin\_Drivers\Samsung Magician.exe" $path 2>&1 | Out-Null
#~Broken~# except:
#~Broken~# pass
# SanDisk Express Cache
_path = '{BinDir}/_Drivers'.format(**vars)
_name = 'SanDisk Express Cache.exe'
_url = 'http://mp3support.sandisk.com/ReadyCache/ExpressCacheSetup.exe'
download_file(_path, _name, _url)
# Toshiba System Detect
_path = '{BinDir}/_Drivers'.format(**vars)
_name = 'Toshiba System Detect.exe'
_url = 'http://cdgenp01.csd.toshiba.com/content/support/downloads/GetProductInfo.exe'
download_file(_path, _name, _url)
## Installers ##
# Ninite - Bundles
_path = '{BaseDir}/Installers/Extras/Bundles'.format(**vars)
download_file(_path, 'Runtimes.exe', 'https://ninite.com/.net4.6.2-air-java8-silverlight/ninite.exe')
download_file(_path, 'Legacy.exe', 'https://ninite.com/.net4.6.2-7zip-air-chrome-firefox-java8-silverlight-vlc/ninite.exe')
download_file(_path, 'Modern.exe', 'https://ninite.com/.net4.6.2-7zip-air-chrome-classicstart-firefox-java8-silverlight-vlc/ninite.exe')
# Ninite - Audio-Video
_path = '{BaseDir}/Installers/Extras/Audio-Video'.format(**vars)
download_file(_path, 'AIMP.exe', 'https://ninite.com/aimp/ninite.exe')
download_file(_path, 'Audacity.exe', 'https://ninite.com/audacity/ninite.exe')
download_file(_path, 'CCCP.exe', 'https://ninite.com/cccp/ninite.exe')
download_file(_path, 'Foobar2000.exe', 'https://ninite.com/foobar/ninite.exe')
download_file(_path, 'GOM.exe', 'https://ninite.com/gom/ninite.exe')
download_file(_path, 'iTunes.exe', 'https://ninite.com/itunes/ninite.exe')
download_file(_path, 'K-Lite Codecs.exe', 'https://ninite.com/klitecodecs/ninite.exe')
download_file(_path, 'KMPlayer.exe', 'https://ninite.com/kmplayer/ninite.exe')
download_file(_path, 'MediaMonkey.exe', 'https://ninite.com/mediamonkey/ninite.exe')
download_file(_path, 'MusicBee.exe', 'https://ninite.com/musicbee/ninite.exe')
download_file(_path, 'Spotify.exe', 'https://ninite.com/spotify/ninite.exe')
download_file(_path, 'VLC.exe', 'https://ninite.com/vlc/ninite.exe')
download_file(_path, 'Winamp.exe', 'https://ninite.com/winamp/ninite.exe')
# Ninite - Cloud Storage
_path = '{BaseDir}/Installers/Extras/Cloud Storage'.format(**vars)
download_file(_path, 'BitTorrent Sync.exe', 'https://ninite.com/bittorrentsync/ninite.exe')
download_file(_path, 'Dropbox.exe', 'https://ninite.com/dropbox/ninite.exe')
download_file(_path, 'Google Drive.exe', 'https://ninite.com/googledrive/ninite.exe')
download_file(_path, 'Mozy.exe', 'https://ninite.com/mozy/ninite.exe')
download_file(_path, 'OneDrive.exe', 'https://ninite.com/onedrive/ninite.exe')
download_file(_path, 'SugarSync.exe', 'https://ninite.com/sugarsync/ninite.exe')
# Ninite - Communication
_path = '{BaseDir}/Installers/Extras/Communication'.format(**vars)
download_file(_path, 'AIM.exe', 'https://ninite.com/aim/ninite.exe')
download_file(_path, 'Pidgin.exe', 'https://ninite.com/pidgin/ninite.exe')
download_file(_path, 'Skype.exe', 'https://ninite.com/skype/ninite.exe')
download_file(_path, 'Trillian.exe', 'https://ninite.com/trillian/ninite.exe')
# Ninite - Compression
_path = '{BaseDir}/Installers/Extras/Compression'.format(**vars)
download_file(_path, '7-Zip.exe', 'https://ninite.com/7zip/ninite.exe')
download_file(_path, 'PeaZip.exe', 'https://ninite.com/peazip/ninite.exe')
download_file(_path, 'WinRAR.exe', 'https://ninite.com/winrar/ninite.exe')
# Ninite - Developer
_path = '{BaseDir}/Installers/Extras/Developer'.format(**vars)
download_file(_path, 'Eclipse.exe', 'https://ninite.com/eclipse/ninite.exe')
download_file(_path, 'FileZilla.exe', 'https://ninite.com/filezilla/ninite.exe')
download_file(_path, 'JDK 8.exe', 'https://ninite.com/jdk8/ninite.exe')
download_file(_path, 'JDK 8 (x64).exe', 'https://ninite.com/jdkx8/ninite.exe')
download_file(_path, 'Notepad++.exe', 'https://ninite.com/notepadplusplus/ninite.exe')
download_file(_path, 'PuTTY.exe', 'https://ninite.com/putty/ninite.exe')
download_file(_path, 'Python 2.exe', 'https://ninite.com/python/ninite.exe')
download_file(_path, 'Visual Studio Code.exe', 'https://ninite.com/vscode/ninite.exe')
download_file(_path, 'WinMerge.exe', 'https://ninite.com/winmerge/ninite.exe')
download_file(_path, 'WinSCP.exe', 'https://ninite.com/winscp/ninite.exe')
# Ninite - File Sharing
_path = '{BaseDir}/Installers/Extras/File Sharing'.format(**vars)
download_file(_path, 'eMule.exe', 'https://ninite.com/emule/ninite.exe')
download_file(_path, 'qBittorrent.exe', 'https://ninite.com/qbittorrent/ninite.exe')
# Ninite - Image-Photo
_path = '{BaseDir}/Installers/Extras/Image-Photo'.format(**vars)
download_file(_path, 'FastStone.exe', 'https://ninite.com/faststone/ninite.exe')
download_file(_path, 'GIMP.exe', 'https://ninite.com/gimp/ninite.exe')
download_file(_path, 'Greenshot.exe', 'https://ninite.com/greenshot/ninite.exe')
download_file(_path, 'Inkscape.exe', 'https://ninite.com/inkscape/ninite.exe')
download_file(_path, 'IrfanView.exe', 'https://ninite.com/irfanview/ninite.exe')
download_file(_path, 'Paint.NET.exe', 'https://ninite.com/paint.net/ninite.exe')
download_file(_path, 'ShareX.exe', 'https://ninite.com/sharex/ninite.exe')
download_file(_path, 'XnView.exe', 'https://ninite.com/xnview/ninite.exe')
# Ninite - Misc
_path = '{BaseDir}/Installers/Extras/Misc'.format(**vars)
download_file(_path, 'Classic Start.exe', 'https://ninite.com/classicstart/ninite.exe')
download_file(_path, 'Evernote.exe', 'https://ninite.com/evernote/ninite.exe')
download_file(_path, 'Everything.exe', 'https://ninite.com/everything/ninite.exe')
download_file(_path, 'Google Earth.exe', 'https://ninite.com/googleearth/ninite.exe')
download_file(_path, 'NV Access.exe', 'https://ninite.com/nvda/ninite.exe')
download_file(_path, 'Steam.exe', 'https://ninite.com/steam/ninite.exe')
# Ninite - Office
_path = '{BaseDir}/Installers/Extras/Office'.format(**vars)
download_file(_path, 'CutePDF.exe', 'https://ninite.com/cutepdf/ninite.exe')
download_file(_path, 'Foxit Reader.exe', 'https://ninite.com/foxit/ninite.exe')
download_file(_path, 'LibreOffice.exe', 'https://ninite.com/libreoffice/ninite.exe')
download_file(_path, 'OpenOffice.exe', 'https://ninite.com/openoffice/ninite.exe')
download_file(_path, 'PDFCreator.exe', 'https://ninite.com/pdfcreator/ninite.exe')
download_file(_path, 'SumatraPDF.exe', 'https://ninite.com/sumatrapdf/ninite.exe')
download_file(_path, 'Thunderbird.exe', 'https://ninite.com/thunderbird/ninite.exe')
# Ninite - Runtimes
_path = '{BaseDir}/Installers/Extras/Runtimes'.format(**vars)
download_file(_path, 'Adobe Air.exe', 'https://ninite.com/air/ninite.exe')
download_file(_path, 'dotNET.exe', 'https://ninite.com/.net4.6.2/ninite.exe')
download_file(_path, 'Java 8.exe', 'https://ninite.com/java8/ninite.exe')
download_file(_path, 'Shockwave.exe', 'https://ninite.com/shockwave/ninite.exe')
download_file(_path, 'Silverlight.exe', 'https://ninite.com/silverlight/ninite.exe')
# Ninite - Security
_path = '{BaseDir}/Installers/Extras/Security'.format(**vars)
download_file(_path, 'Ad-Aware.exe', 'https://ninite.com/adaware/ninite.exe')
download_file(_path, 'Avast.exe', 'https://ninite.com/avast/ninite.exe')
download_file(_path, 'AVG.exe', 'https://ninite.com/avg/ninite.exe')
download_file(_path, 'Avira.exe', 'https://ninite.com/avira/ninite.exe')
download_file(_path, 'Microsoft Security Essentials.exe', 'https://ninite.com/essentials/ninite.exe')
download_file(_path, 'Malwarebytes Anti-Malware.exe', 'https://ninite.com/malwarebytes/ninite.exe')
download_file(_path, 'Spybot 2.exe', 'https://ninite.com/spybot2/ninite.exe')
download_file(_path, 'SUPERAntiSpyware.exe', 'https://ninite.com/super/ninite.exe')
# Ninite - Utilities
_path = '{BaseDir}/Installers/Extras/Utilities'.format(**vars)
download_file(_path, 'Auslogics DiskDefrag.exe', 'https://ninite.com/auslogics/ninite.exe')
download_file(_path, 'CDBurnerXP.exe', 'https://ninite.com/cdburnerxp/ninite.exe')
download_file(_path, 'Glary Utilities.exe', 'https://ninite.com/glary/ninite.exe')
download_file(_path, 'ImgBurn.exe', 'https://ninite.com/imgburn/ninite.exe')
download_file(_path, 'InfraRecorder.exe', 'https://ninite.com/infrarecorder/ninite.exe')
download_file(_path, 'KeePass 2.exe', 'https://ninite.com/keepass2/ninite.exe')
download_file(_path, 'Launchy.exe', 'https://ninite.com/launchy/ninite.exe')
download_file(_path, 'RealVNC.exe', 'https://ninite.com/realvnc/ninite.exe')
download_file(_path, 'Revo Uninstaller.exe', 'https://ninite.com/revo/ninite.exe')
download_file(_path, 'TeamViewer 11.exe', 'https://ninite.com/teamviewer11/ninite.exe')
download_file(_path, 'TeraCopy.exe', 'https://ninite.com/teracopy/ninite.exe')
download_file(_path, 'WinDirStat.exe', 'https://ninite.com/windirstat/ninite.exe')
# Ninite - Web Browsers
_path = '{BaseDir}/Installers/Extras/Web Browsers'.format(**vars)
download_file(_path, 'Google Chrome.exe', 'https://ninite.com/chrome/ninite.exe')
download_file(_path, 'Mozilla Firefox.exe', 'https://ninite.com/firefox/ninite.exe')
download_file(_path, 'Opera Chromium.exe', 'https://ninite.com/operaChromium/ninite.exe')
pause("Press Enter to exit...")
quit()

View file

@ -1,188 +0,0 @@
# Wizard-Kit-Updater
## Init ##
$wd = $(Split-Path $MyInvocation.MyCommand.Path)
pushd "$wd"
. .\init.ps1
clear
$host.UI.RawUI.WindowTitle = "Wizard Kit Update Tool"
$bin = (Get-Item $wd).Parent.FullName
$curl = "$bin\curl\curl.exe"
$sz = "$bin\7-Zip\7za.exe"
# OS Check
. .\os_check.ps1
if ($arch -eq 64) {
$sz = "$bin\7-Zip\7za64.exe"
}
## Functions ##
function download-file {
param ([String]$path, [String]$name, [String]$url)
$output = "{0}\{1}" -f $path, $name
write-host ("Downloading {0}" -f $name)
New-Item -Type Directory $path 2>&1 | Out-Null
start "$curl" -argumentlist @("-#LSfo", "`"$output`"", "`"$url`"") -nonewwindow -wait
}
function find-dynamic-url {
param ([String]$source_page, [String]$regex)
$d_url = ""
# Get source page
start "$curl" -argumentlist @("-Lfso", "tmp_page", "`"$source_page`"") -nonewwindow -wait
# Search for real url
$d_url = Get-Content "tmp_page" | Where-Object {$_ -imatch $regex}
$d_url = $d_url -ireplace '.*(a |)href="([^"]+)".*', '$2'
$d_url = $d_url -ireplace ".*(a |)href='([^']+)'.*", '$2'
# Remove tmp_page
Remove-Item "tmp_page"
return $d_url
}
## Diagnostics ##
# HitmanPro
$path = "$bin\HitmanPro"
$name = "HitmanPro.exe"
$url = "http://dl.surfright.nl/HitmanPro.exe"
download-file $path $name $url
$name = "HitmanPro64.exe"
$url = "http://dl.surfright.nl/HitmanPro_x64.exe"
download-file $path $name $url
## VR-OSR ##
# AdwCleaner
$path = "$bin"
$name = "AdwCleaner.exe"
$dl_page = "http://www.bleepingcomputer.com/download/adwcleaner/dl/125/"
$regex = "href=.*http(s|)://download\.bleepingcomputer\.com/dl/[a-zA-Z0-9]+/[a-zA-Z0-9]+/windows/security/security-utilities/a/adwcleaner/AdwCleaner\.exe"
$url = find-dynamic-url $dl_page $regex
download-file $path $name $url
# ESET Online Scanner
$path = "$bin"
$name = "ESET.exe"
$url = "http://download.eset.com/special/eos/esetsmartinstaller_enu.exe"
download-file $path $name $url
# Junkware Removal Tool
$path = "$bin"
$name = "JRT.exe"
$url = "http://downloads.malwarebytes.org/file/jrt"
download-file $path $name $url
# Kaspersky Virus Removal Tool
$path = "$bin"
$name = "KVRT.exe"
$url = "http://devbuilds.kaspersky-labs.com/devbuilds/KVRT/latest/full/KVRT.exe"
download-file $path $name $url
# RKill
$path = "$bin\RKill"
$name = "RKill.exe"
$dl_page = "http://www.bleepingcomputer.com/download/rkill/dl/10/"
$regex = "href=.*http(s|)://download\.bleepingcomputer\.com/dl/[a-zA-Z0-9]+/[a-zA-Z0-9]+/windows/security/security-utilities/r/rkill/rkill\.exe"
$url = find-dynamic-url $dl_page $regex
download-file $path $name $url
# TDSSKiller
$path = "$bin"
$name = "TDSSKiller.exe"
$url = "http://media.kaspersky.com/utilities/VirusUtilities/EN/tdsskiller.exe"
download-file $path $name $url
## Driver Tools ##
# Acer Serial Number Detect Tool
$path = "$bin\_Drivers"
$name = "Acer Serial Number Detect Tool.exe"
$url = "http://global-download.acer.com/SupportFiles/Files/SNID/APP/SerialNumberDetectionTool.exe"
download-file $path $name $url
# AMD Autodetect
$path = "$bin\_Drivers"
$name = "AMD Autodetect.exe"
$url = "http://www2.ati.com/drivers/auto/autodetectutility.exe"
download-file $path $name $url
# AMD Gaming Evolved
$path = "$bin\_Drivers"
$name = "AMD Gaming Evolved.exe"
$url = "http://clientupdater.raptr.com/client/pc/amd/raptr_installer.exe"
download-file $path $name $url
# Dell System Detect
$path = "$bin\_Drivers"
$name = "Dell System Detect.exe"
$url = "https://downloads.dell.com/tools/dellsystemdetect/dellsystemdetectlauncher.exe"
download-file $path $name $url
# GeForce Experience
$path = "$bin\_Drivers"
$name = "GeForce Experience.exe"
$dl_page = "http://www.geforce.com/geforce-experience/download"
$regex = "href=.*http(s|)://us\.download\.nvidia\.com/GFE/GFEClient/[0-9\.]+/GeForce_Experience_v[0-9\.]+\.exe"
$url = find-dynamic-url $dl_page $regex
download-file $path $name $url
# HP Support Solutions Framework
$path = "$bin\_Drivers"
$name = "HP Support Solutions Framework.exe"
$url = "http://h20614.www2.hp.com/ediags/filehosting/api/installer"
download-file $path $name $url
# Intel Driver Update Utility
$path = "$bin\_Drivers"
$name = "Intel Driver Update Utility.exe"
$dl_page = "http://www.intel.com/content/www/us/en/support/detect.html"
$regex = "a href.*http(s|)://downloadmirror\.intel\.com/[a-zA-Z0-9]+/[a-zA-Z0-9]+/Intel%20Driver%20Update%20Utility%20Installer.exe"
$url = find-dynamic-url $dl_page $regex
$url = find-dynamic-url $dl_page $regex
download-file $path $name $url
# Intel SSD Toolbox
$path = "$bin\_Drivers"
$name = "Intel SSD Toolbox.exe"
$dl_page = "https://downloadcenter.intel.com/download/26085/Intel-Solid-State-Drive-Toolbox"
$regex = "href=./downloads/eula/[0-9]+/Intel-Solid-State-Drive-Toolbox.httpDown=https\%3A\%2F\%2Fdownloadmirror\.intel\.com\%2F[0-9]+\%2Feng\%2FIntel\%20SSD\%20Toolbox\%20-\%20v[0-9\.]+.exe"
$url = find-dynamic-url $dl_page $regex
$url = $url -ireplace '.*httpDown=(.*)', '$1'
$url = $url -ireplace '%3A', ':'
$url = $url -ireplace '%2F', '/'
download-file $path $name $url
# Lenovo Service Bridge
$path = "$bin\_Drivers"
$name = "Lenovo Service Bridge.exe"
$url = "https://download.lenovo.com/lsb/LSBsetup.exe"
download-file $path $name $url
# Samsung Magician
$path = "$bin\_Drivers"
$name = "Samsung Magician.zip"
$dl_page = "http://www.samsung.com/semiconductor/minisite/ssd/download/tools.html"
$regex = "href=./semiconductor/minisite/ssd/downloads/software/Samsung_Magician_Setup_v[0-9]+.zip"
$url = "http://www.samsung.com{0}" -f (find-dynamic-url $dl_page $regex)
download-file $path $name $url
start $sz -argumentlist @("e", "`"$bin\_Drivers\Samsung Magician.zip`"", "-aoa", "-bso0", "-bsp0", "-o$bin\_Drivers") -nonewwindow -wait
Remove-Item "$bin\_Drivers\Samsung Magician.exe" $path 2>&1 | Out-Null
Remove-Item "$bin\_Drivers\Samsung Magician.zip" $path 2>&1 | Out-Null
Move-Item "$bin\_Drivers\Samsung*exe" "$bin\_Drivers\Samsung Magician.exe" $path 2>&1 | Out-Null
# SanDisk Express Cache
$path = "$bin\_Drivers"
$name = "SanDisk Express Cache.exe"
$url = "http://mp3support.sandisk.com/ReadyCache/ExpressCacheSetup.exe"
download-file $path $name $url
# Toshiba System Detect
$path = "$bin\_Drivers"
$name = "Toshiba System Detect.exe"
$url = "http://cdgenp01.csd.toshiba.com/content/support/downloads/GetProductInfo.exe"
download-file $path $name $url
## Done ##
popd
pause "Press Enter to exit..."

View file

@ -1,3 +1,5 @@
# Wizard Kit: List the data usage for the current user (and other users when possible)
param([string]$log) param([string]$log)
cd $(Split-Path $MyInvocation.MyCommand.Path) cd $(Split-Path $MyInvocation.MyCommand.Path)
@ -32,17 +34,17 @@ function print-dir-size ($name, $location) {
$total = "{0:N0}" -f $bytes $total = "{0:N0}" -f $bytes
$s = " {0} {1} Bytes ({2})" -f $name.PadRight(10), $total.PadLeft(7), $location $s = " {0} {1} Bytes ({2})" -f $name.PadRight(10), $total.PadLeft(7), $location
} }
wk-write "$s" "$log" WK-write "$s" "$log"
} }
foreach ($user in get-wmiobject -class win32_useraccount) { foreach ($user in get-wmiobject -class win32_useraccount) {
if (test-path registry::hku\$($user.sid)) { if (test-path registry::hku\$($user.sid)) {
wk-write (" User: {0}" -f $user.name) "$log" WK-write (" User: {0}" -f $user.name) "$log"
# Profile # Profile
$user_profile = gp "registry::hklm\software\microsoft\windows nt\currentversion\profilelist\$($user.sid)" $user_profile = gp "registry::hklm\software\microsoft\windows nt\currentversion\profilelist\$($user.sid)"
print-dir-size "Profile" $user_profile.ProfileImagePath print-dir-size "Profile" $user_profile.ProfileImagePath
wk-write " ------------------------" "$log" WK-write " ------------------------" "$log"
# Shell Folders # Shell Folders
$shell_folders = gp "registry::hku\$($user.sid)\software\microsoft\windows\currentversion\explorer\shell folders" $shell_folders = gp "registry::hku\$($user.sid)\software\microsoft\windows\currentversion\explorer\shell folders"
@ -72,6 +74,6 @@ foreach ($user in get-wmiobject -class win32_useraccount) {
} }
# Spacer # Spacer
wk-write "" "$log" WK-write "" "$log"
} }
} }

View file

@ -0,0 +1,248 @@
# Wizard Kit: Copy user data to the system over the network
import os
import re
from operator import itemgetter
# Init
os.chdir(os.path.dirname(os.path.realpath(__file__)))
os.system('title Wizard Kit: Data 1')
from functions import *
vars = init_vars()
vars_os = init_vars_os()
vars['LogFile'] = '{LogDir}\\Data 1.log'.format(**vars)
os.makedirs('{LogDir}'.format(**vars), exist_ok=True)
vars['TransferDir'] = '{ClientDir}\\Transfer\\'.format(**vars)
os.makedirs('{TransferDir}'.format(**vars), exist_ok=True)
vars['FastCopy'] = '{BinDir}\\FastCopy\\FastCopy.exe'.format(**vars)
vars['FastCopyArgs'] = [
'/cmd=noexist_only',
'/logfile={LogFile}'.format(**vars),
'/utf8',
'/skip_empty_dir',
'/linkdest',
'/no_ui',
'/auto_close',
'/exclude=\\*.esd;\\*.swm;\\*.wim;\\*.dd;\\*.dd.tgz;\\*.dd.txz;\\*.map;\\*.dmg;\\*.image;$RECYCLE.BIN;$Recycle.Bin;.AppleDB;.AppleDesktop;.AppleDouble;.com.apple.timemachine.supported;.dbfseventsd;.DocumentRevisions-V100*;.DS_Store;.fseventsd;.PKInstallSandboxManager;.Spotlight*;.SymAV*;.symSchedScanLockxz;.TemporaryItems;.Trash*;.vol;.VolumeIcon.icns;desktop.ini;Desktop?DB;Desktop?DF;hiberfil.sys;lost+found;Network?Trash?Folder;pagefile.sys;Recycled;RECYCLER;System?Volume?Information;Temporary?Items;Thumbs.db']
vars['Notepad2'] = '{BinDir}\\Notepad2\\Notepad2-Mod.exe'.format(**vars)
vars['wimlib-imagex'] = '{BinDir}\\wimlib\\x32\\wimlib-imagex.exe'.format(**vars)
if vars_os['Arch'] == 64:
vars['FastCopy'] = vars['FastCopy'].replace('FastCopy.exe', 'FastCopy64.exe')
vars['Notepad2'] = vars['Notepad2'].replace('Notepad2-Mod.exe', 'Notepad2-Mod64.exe')
vars['wimlib-imagex'] = vars['wimlib-imagex'].replace('x32', 'x64')
re_included_root_items = re.compile(r'(^\\((My\s*)|Downloads|Doc(uments?|s?)|WK(-Info|-Transfer|)|Media|Music|Pictures?|Videos?)$|^\\(ProgramData|Recovery|Temp.*|Users)$|(log|txt|rtf|qb\w*|avi|m4a|m4v|mp4|mkv|jpg|png|tiff?)$)', flags=re.IGNORECASE)
re_excluded_root_items = re.compile(r'(^\\boot(mgr|nxt)$|^\\(eula|globdata|install|vc_?red)|.*.sys$|^\\System Volume Information|RECYCLER|\$Recycle\.bin|^\\\$?Win(dows(.old|\.~BT|)$|RE_)|^\\PerfLogs|^\\Program Files|\.(esd|swm|wim|dd|map|dmg|image)$)', flags=re.IGNORECASE)
re_excluded_items = re.compile(r'^(\.(AppleDB|AppleDesktop|AppleDouble|com\.apple\.timemachine\.supported|dbfseventsd|DocumentRevisions-V100.*|DS_Store|fseventsd|PKInstallSandboxManager|Spotlight.*|SymAV.*|symSchedScanLockxz|TemporaryItems|Trash.*|vol|VolumeIcon\.icns)|desktop\.(ini|.*DB|.*DF)|(hiberfil|pagefile)\.sys|lost\+found|Network\.*Trash\.*Folder|Recycle[dr]|System\.*Volume\.*Information|Temporary\.*Items|Thumbs\.db)$', flags=re.IGNORECASE)
def abort():
print_warning('Aborted.', log_file=vars['LogFile'])
exit_script()
def cleanup_transfer():
"""Walk through transfer folder (from the bottom) and remove extraneous items."""
if os.path.exists(vars['TransferDir']):
for root, dirs, files in os.walk(vars['TransferDir'], topdown=False):
for name in dirs:
try:
# Removes empty directories and junction points
os.rmdir(os.path.join(root, name))
except OSError:
pass
for name in files:
if re_excluded_items.search(name):
try:
# Removes files based on exclusion regex
os.remove(os.path.join(root, name))
except OSError:
pass
def exit_script():
umount_backup_shares()
pause("Press Enter to exit...")
subprocess.Popen('"{Notepad2}" "{LogFile}"'.format(**vars))
quit()
def is_valid_image(item):
_valid = item.is_file() and re.search(r'\.wim$', item.name, flags=re.IGNORECASE)
if _valid:
try:
_cmd = [vars['wimlib-imagex'], 'info', '{image}'.format(image=item.path)]
run_program(_cmd)
except subprocess.CalledProcessError:
_valid = False
print_warning('WARNING: Image damaged.', log_file=vars['LogFile'])
time.sleep(2)
return _valid
def transfer_file_based(restore_source):
# Registry
_args = vars['FastCopyArgs'].copy()
if os.path.exists('{source}\\Windows\\System32\\config'.format(source=restore_source.path)):
_args.append('{source}\\Windows\\System32\\config'.format(source=restore_source.path))
if os.path.exists('{source}\\Windows\\System32\\OEM'.format(source=restore_source.path)):
_args.append('{source}\\Windows\\System32\\OEM'.format(source=restore_source.path))
_args.append('/to={TransferDir}\\Windows\\System32\\'.format(**vars))
try:
print_standard('Copying Windows Registry...', log_file=vars['LogFile'])
run_program(vars['FastCopy'], _args, check=True)
except subprocess.CalledProcessError:
print_warning('WARNING: Errors encountered while copying registry', log_file=vars['LogFile'])
# Registry (Windows.old)
_args = vars['FastCopyArgs'].copy()
if os.path.exists('{source}\\Windows.old\\Windows\\System32\\config'.format(source=restore_source.path)):
_args.append('{source}\\Windows.old\\Windows\\System32\\config'.format(source=restore_source.path))
if os.path.exists('{source}\\Windows.old\\Windows\\System32\\OEM'.format(source=restore_source.path)):
_args.append('{source}\\Windows.old\\Windows\\System32\\OEM'.format(source=restore_source.path))
_args.append('/to={TransferDir}\\Windows.old\\Windows\\System32\\'.format(**vars))
try:
print_standard('Copying Windows Registry...', log_file=vars['LogFile'])
run_program(vars['FastCopy'], _args, check=True)
except subprocess.CalledProcessError:
print_warning('WARNING: Errors encountered while copying registry', log_file=vars['LogFile'])
# Main copy
selected_items = []
for item in os.scandir(restore_source.path):
if re_included_root_items.search(item.name):
selected_items.append(item.path)
elif not re_excluded_root_items.search(item.name):
if ask('Copy: "{name}" item?'.format(name=item.name)):
selected_items.append(item.path)
if len(selected_items) > 0:
_args = vars['FastCopyArgs'].copy()
_args += selected_items
_args.append('/to={TransferDir}\\'.format(**vars))
try:
print_standard('Copying main user data...', log_file=vars['LogFile'])
run_program(vars['FastCopy'], _args, check=True)
except subprocess.CalledProcessError:
print_warning('WARNING: Errors encountered while copying main user data', log_file=vars['LogFile'])
else:
print_error('ERROR: No files selected for transfer?', log_file=vars['LogFile'])
abort()
# Windows.old
selected_items = []
for item in ['Users', 'ProgramData']:
item = '{source}\\Windows.old\\{item}'.format(source=restore_source.path, item=item)
if os.path.exists(item):
selected_items.append(item)
if len(selected_items) > 0:
_args = vars['FastCopyArgs'].copy()
_args += selected_items
_args.append('/to={TransferDir}\\Windows.old\\'.format(**vars))
try:
print_standard('Copying user data (Windows.old)...', log_file=vars['LogFile'])
run_program(vars['FastCopy'], _args, check=True)
except subprocess.CalledProcessError:
print_warning('WARNING: Errors encountered while copying data from Windows.old', log_file=vars['LogFile'])
def transfer_image_based(restore_source):
print_standard('Assessing image...', log_file=vars['LogFile'])
# Scan source
_args = [
'dir',
'{source}'.format(source=restore_source.path), '1']
try:
_list = run_program(vars['wimlib-imagex'], _args, check=True)
except subprocess.CalledProcessError as err:
print_error('ERROR: Failed to get file list.')
print(err)
abort()
# Add items to list
selected_items = []
root_items = [i.strip() for i in _list.stdout.decode('utf-8', 'ignore').splitlines() if i.count('\\') == 1 and i.strip() != '\\']
for item in root_items:
if re_included_root_items.search(item):
selected_items.append(item)
elif not re_excluded_root_items.search(item):
if ask('Extract: "{name}" item?'.format(name=item)):
selected_items.append(item)
# Extract files
if len(selected_items) > 0:
# Write files.txt
with open('{TmpDir}\\wim_files.txt'.format(**vars), 'w') as f:
# Defaults
f.write('\\Windows.old\\WK*\n')
f.write('\\Windows.old\\ProgramData\n')
f.write('\\Windows.old\\Temp\n')
f.write('\\Windows.old\\Users\n')
f.write('\\Windows.old\\Windows\\System32\\config\n')
f.write('\\Windows.old\\Windows\\System32\\OEM\n')
f.write('\\Windows\\System32\\config\n')
f.write('\\Windows\\System32\\OEM\n')
f.write('AdwCleaner\\*log\n')
f.write('AdwCleaner\\*txt\n')
for item in selected_items:
f.write('{item}\n'.format(item=item))
try:
print_standard('Extracting user data...', log_file=vars['LogFile'])
_args = [
'extract',
'{source}'.format(source=restore_source.path), '1',
'@{TmpDir}\\wim_files.txt'.format(**vars),
'--dest-dir={TransferDir}\\'.format(**vars),
'--no-acls',
'--nullglob']
run_program(vars['wimlib-imagex'], _args, check=True)
except subprocess.CalledProcessError:
print_warning('WARNING: Errors encountered while extracting user data', log_file=vars['LogFile'])
else:
print_error('ERROR: No files selected for extraction?', log_file=vars['LogFile'])
abort()
if __name__ == '__main__':
# Set ticket number
ticket = None
while ticket is None:
tmp = input('Enter ticket number: ')
if re.match(r'^([0-9]+([-_]?\w+|))$', tmp):
ticket = tmp
# Get backup
backup_source = select_backup(ticket)
if backup_source is None:
abort()
# Determine restore method
restore_source = None
restore_options = []
_file_based = False
for item in os.scandir(backup_source.path):
if item.is_dir():
_file_based = True
restore_options.append({'Name': 'File-Based:\t{source}'.format(source=item.name), 'Source': item})
for _subitem in os.scandir(item.path):
if is_valid_image(_subitem):
restore_options.append({'Name': 'Image-Based: {dir}\\{source}'.format(dir=item.name, source=_subitem.name), 'Source': _subitem})
elif is_valid_image(item):
restore_options.append({'Name': 'Image-Based:\t{source}'.format(source=item.name), 'Source': item})
if _file_based:
restore_options.append({'Name': 'File-Based:\t.', 'Source': backup_source})
restore_options = sorted(restore_options, key=itemgetter('Name'))
actions = [{'Name': 'Quit', 'Letter': 'Q'}]
if len(restore_options) > 0:
selection = menu_select('Which backup are we using? (Path: {path})'.format(path=backup_source.path), restore_options, actions)
if selection == 'Q':
abort()
else:
restore_source = restore_options[int(selection)-1]['Source']
else:
print_error('ERROR: No restoration options detected.', log_file=vars['LogFile'])
abort()
# Start transfer
print_info('Using backup: {path}'.format(path=restore_source.path), log_file=vars['LogFile'])
if restore_source.is_dir():
transfer_file_based(restore_source)
if restore_source.is_file():
transfer_image_based(restore_source)
cleanup_transfer()
# Done
print_success('Done.', log_file=vars['LogFile'])
exit_script()

View file

@ -1,844 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<key name="Software">
<key name="ConEmu">
<key name=".Vanilla" modified="2016-09-05 22:35:00" build="160619">
<value name="ColorTable00" type="dword" data="00222827"/>
<value name="ColorTable01" type="dword" data="009e5401"/>
<value name="ColorTable02" type="dword" data="0004aa74"/>
<value name="ColorTable03" type="dword" data="00a6831a"/>
<value name="ColorTable04" type="dword" data="003403a7"/>
<value name="ColorTable05" type="dword" data="009c5689"/>
<value name="ColorTable06" type="dword" data="0049b6b6"/>
<value name="ColorTable07" type="dword" data="00cacaca"/>
<value name="ColorTable08" type="dword" data="007c7c7c"/>
<value name="ColorTable09" type="dword" data="00f58303"/>
<value name="ColorTable10" type="dword" data="0006d08d"/>
<value name="ColorTable11" type="dword" data="00e5c258"/>
<value name="ColorTable12" type="dword" data="004b04f3"/>
<value name="ColorTable13" type="dword" data="00b87da8"/>
<value name="ColorTable14" type="dword" data="0081cccc"/>
<value name="ColorTable15" type="dword" data="00ffffff"/>
<value name="ColorTable16" type="dword" data="00222827"/>
<value name="ColorTable17" type="dword" data="009e5401"/>
<value name="ColorTable18" type="dword" data="0004aa74"/>
<value name="ColorTable19" type="dword" data="00a6831a"/>
<value name="ColorTable20" type="dword" data="003403a7"/>
<value name="ColorTable21" type="dword" data="009c5689"/>
<value name="ColorTable22" type="dword" data="0049b6b6"/>
<value name="ColorTable23" type="dword" data="00cacaca"/>
<value name="ColorTable24" type="dword" data="007c7c7c"/>
<value name="ColorTable25" type="dword" data="00f58303"/>
<value name="ColorTable26" type="dword" data="0006d08d"/>
<value name="ColorTable27" type="dword" data="00e5c258"/>
<value name="ColorTable28" type="dword" data="004b04f3"/>
<value name="ColorTable29" type="dword" data="00b87da8"/>
<value name="ColorTable30" type="dword" data="0081cccc"/>
<value name="ColorTable31" type="dword" data="00ffffff"/>
<value name="ExtendColors" type="hex" data="00"/>
<value name="ExtendColorIdx" type="hex" data="0e"/>
<value name="TextColorIdx" type="hex" data="10"/>
<value name="BackColorIdx" type="hex" data="10"/>
<value name="PopTextColorIdx" type="hex" data="10"/>
<value name="PopBackColorIdx" type="hex" data="10"/>
<value name="ExtendFonts" type="hex" data="00"/>
<value name="ExtendFontNormalIdx" type="hex" data="01"/>
<value name="ExtendFontBoldIdx" type="hex" data="0c"/>
<value name="ExtendFontItalicIdx" type="hex" data="0d"/>
<value name="CursorTypeActive" type="dword" data="000232c1"/>
<value name="CursorTypeInactive" type="dword" data="00823282"/>
<value name="ClipboardDetectLineEnd" type="hex" data="01"/>
<value name="ClipboardBashMargin" type="hex" data="00"/>
<value name="ClipboardTrimTrailing" type="hex" data="02"/>
<value name="ClipboardEOL" type="hex" data="00"/>
<value name="ClipboardArrowStart" type="hex" data="00"/>
<value name="ClipboardAllLines" type="hex" data="01"/>
<value name="ClipboardFirstLine" type="hex" data="01"/>
<value name="ClipboardClickPromptPosition" type="hex" data="00"/>
<value name="ClipboardDeleteLeftWord" type="hex" data="01"/>
<value name="TrueColorerSupport" type="hex" data="01"/>
<value name="FadeInactive" type="hex" data="01"/>
<value name="FadeInactiveLow" type="hex" data="00"/>
<value name="FadeInactiveHigh" type="hex" data="c8"/>
<value name="ConVisible" type="hex" data="00"/>
<value name="ConInMode" type="dword" data="ffffffff"/>
<value name="UseInjects" type="hex" data="01"/>
<value name="SetDefaultTerminal" type="hex" data="00"/>
<value name="SetDefaultTerminalStartup" type="hex" data="00"/>
<value name="DefaultTerminalNoInjects" type="hex" data="00"/>
<value name="DefaultTerminalConfirm" type="hex" data="01"/>
<value name="DefaultTerminalApps" type="string" data="explorer.exe"/>
<value name="ProcessAnsi" type="hex" data="01"/>
<value name="UseClink" type="hex" data="01"/>
<value name="StartType" type="hex" data="02"/>
<value name="CmdLine" type="string" data=""/>
<value name="StartTasksFile" type="string" data=""/>
<value name="StartTasksName" type="string" data="{cmd}"/>
<value name="StartFarFolders" type="hex" data="00"/>
<value name="StartFarEditors" type="hex" data="00"/>
<value name="StoreTaskbarkTasks" type="hex" data="00"/>
<value name="StoreTaskbarCommands" type="hex" data="00"/>
<value name="CmdLineHistory" type="multi"></value>
<value name="SingleInstance" type="hex" data="00"/>
<value name="ShowHelpTooltips" type="hex" data="01"/>
<value name="Multi" type="hex" data="01"/>
<value name="Multi.ShowButtons" type="hex" data="01"/>
<value name="Multi.NumberInCaption" type="hex" data="00"/>
<value name="Multi.CloseConfirm" type="hex" data="00"/>
<value name="Multi.CloseEditViewConfirm" type="hex" data="00"/>
<value name="Multi.NewConfirm" type="hex" data="01"/>
<value name="Multi.UseArrows" type="hex" data="00"/>
<value name="Multi.UseNumbers" type="hex" data="01"/>
<value name="Multi.UseWinTab" type="hex" data="00"/>
<value name="Multi.AutoCreate" type="hex" data="00"/>
<value name="Multi.LeaveOnClose" type="hex" data="00"/>
<value name="Multi.HideOnClose" type="hex" data="00"/>
<value name="Multi.MinByEsc" type="hex" data="02"/>
<value name="MapShiftEscToEsc" type="hex" data="01"/>
<value name="Multi.Iterate" type="hex" data="01"/>
<value name="Multi.SplitWidth" type="hex" data="04"/>
<value name="Multi.SplitHeight" type="hex" data="04"/>
<value name="KeyboardHooks" type="hex" data="02"/>
<value name="FontName" type="string" data="Consolas"/>
<value name="FontName2" type="string" data="Lucida Console"/>
<value name="FontAutoSize" type="hex" data="00"/>
<value name="FontSize" type="ulong" data="16"/>
<value name="FontSizeX" type="ulong" data="0"/>
<value name="FontSizeX2" type="ulong" data="0"/>
<value name="FontSizeX3" type="ulong" data="0"/>
<value name="FontCharSet" type="hex" data="00"/>
<value name="Anti-aliasing" type="ulong" data="6"/>
<value name="FontBold" type="hex" data="00"/>
<value name="FontItalic" type="hex" data="00"/>
<value name="Monospace" type="hex" data="01"/>
<value name="BackGround Image show" type="hex" data="01"/>
<value name="BackGround Image" type="string" data="ConEmu.jpg"/>
<value name="bgImageDarker" type="hex" data="50"/>
<value name="bgImageColors" type="dword" data="ffffffff"/>
<value name="bgOperation" type="hex" data="07"/>
<value name="bgPluginAllowed" type="hex" data="01"/>
<value name="AlphaValue" type="hex" data="ff"/>
<value name="AlphaValueSeparate" type="hex" data="00"/>
<value name="AlphaValueInactive" type="hex" data="ff"/>
<value name="UserScreenTransparent" type="hex" data="00"/>
<value name="ColorKeyTransparent" type="hex" data="00"/>
<value name="ColorKeyValue" type="dword" data="00010101"/>
<value name="UseCurrentSizePos" type="hex" data="00"/>
<value name="WindowMode" type="dword" data="0000051f"/>
<value name="ConWnd Width" type="dword" data="02000042"/>
<value name="ConWnd Height" type="dword" data="02000058"/>
<value name="Cascaded" type="hex" data="00"/>
<value name="ConWnd X" type="dword" data="00000032"/>
<value name="ConWnd Y" type="dword" data="00000032"/>
<value name="16bit Height" type="ulong" data="0"/>
<value name="AutoSaveSizePos" type="hex" data="00"/>
<value name="IntegralSize" type="hex" data="00"/>
<value name="QuakeStyle" type="hex" data="00"/>
<value name="QuakeAnimation" type="ulong" data="300"/>
<value name="HideCaption" type="hex" data="01"/>
<value name="HideChildCaption" type="hex" data="00"/>
<value name="FocusInChildWindows" type="hex" data="01"/>
<value name="HideCaptionAlways" type="hex" data="01"/>
<value name="HideCaptionAlwaysFrame" type="hex" data="00"/>
<value name="HideCaptionAlwaysDelay" type="ulong" data="2000"/>
<value name="HideCaptionAlwaysDisappear" type="ulong" data="2000"/>
<value name="DownShowHiddenMessage" type="hex" data="00"/>
<value name="ConsoleFontName" type="string" data="Lucida Console"/>
<value name="ConsoleFontWidth" type="long" data="3"/>
<value name="ConsoleFontHeight" type="long" data="5"/>
<value name="DefaultBufferHeight" type="long" data="1000"/>
<value name="AutoBufferHeight" type="hex" data="01"/>
<value name="CmdOutputCP" type="long" data="0"/>
<value name="ComSpec.Type" type="hex" data="00"/>
<value name="ComSpec.Bits" type="hex" data="00"/>
<value name="ComSpec.UpdateEnv" type="hex" data="00"/>
<value name="ComSpec.EnvAddPath" type="hex" data="01"/>
<value name="ComSpec.EnvAddExePath" type="hex" data="01"/>
<value name="ComSpec.UncPaths" type="hex" data="00"/>
<value name="ComSpec.Path" type="string" data=""/>
<value name="ConsoleTextSelection" type="hex" data="01"/>
<value name="CTS.AutoCopy" type="hex" data="01"/>
<value name="CTS.EndOnTyping" type="hex" data="00"/>
<value name="CTS.EndOnKeyPress" type="hex" data="00"/>
<value name="CTS.Freeze" type="hex" data="00"/>
<value name="CTS.SelectBlock" type="hex" data="01"/>
<value name="CTS.SelectText" type="hex" data="01"/>
<value name="CTS.ActMode" type="hex" data="02"/>
<value name="CTS.RBtnAction" type="hex" data="03"/>
<value name="CTS.MBtnAction" type="hex" data="00"/>
<value name="CTS.ColorIndex" type="hex" data="e0"/>
<value name="ClipboardConfirmEnter" type="hex" data="01"/>
<value name="ClipboardConfirmLonger" type="ulong" data="200"/>
<value name="FarGotoEditorOpt" type="hex" data="01"/>
<value name="FarGotoEditorPath" type="string" data="far.exe /e%1:%2 &quot;%3&quot;"/>
<value name="FixFarBorders" type="hex" data="01"/>
<value name="FixFarBordersRanges" type="string" data="2013-25C4;"/>
<value name="ExtendUCharMap" type="hex" data="01"/>
<value name="EnhanceGraphics" type="hex" data="01"/>
<value name="EnhanceButtons" type="hex" data="00"/>
<value name="PartBrush75" type="hex" data="c8"/>
<value name="PartBrush50" type="hex" data="96"/>
<value name="PartBrush25" type="hex" data="5a"/>
<value name="PartBrushBlack" type="hex" data="20"/>
<value name="RightClick opens context menu" type="hex" data="02"/>
<value name="RightClickMacro2" type="string" data=""/>
<value name="SendAltTab" type="hex" data="00"/>
<value name="SendAltEsc" type="hex" data="00"/>
<value name="SendAltPrintScrn" type="hex" data="00"/>
<value name="SendPrintScrn" type="hex" data="00"/>
<value name="SendCtrlEsc" type="hex" data="00"/>
<value name="Min2Tray" type="hex" data="00"/>
<value name="AlwaysShowTrayIcon" type="hex" data="01"/>
<value name="SafeFarClose" type="hex" data="01"/>
<value name="SafeFarCloseMacro" type="string" data=""/>
<value name="FARuseASCIIsort" type="hex" data="00"/>
<value name="ShellNoZoneCheck" type="hex" data="00"/>
<value name="FixAltOnAltTab" type="hex" data="00"/>
<value name="DisableMouse" type="hex" data="01"/>
<value name="RSelectionFix" type="hex" data="01"/>
<value name="MouseSkipActivation" type="hex" data="01"/>
<value name="MouseSkipMoving" type="hex" data="01"/>
<value name="FarHourglass" type="hex" data="01"/>
<value name="FarHourglassDelay" type="ulong" data="500"/>
<value name="Dnd" type="hex" data="01"/>
<value name="DndDrop" type="hex" data="01"/>
<value name="DefCopy" type="hex" data="01"/>
<value name="DropUseMenu" type="hex" data="02"/>
<value name="DragOverlay" type="hex" data="01"/>
<value name="DragShowIcons" type="hex" data="01"/>
<value name="DebugSteps" type="hex" data="01"/>
<value name="DragPanel" type="hex" data="02"/>
<value name="DragPanelBothEdges" type="hex" data="00"/>
<value name="KeyBarRClick" type="hex" data="01"/>
<value name="StatusBar.Show" type="hex" data="00"/>
<value name="StatusBar.Flags" type="dword" data="00000002"/>
<value name="StatusFontFace" type="string" data="Tahoma"/>
<value name="StatusFontCharSet" type="ulong" data="0"/>
<value name="StatusFontHeight" type="long" data="14"/>
<value name="StatusBar.Color.Back" type="dword" data="00404040"/>
<value name="StatusBar.Color.Light" type="dword" data="00ffffff"/>
<value name="StatusBar.Color.Dark" type="dword" data="00a0a0a0"/>
<value name="StatusBar.Hide.VCon" type="hex" data="00"/>
<value name="StatusBar.Hide.CapsL" type="hex" data="00"/>
<value name="StatusBar.Hide.NumL" type="hex" data="00"/>
<value name="StatusBar.Hide.ScrL" type="hex" data="00"/>
<value name="StatusBar.Hide.Lang" type="hex" data="01"/>
<value name="StatusBar.Hide.WPos" type="hex" data="01"/>
<value name="StatusBar.Hide.WSize" type="hex" data="01"/>
<value name="StatusBar.Hide.WClient" type="hex" data="01"/>
<value name="StatusBar.Hide.WWork" type="hex" data="01"/>
<value name="StatusBar.Hide.Style" type="hex" data="01"/>
<value name="StatusBar.Hide.StyleEx" type="hex" data="01"/>
<value name="StatusBar.Hide.hFore" type="hex" data="01"/>
<value name="StatusBar.Hide.hFocus" type="hex" data="01"/>
<value name="StatusBar.Hide.ABuf" type="hex" data="00"/>
<value name="StatusBar.Hide.CPos" type="hex" data="00"/>
<value name="StatusBar.Hide.CSize" type="hex" data="00"/>
<value name="StatusBar.Hide.BSize" type="hex" data="00"/>
<value name="StatusBar.Hide.CurX" type="hex" data="00"/>
<value name="StatusBar.Hide.CurY" type="hex" data="00"/>
<value name="StatusBar.Hide.CurS" type="hex" data="00"/>
<value name="StatusBar.Hide.CurI" type="hex" data="01"/>
<value name="StatusBar.Hide.ConEmuPID" type="hex" data="01"/>
<value name="StatusBar.Hide.ConEmuHWND" type="hex" data="01"/>
<value name="StatusBar.Hide.ConEmuView" type="hex" data="01"/>
<value name="StatusBar.Hide.Srv" type="hex" data="00"/>
<value name="StatusBar.Hide.SrvHWND" type="hex" data="01"/>
<value name="StatusBar.Hide.Transparency" type="hex" data="00"/>
<value name="StatusBar.Hide.New" type="hex" data="00"/>
<value name="StatusBar.Hide.Sync" type="hex" data="00"/>
<value name="StatusBar.Hide.Proc" type="hex" data="00"/>
<value name="StatusBar.Hide.Title" type="hex" data="01"/>
<value name="StatusBar.Hide.Resize" type="hex" data="00"/>
<value name="Tabs" type="hex" data="00"/>
<value name="TabsLocation" type="hex" data="01"/>
<value name="TabSelf" type="hex" data="01"/>
<value name="TabLazy" type="hex" data="01"/>
<value name="TabRecent" type="hex" data="01"/>
<value name="TabDblClick" type="ulong" data="1"/>
<value name="TabsOnTaskBar" type="hex" data="02"/>
<value name="TaskBarOverlay" type="hex" data="01"/>
<value name="TabCloseMacro" type="string" data=""/>
<value name="TabFontFace" type="string" data="Segoe UI"/>
<value name="TabFontCharSet" type="ulong" data="0"/>
<value name="TabFontHeight" type="long" data="16"/>
<value name="SaveAllEditors" type="string" data=""/>
<value name="ToolbarAddSpace" type="long" data="0"/>
<value name="TabConsole" type="string" data=" %n "/>
<value name="TabSkipWords" type="string" data="Administrator:|Администратор:"/>
<value name="TabPanels" type="string" data="&lt;%c&gt; %s"/>
<value name="TabEditor" type="string" data="&lt;%c.%i&gt;{%s}"/>
<value name="TabEditorModified" type="string" data="&lt;%c.%i&gt;[%s] *"/>
<value name="TabViewer" type="string" data="&lt;%c.%i&gt;[%s]"/>
<value name="TabLenMax" type="ulong" data="20"/>
<value name="AdminTitleSuffix" type="string" data=" (Admin)"/>
<value name="AdminShowShield" type="hex" data="03"/>
<value name="HideInactiveConsoleTabs" type="hex" data="00"/>
<value name="ShowFarWindows" type="hex" data="01"/>
<value name="TryToCenter" type="hex" data="01"/>
<value name="CenterConsolePad" type="ulong" data="0"/>
<value name="ShowScrollbar" type="hex" data="02"/>
<value name="ScrollBarAppearDelay" type="ulong" data="100"/>
<value name="ScrollBarDisappearDelay" type="ulong" data="1000"/>
<value name="IconID" type="ulong" data="1"/>
<value name="MainTimerElapse" type="ulong" data="10"/>
<value name="MainTimerInactiveElapse" type="ulong" data="1000"/>
<value name="AffinityMask" type="dword" data="00000000"/>
<value name="SkipFocusEvents" type="hex" data="00"/>
<value name="MonitorConsoleLang" type="hex" data="03"/>
<value name="DesktopMode" type="hex" data="00"/>
<value name="SnapToDesktopEdges" type="hex" data="00"/>
<value name="AlwaysOnTop" type="hex" data="00"/>
<value name="SleepInBackground" type="hex" data="01"/>
<value name="MinimizeOnLoseFocus" type="hex" data="00"/>
<value name="DisableFarFlashing" type="hex" data="00"/>
<value name="DisableAllFlashing" type="hex" data="00"/>
<value name="FindText" type="string" data=""/>
<value name="FindMatchCase" type="hex" data="00"/>
<value name="FindMatchWholeWords" type="hex" data="00"/>
<value name="FindTransparent" type="hex" data="01"/>
<value name="PanView.BackColor" type="dword" data="30ffffff"/>
<value name="PanView.PFrame" type="long" data="1"/>
<value name="PanView.PFrameColor" type="dword" data="28808080"/>
<value name="PanView.SFrame" type="long" data="1"/>
<value name="PanView.SFrameColor" type="dword" data="07c0c0c0"/>
<value name="PanView.Thumbs.ImgSize" type="long" data="96"/>
<value name="PanView.Thumbs.SpaceX1" type="long" data="1"/>
<value name="PanView.Thumbs.SpaceY1" type="long" data="1"/>
<value name="PanView.Thumbs.SpaceX2" type="long" data="5"/>
<value name="PanView.Thumbs.SpaceY2" type="long" data="20"/>
<value name="PanView.Thumbs.LabelSpacing" type="long" data="2"/>
<value name="PanView.Thumbs.LabelPadding" type="long" data="0"/>
<value name="PanView.Thumbs.FontName" type="string" data="Tahoma"/>
<value name="PanView.Thumbs.FontHeight" type="long" data="14"/>
<value name="PanView.Tiles.ImgSize" type="long" data="48"/>
<value name="PanView.Tiles.SpaceX1" type="long" data="4"/>
<value name="PanView.Tiles.SpaceY1" type="long" data="4"/>
<value name="PanView.Tiles.SpaceX2" type="long" data="172"/>
<value name="PanView.Tiles.SpaceY2" type="long" data="4"/>
<value name="PanView.Tiles.LabelSpacing" type="long" data="4"/>
<value name="PanView.Tiles.LabelPadding" type="long" data="1"/>
<value name="PanView.Tiles.FontName" type="string" data="Tahoma"/>
<value name="PanView.Tiles.FontHeight" type="long" data="14"/>
<value name="PanView.LoadPreviews" type="hex" data="03"/>
<value name="PanView.LoadFolders" type="hex" data="01"/>
<value name="PanView.LoadTimeout" type="ulong" data="15"/>
<value name="PanView.MaxZoom" type="ulong" data="600"/>
<value name="PanView.UsePicView2" type="hex" data="01"/>
<value name="PanView.RestoreOnStartup" type="hex" data="00"/>
<value name="Update.VerLocation" type="string" data=""/>
<value name="Update.CheckOnStartup" type="hex" data="00"/>
<value name="Update.CheckHourly" type="hex" data="00"/>
<value name="Update.ConfirmDownload" type="hex" data="01"/>
<value name="Update.UseBuilds" type="hex" data="01"/>
<value name="Update.UseProxy" type="hex" data="00"/>
<value name="Update.Proxy" type="string" data=""/>
<value name="Update.ProxyUser" type="string" data=""/>
<value name="Update.ProxyPassword" type="string" data=""/>
<value name="Update.ExeCmdLine" type="string" data=""/>
<value name="Update.ArcCmdLine" type="string" data=""/>
<value name="Update.DownloadPath" type="string" data="%TEMP%\ConEmu"/>
<value name="Update.LeavePackages" type="hex" data="00"/>
<value name="Update.PostUpdateCmd" type="string" data="echo Last successful update&gt;ConEmuUpdate.info &amp;&amp; date /t&gt;&gt;ConEmuUpdate.info &amp;&amp; time /t&gt;&gt;ConEmuUpdate.info"/>
<value name="Multi.Modifier" type="dword" data="00000011"/>
<value name="Multi.ArrowsModifier" type="dword" data="0000005b"/>
<value name="KeyMacroVersion" type="hex" data="02"/>
<value name="MinimizeRestore" type="dword" data="000011c0"/>
<value name="MinimizeRestore2" type="dword" data="00000000"/>
<value name="GlobalRestore" type="dword" data="00000000"/>
<value name="ForcedFullScreen" type="dword" data="12115b0d"/>
<value name="SwitchGuiFocus" type="dword" data="00000000"/>
<value name="SetFocusGui" type="dword" data="00000000"/>
<value name="SetFocusChild" type="dword" data="00000000"/>
<value name="ChildSystemMenu" type="dword" data="ffffffff"/>
<value name="Multi.NewConsole" type="dword" data="80808000"/>
<value name="Multi.NewConsoleShift" type="dword" data="00001154"/>
<value name="Multi.NewConsolePopup" type="dword" data="80808000"/>
<value name="Multi.NewWindow" type="dword" data="00000000"/>
<value name="Multi.NewSplitV" type="dword" data="00001000"/>
<value name="Multi.NewSplitH" type="dword" data="80808000"/>
<value name="Multi.NewAttach" type="dword" data="00005b00"/>
<value name="Multi.Next" type="dword" data="80808000"/>
<value name="Multi.NextShift" type="dword" data="80808000"/>
<value name="Multi.Recreate" type="dword" data="00005b00"/>
<value name="Multi.AltCon" type="dword" data="80808000"/>
<value name="Multi.Scroll" type="dword" data="00005b00"/>
<value name="Multi.Close" type="dword" data="00001157"/>
<value name="CloseTabKey" type="dword" data="00125b00"/>
<value name="CloseGroupKey" type="dword" data="00000000"/>
<value name="TerminateProcessKey" type="dword" data="80808000"/>
<value name="DuplicateRootKey" type="dword" data="00000000"/>
<value name="CloseConEmuKey" type="dword" data="00001273"/>
<value name="Multi.Rename" type="dword" data="80808000"/>
<value name="Multi.MoveLeft" type="dword" data="00125b25"/>
<value name="Multi.MoveRight" type="dword" data="00125b27"/>
<value name="Multi.CmdKey" type="dword" data="80808000"/>
<value name="CTS.VkBlockStart" type="dword" data="00000000"/>
<value name="CTS.VkTextStart" type="dword" data="00000000"/>
<value name="CTS.VkCopyAll" type="dword" data="00000000"/>
<value name="Multi.ShowTabsList" type="dword" data="00000000"/>
<value name="Multi.ShowTabsList2" type="dword" data="80808000"/>
<value name="ClipboardVkAllLines" type="dword" data="0000102d"/>
<value name="ClipboardVkFirstLine" type="dword" data="00001156"/>
<value name="DeleteWordToLeft" type="dword" data="00001108"/>
<value name="FindTextKey" type="dword" data="00005d46"/>
<value name="ScreenshotKey" type="dword" data="80808000"/>
<value name="ScreenshotFullKey" type="dword" data="80808000"/>
<value name="ShowStatusBarKey" type="dword" data="80808000"/>
<value name="ShowTabBarKey" type="dword" data="80808000"/>
<value name="ShowCaptionKey" type="dword" data="80808000"/>
<value name="AlwaysOnTopKey" type="dword" data="00000000"/>
<value name="Key.TabMenu" type="dword" data="80808000"/>
<value name="Key.TabMenu2" type="dword" data="80808000"/>
<value name="Key.TabPane1" type="dword" data="80808000"/>
<value name="Key.TabPane2" type="dword" data="80808000"/>
<value name="Key.Maximize" type="dword" data="80808000"/>
<value name="Key.FullScreen" type="dword" data="0000120d"/>
<value name="Key.SysMenu" type="dword" data="80808000"/>
<value name="Key.SysMenu2" type="dword" data="00001102"/>
<value name="Key.BufUp" type="dword" data="00001126"/>
<value name="Key.BufDn" type="dword" data="00001128"/>
<value name="Key.BufPgUp" type="dword" data="00001121"/>
<value name="Key.BufPgDn" type="dword" data="00001122"/>
<value name="Key.PicViewSlide" type="dword" data="80808000"/>
<value name="Key.PicViewSlower" type="dword" data="80808000"/>
<value name="Key.PicViewFaster" type="dword" data="80808000"/>
<value name="FontLargerKey" type="dword" data="80808000"/>
<value name="FontSmallerKey" type="dword" data="80808000"/>
<value name="PasteFileKey" type="dword" data="00101146"/>
<value name="PastePathKey" type="dword" data="00101144"/>
<value name="PasteCygwinKey" type="dword" data="00005d2d"/>
<value name="Key.JumpPrevMonitor" type="dword" data="80808000"/>
<value name="Key.JumpNextMonitor" type="dword" data="80808000"/>
<value name="Key.TileToLeft" type="dword" data="80808000"/>
<value name="Key.TileToRIght" type="dword" data="80808000"/>
<value name="KeyMacro01" type="dword" data="0012a031"/>
<value name="KeyMacro01.Text" type="string" data="Task(&quot;cmd&quot;)"/>
<value name="KeyMacro02" type="dword" data="0012a032"/>
<value name="KeyMacro02.Text" type="string" data="Task(&quot;PowerShell&quot;)"/>
<value name="KeyMacro03" type="dword" data="000011d0"/>
<value name="KeyMacro03.Text" type="string" data="FontSetSize(1,2)"/>
<value name="KeyMacro04" type="dword" data="000011d1"/>
<value name="KeyMacro04.Text" type="string" data="FontSetSize(1,-2)"/>
<value name="KeyMacro05" type="dword" data="0012a033"/>
<value name="KeyMacro05.Text" type="string" data="Task(&quot;PowerShell as Admin&quot;)"/>
<value name="KeyMacro06" type="dword" data="00000000"/>
<value name="KeyMacro06.Text" type="string" data=""/>
<value name="KeyMacro07" type="dword" data="00000000"/>
<value name="KeyMacro07.Text" type="string" data=""/>
<value name="KeyMacro08" type="dword" data="00000000"/>
<value name="KeyMacro08.Text" type="string" data=""/>
<value name="KeyMacro09" type="dword" data="00000000"/>
<value name="KeyMacro09.Text" type="string" data=""/>
<value name="KeyMacro10" type="dword" data="00000000"/>
<value name="KeyMacro10.Text" type="string" data=""/>
<value name="KeyMacro11" type="dword" data="00000000"/>
<value name="KeyMacro11.Text" type="string" data=""/>
<value name="KeyMacro12" type="dword" data="00000000"/>
<value name="KeyMacro12.Text" type="string" data=""/>
<value name="KeyMacro13" type="dword" data="00000000"/>
<value name="KeyMacro13.Text" type="string" data=""/>
<value name="KeyMacro14" type="dword" data="00000000"/>
<value name="KeyMacro14.Text" type="string" data=""/>
<value name="KeyMacro15" type="dword" data="00000000"/>
<value name="KeyMacro15.Text" type="string" data=""/>
<value name="KeyMacro16" type="dword" data="00000000"/>
<value name="KeyMacro16.Text" type="string" data=""/>
<value name="KeyMacro17" type="dword" data="00000000"/>
<value name="KeyMacro17.Text" type="string" data=""/>
<value name="KeyMacro18" type="dword" data="00000000"/>
<value name="KeyMacro18.Text" type="string" data=""/>
<value name="KeyMacro19" type="dword" data="00000000"/>
<value name="KeyMacro19.Text" type="string" data=""/>
<value name="KeyMacro20" type="dword" data="00000000"/>
<value name="KeyMacro20.Text" type="string" data=""/>
<value name="KeyMacro21" type="dword" data="00000000"/>
<value name="KeyMacro21.Text" type="string" data=""/>
<value name="KeyMacro22" type="dword" data="00000000"/>
<value name="KeyMacro22.Text" type="string" data=""/>
<value name="KeyMacro23" type="dword" data="00000000"/>
<value name="KeyMacro23.Text" type="string" data=""/>
<value name="KeyMacro24" type="dword" data="00000000"/>
<value name="KeyMacro24.Text" type="string" data=""/>
<value name="KeyMacro25" type="dword" data="00000000"/>
<value name="KeyMacro25.Text" type="string" data=""/>
<value name="KeyMacro26" type="dword" data="00000000"/>
<value name="KeyMacro26.Text" type="string" data=""/>
<value name="KeyMacro27" type="dword" data="00000000"/>
<value name="KeyMacro27.Text" type="string" data=""/>
<value name="KeyMacro28" type="dword" data="00000000"/>
<value name="KeyMacro28.Text" type="string" data=""/>
<value name="KeyMacro29" type="dword" data="00000000"/>
<value name="KeyMacro29.Text" type="string" data=""/>
<value name="KeyMacro30" type="dword" data="00000000"/>
<value name="KeyMacro30.Text" type="string" data=""/>
<value name="KeyMacro31" type="dword" data="00000000"/>
<value name="KeyMacro31.Text" type="string" data=""/>
<value name="KeyMacro32" type="dword" data="00000000"/>
<value name="KeyMacro32.Text" type="string" data=""/>
<value name="CTS.VkBlock" type="hex" data="a4"/>
<value name="CTS.VkText" type="hex" data="a0"/>
<value name="CTS.VkAct" type="hex" data="00"/>
<value name="CTS.VkPrompt" type="hex" data="00"/>
<value name="FarGotoEditorVk" type="hex" data="a2"/>
<value name="DndLKey" type="hex" data="00"/>
<value name="DndRKey" type="hex" data="a2"/>
<value name="WndDragKey" type="dword" data="00121101"/>
<key name="Tasks" modified="2016-09-05 22:35:00" build="160619">
<value name="Count" type="long" data="3"/>
<key name="Task1" modified="2016-09-05 22:35:00" build="160619">
<value name="Name" type="string" data="{cmd}"/>
<value name="GuiArgs" type="string" data="/icon &quot;%CMDER_ROOT%\cmder.exe&quot;"/>
<value name="Cmd1" type="string" data="cmd /k &quot;%ConEmuDir%\..\init.bat&quot; -new_console:d:%USERPROFILE%"/>
<value name="Active" type="long" data="0"/>
<value name="Count" type="long" data="1"/>
<value name="Hotkey" type="dword" data="00000000"/>
<value name="Flags" type="dword" data="00000000"/>
</key>
<key name="Task2" modified="2016-09-05 22:35:00" build="160619">
<value name="Name" type="string" data="{PowerShell}"/>
<value name="GuiArgs" type="string" data="/icon &quot;%CMDER_ROOT%\cmder.exe&quot;"/>
<value name="Cmd1" type="string" data="PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command &quot;Invoke-Expression '. ''%ConEmuDir%\..\profile.ps1'''&quot; -new_console:d:&quot;%USERPROFILE%&quot;"/>
<value name="Active" type="long" data="0"/>
<value name="Count" type="long" data="1"/>
<value name="Hotkey" type="dword" data="00000000"/>
<value name="Flags" type="dword" data="00000000"/>
</key>
<key name="Task3" modified="2016-09-05 22:35:00" build="160619">
<value name="Name" type="string" data="{PowerShell as Admin}"/>
<value name="Hotkey" type="dword" data="00000000"/>
<value name="GuiArgs" type="string" data="/icon &quot;%CMDER_ROOT%\cmder.exe&quot;"/>
<value name="Cmd1" type="string" data="*PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command &quot;Invoke-Expression '. ''%ConEmuDir%\..\profile.ps1'''&quot; -new_console:d:&quot;%USERPROFILE%&quot;"/>
<value name="Active" type="long" data="0"/>
<value name="Count" type="long" data="1"/>
<value name="Flags" type="dword" data="00000000"/>
</key>
<key name="Task4" modified="2016-09-05 22:35:00" build="140707">
<value name="Name" type="string" data="{git sh}"/>
<value name="Hotkey" type="dword" data="00000000"/>
<value name="GuiArgs" type="string" data=" /icon &quot;%CMDER_ROOT%\cmder.exe&quot;"/>
<value name="Cmd1" type="string" data="cmd /k &quot;%ConEmuDir%\..\init.bat &amp; %CMDER_ROOT%\vendor\git-for-windows\bin\bash --login -i&quot; -new_console:d:%USERPROFILE%"/>
<value name="Cmd2" type="string" data="%CMDER_ROOT%\vendor\git-for-windows\git-bash.exe"/>
<value name="Active" type="dword" data="00000000"/>
<value name="Count" type="dword" data="00000001"/>
</key>
</key>
<key name="Apps" modified="2016-09-05 22:35:00" build="160619">
<value name="Count" type="long" data="0"/>
</key>
<key name="Colors" modified="2016-09-05 22:35:00" build="160619">
<key name="Palette1" modified="2016-09-05 22:35:00" build="160619">
<value name="Name" type="string" data="Monokai"/>
<value name="ExtendColors" type="hex" data="00"/>
<value name="ExtendColorIdx" type="hex" data="0e"/>
<value name="TextColorIdx" type="hex" data="10"/>
<value name="BackColorIdx" type="hex" data="10"/>
<value name="PopTextColorIdx" type="hex" data="10"/>
<value name="PopBackColorIdx" type="hex" data="10"/>
<value name="ColorTable00" type="dword" data="00222827"/>
<value name="ColorTable01" type="dword" data="009e5401"/>
<value name="ColorTable02" type="dword" data="0004aa74"/>
<value name="ColorTable03" type="dword" data="00a6831a"/>
<value name="ColorTable04" type="dword" data="003403a7"/>
<value name="ColorTable05" type="dword" data="009c5689"/>
<value name="ColorTable06" type="dword" data="0049b6b6"/>
<value name="ColorTable07" type="dword" data="00cacaca"/>
<value name="ColorTable08" type="dword" data="007c7c7c"/>
<value name="ColorTable09" type="dword" data="00f58303"/>
<value name="ColorTable10" type="dword" data="0006d08d"/>
<value name="ColorTable11" type="dword" data="00e5c258"/>
<value name="ColorTable12" type="dword" data="004b04f3"/>
<value name="ColorTable13" type="dword" data="00b87da8"/>
<value name="ColorTable14" type="dword" data="0081cccc"/>
<value name="ColorTable15" type="dword" data="00ffffff"/>
<value name="ColorTable16" type="dword" data="00000000"/>
<value name="ColorTable17" type="dword" data="00800000"/>
<value name="ColorTable18" type="dword" data="00008000"/>
<value name="ColorTable19" type="dword" data="00808000"/>
<value name="ColorTable20" type="dword" data="00000080"/>
<value name="ColorTable21" type="dword" data="00800080"/>
<value name="ColorTable22" type="dword" data="00008080"/>
<value name="ColorTable23" type="dword" data="00c0c0c0"/>
<value name="ColorTable24" type="dword" data="00808080"/>
<value name="ColorTable25" type="dword" data="00ff0000"/>
<value name="ColorTable26" type="dword" data="0000ff00"/>
<value name="ColorTable27" type="dword" data="00ffff00"/>
<value name="ColorTable28" type="dword" data="000000ff"/>
<value name="ColorTable29" type="dword" data="00ff00ff"/>
<value name="ColorTable30" type="dword" data="0000ffff"/>
<value name="ColorTable31" type="dword" data="00ffffff"/>
</key>
<value name="Count" type="long" data="1"/>
</key>
<value name="OneTabPerGroup" type="hex" data="00"/>
<value name="ActivateSplitMouseOver" type="hex" data="01"/>
<value name="TabBtnDblClick" type="ulong" data="0"/>
<value name="ConsoleExceptionHandler" type="hex" data="00"/>
<value name="SaveCmdHistory" type="hex" data="00"/>
<value name="CTS.IBeam" type="hex" data="01"/>
<value name="Multi.SplitSizeVU" type="dword" data="00105d26"/>
<value name="Multi.SplitSizeVD" type="dword" data="00105d28"/>
<value name="Multi.SplitSizeHL" type="dword" data="00105d25"/>
<value name="Multi.SplitSizeHR" type="dword" data="00105d27"/>
<value name="Multi.SplitFocusU" type="dword" data="00005d26"/>
<value name="Multi.SplitFocusD" type="dword" data="00005d28"/>
<value name="Multi.SplitFocusL" type="dword" data="00005d25"/>
<value name="Multi.SplitFocusR" type="dword" data="00005d27"/>
<value name="CloseGroupPrcKey" type="dword" data="00000000"/>
<value name="SetDefaultTerminalStartupTSA" type="hex" data="01"/>
<value name="CTS.HtmlFormat" type="hex" data="00"/>
<value name="TabIcons" type="hex" data="01"/>
<value name="Multi.NewConsolePopup2" type="dword" data="00000000"/>
<value name="CloseAllConKey" type="dword" data="00000000"/>
<value name="CloseExceptConKey" type="dword" data="00000000"/>
<value name="CTS.VkCopyFmt0" type="dword" data="00001143"/>
<value name="CTS.VkCopyFmt1" type="dword" data="00101143"/>
<value name="CTS.VkCopyFmt2" type="dword" data="00000000"/>
<value name="ProcessNewConArg" type="hex" data="01"/>
<value name="HighlightMouseRow" type="hex" data="00"/>
<value name="HighlightMouseCol" type="hex" data="00"/>
<value name="HighlightMouseSwitch" type="dword" data="00005d4c"/>
<value name="TransparencyInc" type="dword" data="00000000"/>
<value name="TransparencyDec" type="dword" data="00000000"/>
<value name="Key.MaximizeWidth" type="dword" data="00000000"/>
<value name="Key.MaximizeHeight" type="dword" data="00000000"/>
<value name="DefaultTerminalAgressive" type="hex" data="01"/>
<value name="DefaultTerminalNewWindow" type="hex" data="00"/>
<value name="AnsiLog" type="hex" data="00"/>
<value name="AnsiLogPath" type="string" data="%ConEmuDir%\Logs\"/>
<value name="Multi.DupConfirm" type="hex" data="01"/>
<value name="Multi.DetachConfirm" type="hex" data="01"/>
<value name="CTS.Intelligent" type="hex" data="01"/>
<value name="CTS.IntelligentExceptions" type="string" data="far|vim.exe"/>
<value name="StatusBar.Hide.Time" type="hex" data="01"/>
<value name="TaskbarProgress" type="hex" data="01"/>
<value name="RetardInactivePanes" type="hex" data="00"/>
<value name="ProcessCmdStart" type="hex" data="01"/>
<value name="Multi.ShowSearch" type="hex" data="01"/>
<value name="Multi.CloseConfirmFlags" type="hex" data="04"/>
<value name="FontUseDpi" type="hex" data="01"/>
<value name="FontUseUnits" type="hex" data="00"/>
<value name="UseScrollLock" type="hex" data="01"/>
<value name="CTS.ForceLocale" type="dword" data="00000000"/>
<value name="StatusBar.Hide.VisL" type="hex" data="01"/>
<value name="StatusBar.Hide.KeyHooks" type="hex" data="01"/>
<value name="StatusBar.Hide.WVBack" type="hex" data="01"/>
<value name="StatusBar.Hide.WVDC" type="hex" data="01"/>
<value name="StatusBar.Hide.Zoom" type="hex" data="01"/>
<value name="StatusBar.Hide.Dpi" type="hex" data="01"/>
<value name="TabFlashChanged" type="long" data="8"/>
<value name="TabModifiedSuffix" type="string" data="[*]"/>
<key name="HotKeys" modified="2016-09-05 22:35:00" build="160619">
<value name="KeyMacroVersion" type="hex" data="02"/>
<value name="Multi.Modifier" type="dword" data="00000011"/>
<value name="Multi.ArrowsModifier" type="dword" data="0000005b"/>
<value name="MinimizeRestore" type="dword" data="000011c0"/>
<value name="MinimizeRestore2" type="dword" data="00000000"/>
<value name="GlobalRestore" type="dword" data="00000000"/>
<value name="CdExplorerPath" type="dword" data="00000000"/>
<value name="ForcedFullScreen" type="dword" data="12115b0d"/>
<value name="SwitchGuiFocus" type="dword" data="00000000"/>
<value name="SetFocusGui" type="dword" data="00000000"/>
<value name="SetFocusChild" type="dword" data="00000000"/>
<value name="ChildSystemMenu" type="dword" data="000011ff"/>
<value name="Multi.NewConsole" type="dword" data="00000000"/>
<value name="Multi.NewConsoleShift" type="dword" data="00001154"/>
<value name="Multi.CmdKey" type="dword" data="00000000"/>
<value name="Multi.NewWindow" type="dword" data="00000000"/>
<value name="Multi.NewConsolePopup" type="dword" data="00000000"/>
<value name="Multi.NewConsolePopup2" type="dword" data="00000000"/>
<value name="Multi.NewAttach" type="dword" data="00000000"/>
<value name="Multi.NewSplitV" type="dword" data="00000000"/>
<value name="Multi.NewSplitH" type="dword" data="00000000"/>
<value name="Multi.SplitMaximize" type="dword" data="00005d0d"/>
<value name="Multi.SplitSizeVU" type="dword" data="00105d26"/>
<value name="Multi.SplitSizeVD" type="dword" data="00105d28"/>
<value name="Multi.SplitSizeHL" type="dword" data="00105d25"/>
<value name="Multi.SplitSizeHR" type="dword" data="00105d27"/>
<value name="Key.TabPane1" type="dword" data="00000000"/>
<value name="Key.TabPane2" type="dword" data="00000000"/>
<value name="Multi.SplitFocusU" type="dword" data="00005d26"/>
<value name="Multi.SplitFocusD" type="dword" data="00005d28"/>
<value name="Multi.SplitFocusL" type="dword" data="00005d25"/>
<value name="Multi.SplitFocusR" type="dword" data="00005d27"/>
<value name="Multi.Next" type="dword" data="00000000"/>
<value name="Multi.NextShift" type="dword" data="00000000"/>
<value name="Multi.Recreate" type="dword" data="00000000"/>
<value name="Multi.AltCon" type="dword" data="00000000"/>
<value name="Multi.Pause" type="dword" data="80808013"/>
<value name="Multi.Scroll" type="dword" data="00000000"/>
<value name="Multi.GroupInput" type="dword" data="00005d47"/>
<value name="Multi.Detach" type="dword" data="00000000"/>
<value name="Multi.Close" type="dword" data="00001157"/>
<value name="CloseTabKey" type="dword" data="00000000"/>
<value name="CloseGroupKey" type="dword" data="00000000"/>
<value name="CloseGroupPrcKey" type="dword" data="00000000"/>
<value name="CloseAllConKey" type="dword" data="00000000"/>
<value name="CloseZombiesKey" type="dword" data="00000000"/>
<value name="CloseExceptConKey" type="dword" data="00000000"/>
<value name="KillProcessKey" type="dword" data="00000000"/>
<value name="KillAllButShellKey" type="dword" data="00105b2e"/>
<value name="DuplicateRootKey" type="dword" data="00000000"/>
<value name="CloseConEmuKey" type="dword" data="00001273"/>
<value name="Multi.Rename" type="dword" data="00000000"/>
<value name="AffinityPriorityKey" type="dword" data="00005d41"/>
<value name="Multi.MoveLeft" type="dword" data="00125b25"/>
<value name="Multi.MoveRight" type="dword" data="00125b27"/>
<value name="CTS.VkBlockStart" type="dword" data="00000000"/>
<value name="CTS.VkTextStart" type="dword" data="00000000"/>
<value name="CTS.VkCopyFmt0" type="dword" data="00001143"/>
<value name="CTS.VkCopyFmt1" type="dword" data="00101143"/>
<value name="CTS.VkCopyFmt2" type="dword" data="00000000"/>
<value name="CTS.VkCopyAll" type="dword" data="00000000"/>
<value name="HighlightMouseSwitch" type="dword" data="00005d4c"/>
<value name="HighlightMouseSwitchX" type="dword" data="00005d58"/>
<value name="Multi.ShowTabsList" type="dword" data="00000000"/>
<value name="Multi.ShowTabsList2" type="dword" data="00000000"/>
<value name="ClipboardVkAllLines" type="dword" data="0000102d"/>
<value name="ClipboardVkFirstLine" type="dword" data="00001156"/>
<value name="DeleteWordToLeft" type="dword" data="00001108"/>
<value name="FindTextKey" type="dword" data="00005d46"/>
<value name="ScreenshotKey" type="dword" data="00000000"/>
<value name="ScreenshotFullKey" type="dword" data="00000000"/>
<value name="ShowStatusBarKey" type="dword" data="00000000"/>
<value name="ShowTabBarKey" type="dword" data="00000000"/>
<value name="ShowCaptionKey" type="dword" data="00000000"/>
<value name="AlwaysOnTopKey" type="dword" data="00000000"/>
<value name="TransparencyInc" type="dword" data="00000000"/>
<value name="TransparencyDec" type="dword" data="00000000"/>
<value name="Key.TabMenu" type="dword" data="00000000"/>
<value name="Key.TabMenu2" type="dword" data="00000000"/>
<value name="Key.Maximize" type="dword" data="00000000"/>
<value name="Key.MaximizeWidth" type="dword" data="00000000"/>
<value name="Key.MaximizeHeight" type="dword" data="00000000"/>
<value name="Key.TileToLeft" type="dword" data="00000000"/>
<value name="Key.TileToRight" type="dword" data="00000000"/>
<value name="Key.JumpPrevMonitor" type="dword" data="00000000"/>
<value name="Key.JumpNextMonitor" type="dword" data="00000000"/>
<value name="Key.FullScreen" type="dword" data="0000120d"/>
<value name="Key.SysMenu" type="dword" data="00000000"/>
<value name="Key.SysMenu2" type="dword" data="00001102"/>
<value name="Key.BufUp" type="dword" data="00001126"/>
<value name="Key.BufDn" type="dword" data="00001128"/>
<value name="Key.BufPgUp" type="dword" data="00001121"/>
<value name="Key.BufPgDn" type="dword" data="00001122"/>
<value name="Key.BufHfPgUp" type="dword" data="00005d21"/>
<value name="Key.BufHfPgDn" type="dword" data="00005d22"/>
<value name="Key.BufTop" type="dword" data="00005d24"/>
<value name="Key.BufBottom" type="dword" data="00005d23"/>
<value name="Key.BufCursor" type="dword" data="00005d08"/>
<value name="FontLargerKey" type="dword" data="00000000"/>
<value name="FontSmallerKey" type="dword" data="00000000"/>
<value name="FontOriginalKey" type="dword" data="00001104"/>
<value name="PasteFileKey" type="dword" data="00101146"/>
<value name="PastePathKey" type="dword" data="00101144"/>
<value name="PasteCygwinKey" type="dword" data="00005d2d"/>
<value name="KeyMacro01" type="dword" data="00a01231"/>
<value name="KeyMacro01.Text" type="string" data="Task(&quot;cmd&quot;)"/>
<value name="KeyMacro02" type="dword" data="00a01232"/>
<value name="KeyMacro02.Text" type="string" data="Task(&quot;PowerShell&quot;)"/>
<value name="KeyMacro03" type="dword" data="000011d0"/>
<value name="KeyMacro03.Text" type="string" data="FontSetSize(1,2)"/>
<value name="KeyMacro04" type="dword" data="000011d1"/>
<value name="KeyMacro04.Text" type="string" data="FontSetSize(1,-2)"/>
<value name="KeyMacro05" type="dword" data="00a01233"/>
<value name="KeyMacro05.Text" type="string" data="Task(&quot;PowerShell as Admin&quot;)"/>
<value name="KeyMacro06" type="dword" data="00000000"/>
<value name="KeyMacro06.Text" type="string" data=""/>
<value name="KeyMacro07" type="dword" data="00000000"/>
<value name="KeyMacro07.Text" type="string" data=""/>
<value name="KeyMacro08" type="dword" data="00000000"/>
<value name="KeyMacro08.Text" type="string" data=""/>
<value name="KeyMacro09" type="dword" data="00000000"/>
<value name="KeyMacro09.Text" type="string" data=""/>
<value name="KeyMacro10" type="dword" data="00000000"/>
<value name="KeyMacro10.Text" type="string" data=""/>
<value name="KeyMacro11" type="dword" data="00000000"/>
<value name="KeyMacro11.Text" type="string" data=""/>
<value name="KeyMacro12" type="dword" data="00000000"/>
<value name="KeyMacro12.Text" type="string" data=""/>
<value name="KeyMacro13" type="dword" data="00000000"/>
<value name="KeyMacro13.Text" type="string" data=""/>
<value name="KeyMacro14" type="dword" data="00000000"/>
<value name="KeyMacro14.Text" type="string" data=""/>
<value name="KeyMacro15" type="dword" data="00000000"/>
<value name="KeyMacro15.Text" type="string" data=""/>
<value name="KeyMacro16" type="dword" data="00000000"/>
<value name="KeyMacro16.Text" type="string" data=""/>
<value name="KeyMacro17" type="dword" data="00000000"/>
<value name="KeyMacro17.Text" type="string" data=""/>
<value name="KeyMacro18" type="dword" data="00000000"/>
<value name="KeyMacro18.Text" type="string" data=""/>
<value name="KeyMacro19" type="dword" data="00000000"/>
<value name="KeyMacro19.Text" type="string" data=""/>
<value name="KeyMacro20" type="dword" data="00000000"/>
<value name="KeyMacro20.Text" type="string" data=""/>
<value name="KeyMacro21" type="dword" data="00000000"/>
<value name="KeyMacro21.Text" type="string" data=""/>
<value name="KeyMacro22" type="dword" data="00000000"/>
<value name="KeyMacro22.Text" type="string" data=""/>
<value name="KeyMacro23" type="dword" data="00000000"/>
<value name="KeyMacro23.Text" type="string" data=""/>
<value name="KeyMacro24" type="dword" data="00000000"/>
<value name="KeyMacro24.Text" type="string" data=""/>
<value name="KeyMacro25" type="dword" data="00000000"/>
<value name="KeyMacro25.Text" type="string" data=""/>
<value name="KeyMacro26" type="dword" data="00000000"/>
<value name="KeyMacro26.Text" type="string" data=""/>
<value name="KeyMacro27" type="dword" data="00000000"/>
<value name="KeyMacro27.Text" type="string" data=""/>
<value name="KeyMacro28" type="dword" data="00000000"/>
<value name="KeyMacro28.Text" type="string" data=""/>
<value name="KeyMacro29" type="dword" data="00000000"/>
<value name="KeyMacro29.Text" type="string" data=""/>
<value name="KeyMacro30" type="dword" data="00000000"/>
<value name="KeyMacro30.Text" type="string" data=""/>
<value name="KeyMacro31" type="dword" data="00000000"/>
<value name="KeyMacro31.Text" type="string" data=""/>
<value name="KeyMacro32" type="dword" data="00000000"/>
<value name="KeyMacro32.Text" type="string" data=""/>
<value name="CTS.VkBlock" type="hex" data="a4"/>
<value name="CTS.VkText" type="hex" data="a0"/>
<value name="CTS.VkAct" type="hex" data="00"/>
<value name="CTS.VkPrompt" type="hex" data="00"/>
<value name="FarGotoEditorVk" type="hex" data="a2"/>
<value name="DndLKey" type="hex" data="00"/>
<value name="DndRKey" type="hex" data="a2"/>
<value name="WndDragKey" type="dword" data="00121101"/>
<value name="Multi.Unfasten" type="dword" data="00000000"/>
<value name="Key.AltNumpad" type="dword" data="00000000"/>
<value name="Key.JumpActiveMonitor" type="dword" data="00000000"/>
<value name="Key.DebugProcess" type="dword" data="00105b44"/>
<value name="Key.DumpProcess" type="dword" data="00000000"/>
<value name="Key.DumpTree" type="dword" data="00000000"/>
<value name="Key.ResetTerm" type="dword" data="00000000"/>
</key>
<value name="StartCreateDelay" type="ulong" data="100"/>
<value name="VividColors" type="hex" data="01"/>
<value name="DefaultTerminalDebugLog" type="hex" data="00"/>
<value name="AnsiExecution" type="hex" data="01"/>
<value name="AnsiAllowedCommands" type="multi">
<line data="cmd -cur_console:R /cGitShowBranch.cmd"/>
</value>
<value name="ProcessCtrlZ" type="hex" data="00"/>
<value name="SuppressBells" type="hex" data="01"/>
<value name="JumpListAutoUpdate" type="hex" data="01"/>
<value name="LastMonitor" type="string" data="0,0,1920,1052"/>
<value name="Restore2ActiveMon" type="hex" data="00"/>
<value name="DownShowExOnTopMessage" type="hex" data="00"/>
<value name="EnvironmentSet" type="multi">
<line data="set PATH=%ConEmuBaseDir%\Scripts;%PATH%"/>
</value>
<value name="CTS.ResetOnRelease" type="hex" data="00"/>
<value name="CTS.EraseBeforeReset" type="hex" data="01"/>
<value name="Anti-aliasing2" type="hex" data="00"/>
<value name="UseAltGrayPlus" type="hex" data="01"/>
<value name="MouseDragWindow" type="hex" data="01"/>
<value name="DebugLog" type="hex" data="00"/>
<value name="StatusBar.Hide.TMode" type="hex" data="01"/>
<value name="StatusBar.Hide.RMode" type="hex" data="01"/>
<value name="Update.InetTool" type="hex" data="00"/>
<value name="Update.InetToolCmd" type="string" data=""/>
</key>
</key>
</key>

31
Activate Windows.cmd Normal file
View file

@ -0,0 +1,31 @@
@echo off
:Flags
for %%f in (%*) do (
if /i "%%f" == "/DEBUG" (@echo on)
)
:FindBin
set bin= & pushd "%~dp0"
:FindBinInner
if exist ".bin" goto FindBinDone
if "%~d0\" == "%cd%" goto ErrorNoBin
cd .. & goto FindBinInner
:FindBinDone
set "bin=%cd%\.bin" & popd
:Launch
call "%bin%\Scripts\Launch.cmd" PyScript "%bin%\Scripts" "activate.py" /admin
goto Exit
:ErrorNoBin
popd
color 4e
echo ".bin" folder not found, aborting script.
echo.
echo Press any key to exit...
pause>nul
color
goto Exit
:Exit

View file

@ -1,44 +0,0 @@
@echo off
:Flags
for %%f in (%*) do (
if /i "%%f" == "/DEBUG" (@echo on)
)
:FindBin
set bin=
pushd "%~dp0"
:FindBinInner
if exist ".bin" (
set "bin=%cd%\.bin"
goto FindBinDone
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone
popd
if not defined bin goto ErrorNoBin
:Flags
for %%f in (%*) do (
if /i "%%f" == "/DEBUG" (@echo on)
)
:Launch
call "%bin%\Scripts\Launch.cmd" PSScript "%bin%\Scripts" "activate.ps1" /admin
goto Exit
:ErrorNoBin
color 4e
echo ".bin" folder not found, aborting script.
echo.
echo Press any key to exit...
pause>nul
color
goto Exit
:Exit

View file

@ -1,39 +0,0 @@
@echo off
:Flags
for %%f in (%*) do (
if /i "%%f" == "/DEBUG" (@echo on)
)
:FindBin
set bin=
pushd "%~dp0"
:FindBinInner
if exist ".bin" (
set "bin=%cd%\.bin"
goto FindBinDone
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone
popd
if not defined bin goto ErrorNoBin
:Launch
call "%bin%\Scripts\Launch.cmd" PSScript "%bin%\Scripts" "check_battery.ps1"
goto Exit
:ErrorNoBin
color 4e
echo ".bin" folder not found, aborting script.
echo.
echo Press any key to exit...
pause>nul
color
goto Exit
:Exit

View file

@ -8,114 +8,57 @@ for %%f in (%*) do (
:Init :Init
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
title Wizard Kit Copier title Wizard Kit: Tools Copier
color 1b color 1b
echo Initializing... echo Initializing...
:FindWizardKit :FindBin
set wrongpath= set bin= & pushd "%~dp0"
call :TestSource "%~dp0" :FindBinInner
if defined wrongpath (call :TestSource "\\10.0.0.10\WizardKit") if exist ".bin" goto FindBinDone
if defined wrongpath goto WizardKitNotFound if "%~d0\" == "%cd%" goto ErrorNoBin
cd .. & goto FindBinInner
:FindBinDone
set "bin=%cd%\.bin" & popd
:Vars :SetVariables
rem :TestSource above runs pushd, so %cd% should be accurate. if /i "!PROCESSOR_ARCHITECTURE!" == "AMD64" set "arch=64"
set "fastcopy=%bin%\FastCopy\FastCopy.exe"
if !arch! equ 64 (
set "fastcopy=%bin%\FastCopy\FastCopy64.exe"
)
set "fastcopy_args=/cmd=diff /no_ui /auto_close"
rem Set %client_dir%
call "%bin%\Scripts\init_client_dir.cmd"
pushd "%bin%\.."
set "source=%cd%" set "source=%cd%"
set "dest=%systemdrive%\WK\Tools" set "dest=%client_dir%\Tools"
:CreateToolsFolder :CopyFiles
mkdir "!dest!" > nul 2>&1 echo Copying data...
rem .bin
start "" /wait "%fastcopy%" %fastcopy_args% /exclude="\_Drivers\SDI\" "%bin%\*" /to="%dest%\.bin\"
:: .bin folder :: rem RKill links
set "args="
call :RoboCopy "!source!\.bin" "!dest!\.bin" "" "!args!"
:: RKill Alternatives ::
pushd "!dest!\.bin\RKill" pushd "!dest!\.bin\RKill"
mklink /h explorer.exe RKill.exe mklink /h explorer.exe RKill.exe >nul 2>&1
mklink /h iExplore.exe RKill.exe mklink /h iExplore.exe RKill.exe >nul 2>&1
mklink /h RKill.com RKill.exe mklink /h RKill.com RKill.exe >nul 2>&1
mklink /h RKill.scr RKill.exe mklink /h RKill.scr RKill.exe >nul 2>&1
mklink /h uSeRiNiT.exe RKill.exe mklink /h uSeRiNiT.exe RKill.exe >nul 2>&1
mklink /h WiNlOgOn.exe RKill.exe mklink /h WiNlOgOn.exe RKill.exe >nul 2>&1
popd popd
:: Root files :: rem Everything else
set "args=" start "" /wait "%fastcopy%" %fastcopy_args% /exclude="\.bin\;\.git\;\Data Recovery\;\Copy-WizardKit.cmd;\Drivers\Auto Detect - SDI.cmd" "%source%" /to="%dest%\"
call :RoboCopy "!source!\.bin\Scripts" "!dest!\.bin\Scripts" "" "!args!"
copy /y "!source!\Battery Health.cmd" "!dest!\"
copy /y "!source!\Enter SafeMode.cmd" "!dest!\"
copy /y "!source!\Exit SafeMode.cmd" "!dest!\"
copy /y "!source!\Final Checklist.cmd" "!dest!\"
copy /y "!source!\Reset Browsers.cmd" "!dest!\"
copy /y "!source!\SW Diagnostics.cmd" "!dest!\"
:: Activation :: :OpenFolder
set "args="
call :RoboCopy "!source!\Activation" "!dest!\Activation" "" "!args!"
:: Data Recovery ::
rem Disabled.
rem set "args="
rem call :RoboCopy "!source!\Data Recovery" "!dest!\Data Recovery" "" "!args!"
:: Data Transfers & DSR ::
set "args="
call :RoboCopy "!source!\Data Transfers & DSR" "!dest!\Data Transfers & DSR" "" "!args!"
:: Diagnostics ::
set "args="
call :RoboCopy "!source!\Diagnostics" "!dest!\Diagnostics" "" "!args!"
:: Drivers ::
set "args="
call :RoboCopy "!source!\Drivers" "!dest!\Drivers" "" "!args!"
:: Installers ::
set "args="
call :RoboCopy "!source!\Installers" "!dest!\Installers" "" "!args!"
:: Misc ::
set "args="
call :RoboCopy "!source!\Misc" "!dest!\Misc" "" "!args!"
:: OSR & VR ::
set "args="
call :RoboCopy "!source!\OSR & VR" "!dest!\OSR & VR" "" "!args!"
:: Uninstallers ::
set "args="
call :RoboCopy "!source!\Uninstallers" "!dest!\Uninstallers" "" "!args!"
:: Open Folder ::
start "" explorer "!dest!" start "" explorer "!dest!"
goto Done goto Done
:: Subroutines :: :ErrorNoBin
:RoboCopy popd
rem set args (without quotes) echo ERROR: ".bin" folder not found..
set "_source=%~1"
set "_dest=%~2"
set "_files=%~3"
set "_args=%~4"
mkdir "!_dest!" >nul 2>&1
robocopy /s /r:3 /w:0 "!_source!" "!_dest!" !_files! !_args!
goto :EOF
:TestSource
set wrongpath=
:: Testing one for one dir is probably enough.
dir "Uninstallers" >nul 2>&1
if %errorlevel% neq 0 (set wrongpath=true)
if not defined wrongpath (pushd "%1")
goto :EOF
:WizardKitNotFound
echo ERROR: WizardKit not found.
goto Abort
:WindowsVersionError
echo ERROR: This version of Windows is not supported.
goto Abort goto Abort
:Abort :Abort
@ -136,5 +79,3 @@ goto Exit
popd popd
color color
endlocal endlocal
:EOF

View file

@ -6,28 +6,20 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Console "%bin%\TestDisk" "photorec_win.exe" "" /admin call "%bin%\Scripts\Launch.cmd" Console "%bin%\TestDisk" "photorec_win.exe" "" /admin
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,28 +6,20 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\TestDisk" "qphotorec_win.exe" "" /admin call "%bin%\Scripts\Launch.cmd" Program "%bin%\TestDisk" "qphotorec_win.exe" "" /admin
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,28 +6,20 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Console "%bin%\TestDisk" "testdisk_win.exe" "" /admin call "%bin%\Scripts\Launch.cmd" Console "%bin%\TestDisk" "testdisk_win.exe" "" /admin
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,28 +6,20 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\Explorer++" "Explorer++.exe" "%userprofile%" /max call "%bin%\Scripts\Launch.cmd" Program "%bin%\Explorer++" "Explorer++.exe" "%userprofile%" /max
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,32 +6,24 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:WKInfo :CreateInfoDir
rem Create WK\Info\YYYY-MM-DD and set path as %log_dir% rem Create %client_dir%\Info\YYYY-MM-DD and set path as %log_dir%
call "%bin%\Scripts\wk_info.cmd" call "%bin%\Scripts\init_client_dir.cmd" /Info /Transfer
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\FastCopy" "FastCopy.exe" "/logfile=%log_dir%\FastCopy.log /cmd=noexist_only /utf8 /skip_empty_dir /linkdest /exclude=$RECYCLE.BIN;$Recycle.Bin;.AppleDB;.AppleDesktop;.AppleDouble;.com.apple.timemachine.supported;.dbfseventsd;.DocumentRevisions-V100*;.DS_Store;.fseventsd;.PKInstallSandboxManager;.Spotlight*;.SymAV*;.symSchedScanLockxz;.TemporaryItems;.Trash*;.vol;.VolumeIcon.icns;desktop.ini;Desktop?DB;Desktop?DF;hiberfil.sys;lost+found;Network?Trash?Folder;pagefile.sys;Recycled;RECYCLER;System?Volume?Information;Temporary?Items;Thumbs.db /to=%systemdrive%\WK\Transfer\" /admin call "%bin%\Scripts\Launch.cmd" Program "%bin%\FastCopy" "FastCopy.exe" "/logfile=%log_dir%\FastCopy.log /cmd=noexist_only /utf8 /skip_empty_dir /linkdest /exclude=$RECYCLE.BIN;$Recycle.Bin;.AppleDB;.AppleDesktop;.AppleDouble;.com.apple.timemachine.supported;.dbfseventsd;.DocumentRevisions-V100*;.DS_Store;.fseventsd;.PKInstallSandboxManager;.Spotlight*;.SymAV*;.symSchedScanLockxz;.TemporaryItems;.Trash*;.vol;.VolumeIcon.icns;desktop.ini;Desktop?DB;Desktop?DF;hiberfil.sys;lost+found;Network?Trash?Folder;pagefile.sys;Recycled;RECYCLER;System?Volume?Information;Temporary?Items;Thumbs.db /to=%client_dir%\Transfer\" /admin
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,32 +6,24 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:WKInfo :CreateInfoDir
rem Create WK\Info\YYYY-MM-DD and set path as %log_dir% rem Create %client_dir%\Info\YYYY-MM-DD and set path as %log_dir%
call "%bin%\Scripts\wk_info.cmd" call "%bin%\Scripts\init_client_dir.cmd" /Info /Transfer
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\FastCopy" "FastCopy.exe" "/logfile=%log_dir%\FastCopy.log /cmd=noexist_only /utf8 /skip_empty_dir /linkdest /exclude=$RECYCLE.BIN;$Recycle.Bin;.AppleDB;.AppleDesktop;.AppleDouble;.com.apple.timemachine.supported;.dbfseventsd;.DocumentRevisions-V100*;.DS_Store;.fseventsd;.PKInstallSandboxManager;.Spotlight*;.SymAV*;.symSchedScanLockxz;.TemporaryItems;.Trash*;.vol;.VolumeIcon.icns;desktop.ini;Desktop?DB;Desktop?DF;hiberfil.sys;lost+found;Network?Trash?Folder;pagefile.sys;Recycled;RECYCLER;System?Volume?Information;Temporary?Items;Thumbs.db /to=%systemdrive%\WK\Transfer\" call "%bin%\Scripts\Launch.cmd" Program "%bin%\FastCopy" "FastCopy.exe" "/logfile=%log_dir%\FastCopy.log /cmd=noexist_only /utf8 /skip_empty_dir /linkdest /exclude=$RECYCLE.BIN;$Recycle.Bin;.AppleDB;.AppleDesktop;.AppleDouble;.com.apple.timemachine.supported;.dbfseventsd;.DocumentRevisions-V100*;.DS_Store;.fseventsd;.PKInstallSandboxManager;.Spotlight*;.SymAV*;.symSchedScanLockxz;.TemporaryItems;.Trash*;.vol;.VolumeIcon.icns;desktop.ini;Desktop?DB;Desktop?DF;hiberfil.sys;lost+found;Network?Trash?Folder;pagefile.sys;Recycled;RECYCLER;System?Volume?Information;Temporary?Items;Thumbs.db /to=%client_dir%\Transfer\"
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,25 +6,18 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:CreateQuarantineDir :Init
set "q_dir=%systemdrive%\WK\Quarantine\KVRT" rem Set %client_dir%
call "%bin%\Scripts\init_client_dir.cmd" /Quarantine
set "q_dir=%client_dir%\Quarantine\KVRT"
mkdir "%q_dir%">nul 2>&1 mkdir "%q_dir%">nul 2>&1
:Launch :Launch
@ -32,6 +25,7 @@ call "%bin%\Scripts\Launch.cmd" Program "%bin%" "KVRT.exe" "-accepteula -d %q_di
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

31
Data Transfers/Q-Dir.cmd Normal file
View file

@ -0,0 +1,31 @@
@echo off
:Flags
for %%f in (%*) do (
if /i "%%f" == "/DEBUG" (@echo on)
)
:FindBin
set bin= & pushd "%~dp0"
:FindBinInner
if exist ".bin" goto FindBinDone
if "%~d0\" == "%cd%" goto ErrorNoBin
cd .. & goto FindBinInner
:FindBinDone
set "bin=%cd%\.bin" & popd
:Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\Q-Dir" "Q-Dir.exe" "%userprofile%" /max
goto Exit
:ErrorNoBin
popd
color 4e
echo ".bin" folder not found, aborting script.
echo.
echo Press any key to exit...
pause>nul
color
goto Exit
:Exit

View file

@ -6,41 +6,20 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:ClearConfigs
if not exist "%bin%\tmp" goto Extract
pushd "%bin%\tmp"
if exist "ProduKey.cfg" del "ProduKey.cfg"
if exist "ProduKey64.cfg" del "ProduKey64.cfg"
popd
:Extract
cls
mkdir "%bin%\tmp" >nul 2>&1
call "%bin%\Scripts\Launch.cmd" Program "%bin%" "%bin%\7-Zip\7za.exe" "e ProduKey.7z -otmp -aoa -pAbracadabra -bsp0 -bso0" /wait
ping -n 1 127.0.0.1>nul
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Console "%bin%\Scripts" "transferred_keys.cmd" /admin call "%bin%\Scripts\Launch.cmd" Console "%bin%\Scripts" "transferred_keys.cmd" /admin
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -0,0 +1,31 @@
@echo off
:Flags
for %%f in (%*) do (
if /i "%%f" == "/DEBUG" (@echo on)
)
:FindBin
set bin= & pushd "%~dp0"
:FindBinInner
if exist ".bin" goto FindBinDone
if "%~d0\" == "%cd%" goto ErrorNoBin
cd .. & goto FindBinInner
:FindBinDone
set "bin=%cd%\.bin" & popd
:Launch
call "%bin%\Scripts\Launch.cmd" PyScript "%bin%\Scripts" "user_data_transfer.py"
goto Exit
:ErrorNoBin
popd
color 4e
echo ".bin" folder not found, aborting script.
echo.
echo Press any key to exit...
pause>nul
color
goto Exit
:Exit

View file

@ -6,28 +6,20 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\AIDA64" "aida64.exe" "" /admin call "%bin%\Scripts\Launch.cmd" Program "%bin%\AIDA64" "aida64.exe" "" /admin
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,28 +6,20 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\BatteryInfoView" "BatteryInfoView.exe" "" /admin call "%bin%\Scripts\Launch.cmd" Program "%bin%\BatteryInfoView" "BatteryInfoView.exe" "" /admin
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,28 +6,20 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\BleachBit" "bleachbit.exe" "" /admin call "%bin%\Scripts\Launch.cmd" Program "%bin%\BleachBit" "bleachbit.exe" "" /admin
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,28 +6,20 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\BlueScreenView" "BlueScreenView.exe" "" /admin call "%bin%\Scripts\Launch.cmd" Program "%bin%\BlueScreenView" "BlueScreenView.exe" "" /admin
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,28 +6,20 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\Auslogics DiskDefrag" "DiskDefrag.exe" "" /admin call "%bin%\Scripts\Launch.cmd" Program "%bin%\Auslogics DiskDefrag" "DiskDefrag.exe" "" /admin
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,22 +6,13 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:ModifySettings :ModifySettings
reg add HKCU\Software\Sysinternals\AutoRuns /v checkvirustotal /t REG_DWORD /d 1 /f >nul reg add HKCU\Software\Sysinternals\AutoRuns /v checkvirustotal /t REG_DWORD /d 1 /f >nul
@ -40,6 +31,7 @@ call "%bin%\Scripts\Launch.cmd" Program "%bin%\SysinternalsSuite" "Autoruns.exe"
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,28 +6,20 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\BIOSCodes" "BIOSCodes.exe" "" call "%bin%\Scripts\Launch.cmd" Program "%bin%\BIOSCodes" "BIOSCodes.exe" ""
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,28 +6,20 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\CPU-Z" "cpuz.exe" "" call "%bin%\Scripts\Launch.cmd" Program "%bin%\CPU-Z" "cpuz.exe" ""
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,32 +6,24 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:WKInfo :Init
rem Create WK\Info\YYYY-MM-DD and set path as %log_dir% rem Create %client_dir%\Info\YYYY-MM-DD and set path as %log_dir%
call "%bin%\Scripts\wk_info.cmd" call "%bin%\Scripts\init_client_dir.cmd" /Info
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\erunt" "ERUNT.EXE" "%log_dir%%\Registry sysreg curuser otherusers" /admin call "%bin%\Scripts\Launch.cmd" Program "%bin%\erunt" "ERUNT.EXE" "%log_dir%%\Registry sysreg curuser otherusers" /admin
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,28 +6,20 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\HeavyLoad" "HeavyLoad.exe" "" /admin call "%bin%\Scripts\Launch.cmd" Program "%bin%\HeavyLoad" "HeavyLoad.exe" "" /admin
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,32 +6,24 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:WKInfo :CreateInfoDir
rem Create WK\Info\YYYY-MM-DD and set path as %log_dir% rem Create %client_dir%\Info\YYYY-MM-DD and set path as %log_dir%
call "%bin%\Scripts\wk_info.cmd" call "%bin%\Scripts\init_client_dir.cmd" /Info
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\HitmanPro" "HitmanPro.exe" "/scan /noinstall /noupload /log=%log_dir%\hitman.xml /fb" /admin call "%bin%\Scripts\Launch.cmd" Program "%bin%\HitmanPro" "HitmanPro.exe" "/scan /noinstall /noupload /log=%log_dir%\hitman.xml /fb" /admin
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,22 +6,13 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Init :Init
setlocal enabledelayedexpansion setlocal enabledelayedexpansion
@ -29,7 +20,7 @@ setlocal enabledelayedexpansion
:Extract :Extract
mkdir "%bin%\tmp" >nul 2>&1 mkdir "%bin%\tmp" >nul 2>&1
call "%bin%\Scripts\Launch.cmd" Program "%bin%" "%bin%\7-Zip\7za.exe" "x mailpv.7z -otmp -aoa -pAbracadabra -bsp0 -bso0" /wait call "%bin%\Scripts\Launch.cmd" Program "%bin%" "%bin%\7-Zip\7za.exe" "x mailpv.7z -otmp -aoa -pAbracadabra -bsp0 -bso0" /wait
ping -n 1 127.0.0.1>nul ping -n 2 127.0.0.1>nul
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\tmp" "mailpv.exe" "" /admin call "%bin%\Scripts\Launch.cmd" Program "%bin%\tmp" "mailpv.exe" "" /admin
@ -40,6 +31,7 @@ endlocal
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,22 +6,13 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Init :Init
setlocal enabledelayedexpansion setlocal enabledelayedexpansion
@ -29,7 +20,7 @@ setlocal enabledelayedexpansion
:Extract :Extract
mkdir "%bin%\tmp" >nul 2>&1 mkdir "%bin%\tmp" >nul 2>&1
call "%bin%\Scripts\Launch.cmd" Program "%bin%" "%bin%\7-Zip\7za.exe" "x mailpv.7z -otmp -aoa -pAbracadabra -bsp0 -bso0" /wait call "%bin%\Scripts\Launch.cmd" Program "%bin%" "%bin%\7-Zip\7za.exe" "x mailpv.7z -otmp -aoa -pAbracadabra -bsp0 -bso0" /wait
ping -n 1 127.0.0.1>nul ping -n 2 127.0.0.1>nul
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\tmp" "mailpv.exe" "" call "%bin%\Scripts\Launch.cmd" Program "%bin%\tmp" "mailpv.exe" ""
@ -40,6 +31,7 @@ endlocal
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,28 +6,20 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\GpuTest" "GpuTest_GUI.exe" "" call "%bin%\Scripts\Launch.cmd" Program "%bin%\GpuTest" "GpuTest_GUI.exe" ""
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,28 +6,20 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\HWMonitor" "HWMonitor.exe" "" call "%bin%\Scripts\Launch.cmd" Program "%bin%\HWMonitor" "HWMonitor.exe" ""
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -0,0 +1,39 @@
@echo off
:Flags
for %%f in (%*) do (
if /i "%%f" == "/DEBUG" (@echo on)
)
:FindBin
set bin= & pushd "%~dp0"
:FindBinInner
if exist ".bin" goto FindBinDone
if "%~d0\" == "%cd%" goto ErrorNoBin
cd .. & goto FindBinInner
:FindBinDone
set "bin=%cd%\.bin" & popd
:Configure
rem just configure for both x32 & x64
for %%a in (32 64) do (
copy /y "%bin%\HWiNFO\general.ini" "%bin%\HWiNFO\HWiNFO%%a.ini"
(echo SensorsOnly=1)>>"%bin%\HWiNFO\HWiNFO%%a.ini"
(echo SummaryOnly=0)>>"%bin%\HWiNFO\HWiNFO%%a.ini"
)
:Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\HWiNFO" "HWiNFO.exe" ""
goto Exit
:ErrorNoBin
popd
color 4e
echo ".bin" folder not found, aborting script.
echo.
echo Press any key to exit...
pause>nul
color
goto Exit
:Exit

39
Diagnostics/HWiNFO.cmd Normal file
View file

@ -0,0 +1,39 @@
@echo off
:Flags
for %%f in (%*) do (
if /i "%%f" == "/DEBUG" (@echo on)
)
:FindBin
set bin= & pushd "%~dp0"
:FindBinInner
if exist ".bin" goto FindBinDone
if "%~d0\" == "%cd%" goto ErrorNoBin
cd .. & goto FindBinInner
:FindBinDone
set "bin=%cd%\.bin" & popd
:Configure
rem just configure for both x32 & x64
for %%a in (32 64) do (
copy /y "%bin%\HWiNFO\general.ini" "%bin%\HWiNFO\HWiNFO%%a.ini"
(echo SensorsOnly=0)>>"%bin%\HWiNFO\HWiNFO%%a.ini"
(echo SummaryOnly=0)>>"%bin%\HWiNFO\HWiNFO%%a.ini"
)
:Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\HWiNFO" "HWiNFO.exe" ""
goto Exit
:ErrorNoBin
popd
color 4e
echo ".bin" folder not found, aborting script.
echo.
echo Press any key to exit...
pause>nul
color
goto Exit
:Exit

View file

@ -6,32 +6,24 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:WKInfo :CreateInfoDir
rem Create WK\Info\YYYY-MM-DD and set path as %log_dir% rem Create %client_dir%\Info\YYYY-MM-DD and set path as %log_dir%
call "%bin%\Scripts\wk_info.cmd" call "%bin%\Scripts\init_client_dir.cmd" /Info
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\HitmanPro" "HitmanPro.exe" "/scan /noinstall /noupload /log=%log_dir%\hitman.xml" /admin call "%bin%\Scripts\Launch.cmd" Program "%bin%\HitmanPro" "HitmanPro.exe" "/scan /noinstall /noupload /log=%log_dir%\hitman.xml" /admin
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,92 +6,39 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Init :Init
setlocal EnableDelayedExpansion setlocal EnableDelayedExpansion
:ClearConfigs :ClearConfigs
if not exist "%bin%\tmp" goto FindHives if not exist "%bin%\tmp" goto Extract
pushd "%bin%\tmp" pushd "%bin%\tmp"
if exist "ProduKey.cfg" del "ProduKey.cfg" if exist "ProduKey.cfg" del "ProduKey.cfg"
if exist "ProduKey64.cfg" del "ProduKey64.cfg" if exist "ProduKey64.cfg" del "ProduKey64.cfg"
popd popd
:FindHives
set choices=L
echo.L: ~Local System~
set "_S=%systemdrive%\WK\Transfer\Software"
if exist "!_S!" (
set "choices=!choices!S"
echo.S: !_S!
)
set "_T=%systemdrive%\WK\Transfer\Windows\System32\config\Software"
if exist "!_T!" (
set "choices=!choices!T"
echo.T: !_T!
)
set "_O=%systemdrive%\WK\Transfer\Windows.old\Windows\System32\config\Software"
if exist "!_O!" (
set "choices=!choices!O"
echo.O: !_O!
)
set "_P=%systemdrive%\WK\Transfer\Windows.old\Software"
if exist "!_P!" (
set "choices=!choices!P"
echo.P: !_P!
)
:Choose
echo.
set "args="
rem If there are no choices, then don't ask
if "!choices!" == "L" (goto Extract)
rem pick souce and use response to set sw_hive
choice /c !choices! /t 10 /d l /m "Please select source"
set /a "index=!errorlevel! - 1"
set "choice=!choices:~%index%,1!"
rem Transferred hives
if "!choice!" == "S" (set "sw_hive=!_S!")
if "!choice!" == "T" (set "sw_hive=!_T!")
if "!choice!" == "O" (set "sw_hive=!_O!")
if "!choice!" == "P" (set "sw_hive=!_P!")
rem set args
if !index! neq 0 (set "args=/regfile !sw_hive!")
:Extract :Extract
cls cls
mkdir "%bin%\tmp" >nul 2>&1 mkdir "%bin%\tmp" >nul 2>&1
call "%bin%\Scripts\Launch.cmd" Program "%bin%" "%bin%\7-Zip\7za.exe" "e ProduKey.7z -otmp -aoa -pAbracadabra -bsp0 -bso0" /wait call "%bin%\Scripts\Launch.cmd" Program "%bin%" "%bin%\7-Zip\7za.exe" "e ProduKey.7z -otmp -aoa -pAbracadabra -bsp0 -bso0" /wait
ping -n 1 127.0.0.1>nul ping -n 2 127.0.0.1>nul
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\tmp" "ProduKey.exe" "!args!" /admin call "%bin%\Scripts\Launch.cmd" Program "%bin%\tmp" "ProduKey.exe" "" /admin
:Done :Done
endlocal endlocal
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

31
Diagnostics/SIV.cmd Normal file
View file

@ -0,0 +1,31 @@
@echo off
:Flags
for %%f in (%*) do (
if /i "%%f" == "/DEBUG" (@echo on)
)
:FindBin
set bin= & pushd "%~dp0"
:FindBinInner
if exist ".bin" goto FindBinDone
if "%~d0\" == "%cd%" goto ErrorNoBin
cd .. & goto FindBinInner
:FindBinDone
set "bin=%cd%\.bin" & popd
:Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\SIV" "SIV.exe" "-LOCAL -KEYS -UNICODE -NOWIZARD"
goto Exit
:ErrorNoBin
popd
color 4e
echo ".bin" folder not found, aborting script.
echo.
echo Press any key to exit...
pause>nul
color
goto Exit
:Exit

View file

@ -6,22 +6,13 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
echo Waiting for software installation to finish... echo Waiting for software installation to finish...
@ -30,6 +21,7 @@ start "" "http://us.acer.com/ac/en/US/content/drivers"
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,22 +6,13 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
echo Waiting for software installation to finish... echo Waiting for software installation to finish...
@ -30,6 +21,7 @@ start "" "http://www.dell.com/support/home/us/en/19/Eula/scan?sourcePage=J&scanT
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,22 +6,13 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
echo Waiting for software installation to finish... echo Waiting for software installation to finish...
@ -30,6 +21,7 @@ start "" "http://support.hp.com/us-en/drivers/selfservice/identify"
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,28 +6,20 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\_Drivers" "Intel Driver Update Utility.exe" "" call "%bin%\Scripts\Launch.cmd" Program "%bin%\_Drivers" "Intel Driver Update Utility.exe" ""
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,22 +6,13 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
echo Waiting for software installation to finish... echo Waiting for software installation to finish...
@ -30,6 +21,7 @@ start "" "http://support.lenovo.com/us/en/products?tabName=Downloads"
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,28 +6,20 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\_Drivers\SDI" "SDI.exe" "" call "%bin%\Scripts\Launch.cmd" Program "%bin%\_Drivers\SDI" "SDI.exe" ""
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,22 +6,13 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
echo Waiting for software installation to finish... echo Waiting for software installation to finish...
@ -30,6 +21,7 @@ start "" "http://support.toshiba.com/drivers"
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,28 +6,20 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\_Drivers" "AMD Autodetect.exe" "" call "%bin%\Scripts\Launch.cmd" Program "%bin%\_Drivers" "AMD Autodetect.exe" ""
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -1,39 +0,0 @@
@echo off
:Flags
for %%f in (%*) do (
if /i "%%f" == "/DEBUG" (@echo on)
)
:FindBin
set bin=
pushd "%~dp0"
:FindBinInner
if exist ".bin" (
set "bin=%cd%\.bin"
goto FindBinDone
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone
popd
if not defined bin goto ErrorNoBin
:Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\_Drivers" "AMD Gaming Evolved.exe" ""
goto Exit
:ErrorNoBin
color 4e
echo ".bin" folder not found, aborting script.
echo.
echo Press any key to exit...
pause>nul
color
goto Exit
:Exit

View file

@ -1,39 +0,0 @@
@echo off
:Flags
for %%f in (%*) do (
if /i "%%f" == "/DEBUG" (@echo on)
)
:FindBin
set bin=
pushd "%~dp0"
:FindBinInner
if exist ".bin" (
set "bin=%cd%\.bin"
goto FindBinDone
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone
popd
if not defined bin goto ErrorNoBin
:Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\_Drivers" "GeForce Experience.exe" ""
goto Exit
:ErrorNoBin
color 4e
echo ".bin" folder not found, aborting script.
echo.
echo Press any key to exit...
pause>nul
color
goto Exit
:Exit

31
Drivers/GPU - NVIDIA.cmd Normal file
View file

@ -0,0 +1,31 @@
@echo off
:Flags
for %%f in (%*) do (
if /i "%%f" == "/DEBUG" (@echo on)
)
:FindBin
set bin= & pushd "%~dp0"
:FindBinInner
if exist ".bin" goto FindBinDone
if "%~d0\" == "%cd%" goto ErrorNoBin
cd .. & goto FindBinInner
:FindBinDone
set "bin=%cd%\.bin" & popd
:Launch
start "" "http://www.nvidia.com/Download/index.aspx?lang=en-us"
goto Exit
:ErrorNoBin
popd
color 4e
echo ".bin" folder not found, aborting script.
echo.
echo Press any key to exit...
pause>nul
color
goto Exit
:Exit

View file

@ -6,28 +6,20 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\_Drivers" "SanDisk Express Cache.exe" "" call "%bin%\Scripts\Launch.cmd" Program "%bin%\_Drivers" "SanDisk Express Cache.exe" ""
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,28 +6,20 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\_Drivers" "Intel SSD Toolbox.exe" "" call "%bin%\Scripts\Launch.cmd" Program "%bin%\_Drivers" "Intel SSD Toolbox.exe" ""
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,28 +6,20 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Program "%bin%\_Drivers" "Samsung Magician.exe" "" call "%bin%\Scripts\Launch.cmd" Program "%bin%\_Drivers" "Samsung Magician.exe" ""
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,28 +6,20 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" PSScript "%bin%\Scripts" "enter_safemode.ps1" /admin call "%bin%\Scripts\Launch.cmd" PSScript "%bin%\Scripts" "enter_safemode.ps1" /admin
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,28 +6,20 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" PSScript "%bin%\Scripts" "exit_safemode.ps1" /admin call "%bin%\Scripts\Launch.cmd" PSScript "%bin%\Scripts" "exit_safemode.ps1" /admin
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,28 +6,20 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" PSScript "%bin%\Scripts" "checklist.ps1" /admin call "%bin%\Scripts\Launch.cmd" PSScript "%bin%\Scripts" "final_checklist.ps1" /admin
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,22 +6,13 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2007\2007 Microsoft Office system (SP3)" call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2007\2007 Microsoft Office system (SP3)"
@ -29,6 +20,7 @@ call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2007\2007 Microsoft Offi
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,22 +6,13 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2007\Access 2007 (SP3)" call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2007\Access 2007 (SP3)"
@ -29,6 +20,7 @@ call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2007\Access 2007 (SP3)"
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,22 +6,13 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2007\AccessRuntime2007.exe" call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2007\AccessRuntime2007.exe"
@ -29,6 +20,7 @@ call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2007\AccessRuntime2007.e
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,22 +6,13 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2007\Home and Student 2007 (SP3)" call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2007\Home and Student 2007 (SP3)"
@ -29,6 +20,7 @@ call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2007\Home and Student 20
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,22 +6,13 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2007\Outlook 2007 (SP3)" call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2007\Outlook 2007 (SP3)"
@ -29,6 +20,7 @@ call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2007\Outlook 2007 (SP3)"
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,22 +6,13 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2007\Professional 2007 (SP3)" call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2007\Professional 2007 (SP3)"
@ -29,6 +20,7 @@ call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2007\Professional 2007 (
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,22 +6,13 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2007\Publisher 2007 (SP3)" call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2007\Publisher 2007 (SP3)"
@ -29,6 +20,7 @@ call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2007\Publisher 2007 (SP3
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,22 +6,13 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2007\Small Business 2007 (SP3)" call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2007\Small Business 2007 (SP3)"
@ -29,6 +20,7 @@ call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2007\Small Business 2007
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,22 +6,13 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2010\Outlook 2010 (SP2) (x32)" call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2010\Outlook 2010 (SP2) (x32)"
@ -29,6 +20,7 @@ call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2010\Outlook 2010 (SP2)
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,22 +6,13 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2010\Outlook 2010 (SP2) (x64)" call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2010\Outlook 2010 (SP2) (x64)"
@ -29,6 +20,7 @@ call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2010\Outlook 2010 (SP2)
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,22 +6,13 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2010\Professional Plus 2010 (SP2)" call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2010\Professional Plus 2010 (SP2)"
@ -29,6 +20,7 @@ call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2010\Professional Plus 2
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,22 +6,13 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2010\Publisher 2010 (SP2)" call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2010\Publisher 2010 (SP2)"
@ -29,6 +20,7 @@ call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2010\Publisher 2010 (SP2
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,22 +6,13 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2010\Single Image 2010 (SP2)" call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2010\Single Image 2010 (SP2)"
@ -29,6 +20,7 @@ call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2010\Single Image 2010 (
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,22 +6,13 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2013\Home and Business 2013" call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2013\Home and Business 2013"
@ -29,6 +20,7 @@ call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2013\Home and Business 2
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,22 +6,13 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2013\Home and Student 2013" call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2013\Home and Student 2013"
@ -29,6 +20,7 @@ call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2013\Home and Student 20
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

View file

@ -6,22 +6,13 @@ for %%f in (%*) do (
) )
:FindBin :FindBin
set bin= set bin= & pushd "%~dp0"
pushd "%~dp0"
:FindBinInner :FindBinInner
if exist ".bin" ( if exist ".bin" goto FindBinDone
set "bin=%cd%\.bin" if "%~d0\" == "%cd%" goto ErrorNoBin
goto FindBinDone cd .. & goto FindBinInner
)
if "%~d0\" == "%cd%" (
goto FindBinDone
) else (
cd ..
)
goto FindBinInner
:FindBinDone :FindBinDone
popd set "bin=%cd%\.bin" & popd
if not defined bin goto ErrorNoBin
:Launch :Launch
call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2013\Professional Plus 2013" call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2013\Professional Plus 2013"
@ -29,6 +20,7 @@ call "%bin%\Scripts\Launch.cmd" Office "%bin%\Scripts" "2013\Professional Plus 2
goto Exit goto Exit
:ErrorNoBin :ErrorNoBin
popd
color 4e color 4e
echo ".bin" folder not found, aborting script. echo ".bin" folder not found, aborting script.
echo. echo.

Some files were not shown because too many files have changed in this diff Show more