commit c6e58088af4fbc2b7f3f15ec7fe17d74dcf40a7c Author: Alan Mason <@2Shirt> Date: Fri Nov 17 00:50:27 2017 -0700 2016-06: Retroactive initial commit diff --git a/.bin/AIDA64/full.rpf b/.bin/AIDA64/full.rpf new file mode 100644 index 00000000..73b08713 --- /dev/null +++ b/.bin/AIDA64/full.rpf @@ -0,0 +1,99 @@ +InfoPage="Computer;Summary" +InfoPage="Computer;Computer Name" +InfoPage="Computer;DMI" +InfoPage="Computer;IPMI" +InfoPage="Computer;Overclock" +InfoPage="Computer;Power Management" +InfoPage="Computer;Portable Computer" +InfoPage="Motherboard;CPU" +InfoPage="Motherboard;CPUID" +InfoPage="Motherboard;Motherboard" +InfoPage="Motherboard;Memory" +InfoPage="Motherboard;SPD" +InfoPage="Motherboard;Chipset" +InfoPage="Motherboard;BIOS" +InfoPage="Motherboard;ACPI" +InfoPage="Operating System;Operating System" +InfoPage="Operating System;Processes" +InfoPage="Operating System;System Drivers" +InfoPage="Operating System;Services" +InfoPage="Operating System;AX Files" +InfoPage="Operating System;DLL Files" +InfoPage="Operating System;Certificates" +InfoPage="Operating System;UpTime" +InfoPage="Server;Share" +InfoPage="Server;Opened Files" +InfoPage="Server;Account Security" +InfoPage="Server;Logon" +InfoPage="Server;Users" +InfoPage="Server;Local Groups" +InfoPage="Server;Global Groups" +InfoPage="Display;Windows Video" +InfoPage="Display;PCI / AGP Video" +InfoPage="Display;GPU" +InfoPage="Display;Monitor" +InfoPage="Display;Desktop" +InfoPage="Display;Multi-Monitor" +InfoPage="Display;Video Modes" +InfoPage="Display;OpenGL" +InfoPage="Display;GPGPU" +InfoPage="Display;Mantle" +InfoPage="Display;Vulkan" +InfoPage="Display;Fonts" +InfoPage="Multimedia;Windows Audio" +InfoPage="Multimedia;PCI / PnP Audio" +InfoPage="Multimedia;HD Audio" +InfoPage="Multimedia;OpenAL" +InfoPage="Multimedia;Audio Codecs" +InfoPage="Multimedia;Video Codecs" +InfoPage="Multimedia;MCI" +InfoPage="Multimedia;SAPI" +InfoPage="Storage;Windows Storage" +InfoPage="Storage;Logical Drives" +InfoPage="Storage;Physical Drives" +InfoPage="Storage;Optical Drives" +InfoPage="Storage;ASPI" +InfoPage="Storage;ATA" +InfoPage="Storage;SMART" +InfoPage="Network;Windows Network" +InfoPage="Network;PCI / PnP Network" +InfoPage="Network;RAS" +InfoPage="Network;Net Resources" +InfoPage="Network;IAM" +InfoPage="Network;Internet" +InfoPage="Network;Routes" +InfoPage="Network;IE Cookie" +InfoPage="Network;Browser History" +InfoPage="DirectX;DirectX Files" +InfoPage="DirectX;DirectX Video" +InfoPage="DirectX;DirectX Sound" +InfoPage="Devices;Windows Devices" +InfoPage="Devices;Physical Devices" +InfoPage="Devices;PCI Devices" +InfoPage="Devices;USB Devices" +InfoPage="Devices;Device Resources" +InfoPage="Devices;Input" +InfoPage="Devices;Printers" +InfoPage="Software;Auto Start" +InfoPage="Software;Scheduled" +InfoPage="Software;Installed Programs" +InfoPage="Software;Licenses" +InfoPage="Software;File Types" +InfoPage="Software;Desktop Gadgets" +InfoPage="Security;Windows Security" +InfoPage="Security;Windows Update" +InfoPage="Security;Anti-Virus" +InfoPage="Security;Firewall" +InfoPage="Security;Anti-Spyware" +InfoPage="Security;Anti-Trojan" +InfoPage="Config;Regional" +InfoPage="Config;Environment" +InfoPage="Config;Control Panel" +InfoPage="Config;Recycle Bin" +InfoPage="Config;System Files" +InfoPage="Config;System Folders" +InfoPage="Config;Event Logs" +InfoPage="Database;Database Software" +InfoPage="Database;BDE Drivers" +InfoPage="Database;ODBC Drivers" +InfoPage="Database;ODBC Data Sources" diff --git a/.bin/AIDA64/installed_programs.rpf b/.bin/AIDA64/installed_programs.rpf new file mode 100644 index 00000000..38a51d3d --- /dev/null +++ b/.bin/AIDA64/installed_programs.rpf @@ -0,0 +1 @@ +InfoPage="Software;Installed Programs" diff --git a/.bin/AIDA64/licenses.rpf b/.bin/AIDA64/licenses.rpf new file mode 100644 index 00000000..06d25244 --- /dev/null +++ b/.bin/AIDA64/licenses.rpf @@ -0,0 +1 @@ +InfoPage="Software;Licenses" diff --git a/.bin/NotepadPlusPlus/config.xml b/.bin/NotepadPlusPlus/config.xml new file mode 100644 index 00000000..f868807a --- /dev/null +++ b/.bin/NotepadPlusPlus/config.xml @@ -0,0 +1,56 @@ + + + + + + standard + hide + + vertical + hide + + no + yes + no + no + yes + yes + no + yes + + + + + yes + yes + 2 + + + + + + hide + + + + + + + + + + yes + + + + + + + + + + + + + + diff --git a/.bin/Scripts/Final Checklist.cmd b/.bin/Scripts/Final Checklist.cmd new file mode 100644 index 00000000..7adda3b8 --- /dev/null +++ b/.bin/Scripts/Final Checklist.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\.bin\Scripts\Launch.cmd" PSScript "%~dp0\.bin\Scripts" "checklist.ps1" /admin \ No newline at end of file diff --git a/.bin/Scripts/Get-FolderSize.ps1 b/.bin/Scripts/Get-FolderSize.ps1 new file mode 100644 index 00000000..85848a9e --- /dev/null +++ b/.bin/Scripts/Get-FolderSize.ps1 @@ -0,0 +1,75 @@ +#requires -version 2 +[CmdletBinding()] +param( + # Paths to report size, file count, dir count, etc. for. + [Parameter(Mandatory=$true,ValueFromPipeline=$true)] [string[]] $Path +) + +# Copyright (c) 2015, Svendsen Tech +# All rights reserved. +# Author: Joakim Svendsen + +begin { + if (-not (Get-Command -Name robocopy -ErrorAction SilentlyContinue)) { + throw "I need robocopy. Exiting." + } +} +# PS C:\temp> [datetime]::ParseExact("Mon Jan 26 00:05:19 2015", 'ddd MMM dd HH:mm:ss yyyy', [Globalization.CultureInfo]::InvariantCulture) + +# Attempt to change language to en-US for robocopy's output to be in english... +#$OldCulture = [System.Threading.Thread]::CurrentThread.CurrentCulture + +process { + foreach ($p in $Path) { + Write-Verbose -Message "Processing path: $p. $(Get-Date)" + if (-not (Test-Path -Path $p -PathType Container)) { + Write-Warning -Message "$p does not exist or is a file and not a directory. Skipping." + continue + } + $RoboCopyArgs = @("/L","/S","/NJH","/BYTES","/FP","/NC","/NDL","/TS","/XJ","/R:0","/W:0") + [datetime] $StartedTime = Get-Date + #[System.Threading.Thread]::CurrentThread.CurrentCulture = 'en-US' + [string] $Summary = robocopy $p NULL $RoboCopyArgs | Select-Object -Last 8 + #[System.Threading.Thread]::CurrentThread.CurrentCulture = $OldCulture + [regex] $HeaderRegex = '\s+Total\s+Copied\s+Skipped\s+Mismatch\s+FAILED\s+Extras' + [regex] $DirLineRegex = 'Dirs\s:\s+(?\d+)(?:\s+\d+){3}\s+(?\d+)\s+\d+' + [regex] $FileLineRegex = 'Files\s:\s+(?\d+)(?:\s+\d+){3}\s+(?\d+)\s+\d+' + [regex] $BytesLineRegex = 'Bytes\s:\s+(?\d+)(?:\s+\d+){3}\s+(?\d+)\s+\d+' + [regex] $TimeLineRegex = 'Times\s:\s+(?\d+).*' + [regex] $EndedLineRegex = 'Ended\s:\s+(?.+)' + if ($Summary -match "$HeaderRegex\s+$DirLineRegex\s+$FileLineRegex\s+$BytesLineRegex\s+$TimeLineRegex\s+$EndedLineRegex") { + $ErrorActionPreference = 'Stop' + try { + $EndedTime = [datetime]::ParseExact($Matches['EndedTime'], 'ddd MMM dd HH:mm:ss yyyy', [Globalization.CultureInfo]::InvariantCulture) + } + catch { + try { + $EndedTime = [datetime] $Matches['EndedTime'] + } + catch { + $EndedTime = $Matches['EndedTime'] + ' (string)' + } + } + $ErrorActionPreference = 'Continue' + New-Object PSObject -Property @{ + Path = $p + TotalBytes = [int64] $Matches['ByteCount'] + TotalMBytes = [math]::Round(([int64] $Matches['ByteCount'] / 1MB), 4) + TotalGBytes = [math]::Round(([int64] $Matches['ByteCount'] / 1GB), 4) + BytesFailed = [int64] $Matches['ByteFailed'] + DirCount = [int64] $Matches['DirCount'] + FileCount = [int64] $Matches['FileCount'] + DirFailed = [int64] $Matches['DirFailed'] + FileFailed = [int64] $Matches['FileFailed'] + StartedTime = $StartedTime + EndedTime = $EndedTime + + } | Select Path, TotalBytes, TotalMBytes, TotalGBytes, DirCount, FileCount, DirFailed, FileFailed, StartedTime, EndedTime + } + else { + Write-Warning -Message "$p's output from robocopy was not in an expected format." + } + } +} + +#[System.Threading.Thread]::CurrentThread.CurrentCulture = $OldCulture diff --git a/.bin/Scripts/Launch.cmd b/.bin/Scripts/Launch.cmd new file mode 100644 index 00000000..abe8b6c9 --- /dev/null +++ b/.bin/Scripts/Launch.cmd @@ -0,0 +1,109 @@ +@echo off + +:Init +setlocal EnableDelayedExpansion +color 1b +title WK Launcher + +:Flags +set admin= +set max= +set wait= +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) + if /i "%%f" == "/admin" (@set admin=true) + if /i "%%f" == "/max" (@set max=true) + if /i "%%f" == "/wait" (@set wait=true) +) + +:SetVariables +if /i "!PROCESSOR_ARCHITECTURE!" == "AMD64" set "arch=64" +set "con=%~dp0\..\..\ConEmu\ConEmu.exe" +if !arch! equ 64 set "con=%~dp0\..\..\ConEmu\ConEmu64.exe" + +:Launch +pushd %2 +if /i "%1" == "Console" (goto LaunchConsole) +if /i "%1" == "Office" (goto LaunchOfficeSetup) +if /i "%1" == "Program" (goto LaunchProgram) +if /i "%1" == "PSScript" (goto LaunchPSScript) +goto Usage + +:LaunchConsole +set "prog=%~3" +dir "!prog:.=64.!" >nul 2>&1 && if !arch! equ 64 set "prog=!prog:.=64.!" +if not exist "!prog!" goto ProgramNotFound +if defined admin ( + start "" "%con%" -cmd "!prog!" %~4 -new_console:a -new_console:n +) else ( + start "" "%con%" -cmd "!prog!" %~4 -new_console:n +) +goto Done + +:LaunchOfficeSetup +set "prog=%~3" +start "" "%con%" -cmd call "copy_office.cmd" "!prog!" -new_console:n +goto Done + +:LaunchProgram +set "prog=%~3" +dir "!prog:.=64.!" >nul 2>&1 && if !arch! equ 64 set "prog=!prog:.=64.!" +if not exist "!prog!" goto ProgramNotFound +if not "%~4" == "" (set "ps_args=-argumentlist '%~4'") +if defined admin ( + if defined max (set "max=-WindowStyle Maximized") + if defined wait (set "wait=-Wait") + powershell -command "& {start '!prog!' !ps_args! -verb runas !max! !wait!}" +) else ( + if defined max (set "max=/max") + if defined wait (set "wait=/wait") + start "" !max! !wait! "!prog!" %~4 +) +goto Done + +:LaunchPSScript +set "script=%~3" +if not exist "!script!" goto ScriptNotFound +if defined wait (set "wait=-Wait") +if defined admin ( + start "" "%con%" -cmd PowerShell -ExecutionPolicy Bypass -File "!script!" -NoProfile -new_console:a !wait! +) else ( + start "" "%con%" -cmd PowerShell -ExecutionPolicy Bypass -File "!script!" -NoProfile !wait! +) +goto Done + +:Usage +echo. +echo.Usage: Launch.cmd Console "Working Dir" "Program" "Args" [/admin] +echo. Launch.cmd Program "Working Dir" "Program" "Args" [/admin] [/max] [/wait] +echo. Launch.cmd PSScript "Working Dir" "Program" "" [/admin] [/wait] +echo. (Args should be empty when using PSScript) +echo. +goto Abort + +:ProgramNotFound +echo. +echo Program not found. +goto Abort + +:ScriptNotFound +echo. +echo Script not found. +goto Abort + +:Abort +color 4e +echo. +echo Aborted. +echo. +echo Press any key to exit... +pause>nul +goto Exit + +:Done +goto Exit + +:Exit +popd +color +endlocal \ No newline at end of file diff --git a/.bin/Scripts/SW Diagnostics.cmd b/.bin/Scripts/SW Diagnostics.cmd new file mode 100644 index 00000000..b2e5020e --- /dev/null +++ b/.bin/Scripts/SW Diagnostics.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\.bin\Scripts\Launch.cmd" PSScript "%~dp0\.bin\Scripts" "diagnostics.ps1" /admin \ No newline at end of file diff --git a/.bin/Scripts/activate.ps1 b/.bin/Scripts/activate.ps1 new file mode 100644 index 00000000..b29ff31a --- /dev/null +++ b/.bin/Scripts/activate.ps1 @@ -0,0 +1,69 @@ +# 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 + +# OS Check +. .\os_check.ps1 + +## Extract ProduKey +md "$bin\ProduKey" 2>&1 | out-null +start -wait "$bin\7-Zip\7z.exe" -argumentlist @("x", "$bin\ProduKey.7z", "-o$bin\ProduKey", "-aos", "-pGerbil14") -workingdirectory "$bin\7-Zip" -nonewwindow -redirectstandardoutput out-null +sleep -s 1 + +## Get Key ## +ri "$bin\ProduKey\*.cfg" +if ($arch -eq 64) { + $prog = "$bin\ProduKey\ProduKey64.exe" +} else { + $prog = "$bin\ProduKey\ProduKey.exe" +} +$produkey_args = @( + "/nosavereg", + "/scomma", "$logpath\keys.csv", + "/WindowsKeys", "1", + "/OfficeKeys", "0", + "/IEKeys", "0", + "/SQLKeys", "0", + "/ExchangeKeys", "0" +) +start -wait $prog -argumentlist $produkey_args -workingdirectory "$bin\ProduKey" +$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..." diff --git a/.bin/Scripts/check_battery.ps1 b/.bin/Scripts/check_battery.ps1 new file mode 100644 index 00000000..de265fe5 --- /dev/null +++ b/.bin/Scripts/check_battery.ps1 @@ -0,0 +1,29 @@ +param([string]$log = "Battery.log") +if ($log -match '^Battery.log$') { + $log = "{0}\Battery.log" -f (gci env:temp).value +} + +pushd $(Split-Path $MyInvocation.MyCommand.Path) +. .\init.ps1 + +try { + $designed_full = (get-wmiobject -class "BatteryStaticData" -namespace "ROOT\WMI").DesignedCapacity 2>out-null + $last_full = (get-wmiobject -class "BatteryFullChargedCapacity" -namespace "ROOT\WMI").FullChargedCapacity 2>out-null + $last_percentage = ($last_full / $designed_full) * 100 + $message = " Last full charge was {0:N0}% of designed capacity" -f $last_percentage + + if ($last_percentage -eq 100) { + wk-warn " Unable to determine battery health" "$log" + } elseif ($last_percentage -ge 90) { + wk-write $message "$log" + } elseif ($last_percentage -ge 50) { + wk-warn $message "$log" + } else { + wk-error $message "$log" + } +} catch { + wk-warn " No battery detected" "$log" +} + +## Done ## +popd diff --git a/.bin/Scripts/check_disk.cmd b/.bin/Scripts/check_disk.cmd new file mode 100644 index 00000000..2e4076c3 --- /dev/null +++ b/.bin/Scripts/check_disk.cmd @@ -0,0 +1,23 @@ +@echo off + +:Flags +set fix= +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) + if /i "%%f" == "/f" (set fix=/f) +) + +:Init +title WK CheckDisk +color 1b + +:ScheduleCheck +chkdsk %fix% %systemdrive% +if defined fix ( + echo Press any key to reboot... + pause>nul + shutdown -r -t 10 +) else ( + echo Press any ket to exit... + pause>nul +) \ No newline at end of file diff --git a/.bin/Scripts/check_disk.ps1 b/.bin/Scripts/check_disk.ps1 new file mode 100644 index 00000000..de5ba5e0 --- /dev/null +++ b/.bin/Scripts/check_disk.ps1 @@ -0,0 +1,17 @@ +# WK-Check Disk + +## Init ## +$wd = $(Split-Path $MyInvocation.MyCommand.Path) +pushd "$wd" +. .\init.ps1 +clear +$host.UI.RawUI.WindowTitle = "WK Check Disk Tool" + +## Schedule CHKDSK ## +write-host "$systemdrive (System Drive)" +start -wait "chkdsk" -argumentlist @("/f", "$systemdrive") -nonewwindow + +## Done ## +popd +pause "Press Enter to reboot..." +restart-computer diff --git a/.bin/Scripts/checklist.ps1 b/.bin/Scripts/checklist.ps1 new file mode 100644 index 00000000..462ac1be --- /dev/null +++ b/.bin/Scripts/checklist.ps1 @@ -0,0 +1,281 @@ +# WK-Checklist + +## Init ## +$wd = $(Split-Path $MyInvocation.MyCommand.Path) +pushd "$wd" +. .\init.ps1 +clear +$host.UI.RawUI.WindowTitle = "WK Checklist Tool" +$logpath = "$WKPath\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" + +# OS Check +. .\os_check.ps1 + +# 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" "$WKPath\Info\" + move-item "$systemdrive\AdwCleaner\*txt" "$WKPath\Info\" + if (test-path "$systemdrive\AdwCleaner\Quarantine") { + move-item "$systemdrive\AdwCleaner\Quarantine" "$WKPath\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" + rm -path hkcu:\Software\Sysinternals\AutoRuns -recurse 2>&1 | out-null + if ((gci -path hkcu:\Software\Sysinternals 2> out-null | Measure-Object).count -eq 0) { + rm -path hkcu:\Software\Sysinternals 2>&1 | out-null + } +} + +# Move ComboFix Logs +if (test-path "$systemdrive\ComboFix") { + wk-write "* Moving ComboFix leftovers" "$log" + wk-warn " TODO" "$log" +} + +# 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-write "* Uninstalling MBAM" "$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") { + if (test-path "$programfiles\SUPERAntiSpyware\Uninstall.exe") { + wk-write "* Uninstalling SUPERAntiSpyware" "$log" + start -wait "$programfiles\SUPERAntiSpyware\Uninstall.exe" + } else { + wk-error "SUPERAntiSpyware install is broken." "$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\aida-keys.txt")) { + 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" +} + +if (!(test-path "$logpath\aida-installed_programs.txt")) { + 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" +} + +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" +} + +# Product Keys +## Extract +md "$bin\ProduKey" 2>&1 | out-null +$sz_args = @( + "x", + ('"{0}\ProduKey.7z"' -f $bin), + ('-o"{0}\ProduKey"' -f $bin), + "-aos", + "-pAbracadabra") +start "$bin\7-Zip\7z.exe" -argumentlist $sz_args -wait -windowstyle minimized +sleep -s 1 + +## Run +if (!(test-path "$logpath\keys.txt")) { + wk-write "* Saving Product Keys" "$log" + ri "$bin\ProduKey\*.cfg" + if ($arch -eq 64) { + $prog = "$bin\ProduKey\ProduKey64.exe" + } else { + $prog = "$bin\ProduKey\ProduKey.exe" + } + start -wait $prog -argumentlist @("/nosavereg", "/stext", "$logpath\keys.txt") -workingdirectory "$bin\ProduKey" +} +wk-write "" "$log" + +# 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 = "$WKPath\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 "$WKPath\Tools\Misc\XMPlay.cmd" + +## Upload info ## +write-host "Uploading info to NAS..." + +# Write batch +$batch = "lcd `"{0}`"`r`n" -f $WKPath +$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\Wizard-Kit.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 +} diff --git a/.bin/Scripts/copy_office.cmd b/.bin/Scripts/copy_office.cmd new file mode 100644 index 00000000..0ba258b7 --- /dev/null +++ b/.bin/Scripts/copy_office.cmd @@ -0,0 +1,91 @@ +@echo off + +:Flags +set silent= +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Init +setlocal EnableDelayedExpansion +title WK Office Installer +color 1b +echo Initializing... +set "pd=%cd%" +set "NAS=\\10.0.0.10\Office" +set "dest=%systemdrive%\WK\Office" +set "source=%~1" +pushd !NAS! + +:VerifyCopyAndRun +if /i "!source!" == "" (goto UsageError) + +if /i "!source:~-3,3!" == "exe" ( + if not exist "!source!" goto OfficeNotFound + call :CopyFile "!source!" +) else if /i "!source:~-3,3!" == "msi" ( + if not exist "!source!" goto OfficeNotFound + call :CopyFile "!source!" +) else ( + if not exist "!source!\setup.exe" goto OfficeNotFound + call :CopyFolder "!source!" +) +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 +set "folder=%~1" +mkdir "!dest!\!folder!" > nul 2>&1 +robocopy /s /r:3 /w:0 "!folder!" "!dest!\!folder!" +:: Run Setup :: +if exist "!dest!\!folder!\configuration.xml" ( + pushd "!dest!\!folder!" + start "" "setup.exe" /configure + popd +) else ( + start "" "!dest!\!folder!\setup.exe" +) +goto :EOF + +:: Errors :: +:OfficeNotFound +echo ERROR: "!source!" not found. +goto Abort + +:UsageError +echo ERROR: Office version not specified. +echo. +echo USAGE: "%~nx0" "Path\To\Office\Setup" +goto Abort + +:Abort +color 4e +echo. +echo Aborted. +goto Exit + +:Done +set silent=true +echo. +echo Done. +goto Exit + +:Exit +rem if not defined silent ( +rem echo Press any key to exit... +rem pause>nul +rem ) +popd +color +endlocal + +:EOF diff --git a/.bin/Scripts/diagnostics.ps1 b/.bin/Scripts/diagnostics.ps1 new file mode 100644 index 00000000..9d62918b --- /dev/null +++ b/.bin/Scripts/diagnostics.ps1 @@ -0,0 +1,328 @@ +# WK-Checklist + +## Init ## +$wd = $(Split-Path $MyInvocation.MyCommand.Path) +pushd "$wd" +. .\init.ps1 +clear +$host.UI.RawUI.WindowTitle = "WK Diagnostics Tool" +$backup_path = "$WKPath\Backups\$username\$date" +$logpath = "$WKPath\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" + +# OS Check +. .\os_check.ps1 + +# 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 ## +# ProcessKiller +#!! DISABLED UNTIL FURTHER TESTING IS DONE !!# +# 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 "$bin\RKill\RKill.exe" -argumentlist @("-l", "$logpath\rkill.log") +if (!(ask "Did RKill run correctly?" "$log")) { + start -wait "$bin\RKill\explorer.exe" -argumentlist @("-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 "$WKPath\Tools\.bin\TDSSKiller.exe") { + md "$WKPath\Quarantine\TDSSKiller" 2>&1 | out-null + start -wait "$WKPath\Tools\.bin\TDSSKiller.exe" -argumentlist @("-l", "$logpath\TDSSKiller.log", "-qpath", "$WKPath\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" +if (!(test-connection "google.com" -count 2 -quiet)) { + wk-warn "System appears offline. Please connect to the internet." "$log" + pause + if (!(test-connection "google.com" -count 2 -quiet)) { + wk-error "System still appears offline; aborting script." "$log" + exit 1 + } +} + +## Misc Configuration ## +# Export current power plans +$pow_backup_path = "$WKPath\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" + +# 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 "$bin\7-Zip\7z.exe" -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 "$bin\7-Zip\7z.exe" -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 "$bin\7-Zip\7z.exe" -argumentlist $sz_args -wait -windowstyle minimized + popd +} + +# Remove temporary files +if (!(test-path "$logpath\bleachbit.log")) { + wk-write "* Removing temporary files" "$log" + start -wait "$bin\BleachBit\bleachbit_console.exe" -argumentlist @("-c", "--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" + md "HKCU:\Software\Sysinternals" 2>&1 | out-null + md "HKCU:\Software\Sysinternals\AutoRuns" 2>&1 | out-null + sp -path "HKCU:\Software\Sysinternals\AutoRuns" -name "checkvirustotal" -value 1 -type "DWord" | out-null + sp -path "HKCU:\Software\Sysinternals\AutoRuns" -name "EulaAccepted" -value 1 -type "DWord" | out-null + sp -path "HKCU:\Software\Sysinternals\AutoRuns" -name "shownomicrosoft" -value 1 -type "DWord" | out-null + sp -path "HKCU:\Software\Sysinternals\AutoRuns" -name "shownowindows" -value 1 -type "DWord" | out-null + sp -path "HKCU:\Software\Sysinternals\AutoRuns" -name "showonlyvirustotal" -value 1 -type "DWord" | out-null + sp -path "HKCU:\Software\Sysinternals\AutoRuns" -name "submitvirustotal" -value 0 -type "DWord" | out-null + sp -path "HKCU:\Software\Sysinternals\AutoRuns" -name "verifysignatures" -value 1 -type "DWord" | out-null + md "HKCU:\Software\Sysinternals\AutoRuns\SigCheck" 2>&1 | out-null + sp -path "HKCU:\Software\Sysinternals\AutoRuns\SigCheck" -name "EulaAccepted" -value 1 -type "DWord" | out-null + md "HKCU:\Software\Sysinternals\AutoRuns\Streams" 2>&1 | out-null + sp -path "HKCU:\Software\Sysinternals\AutoRuns\Streams" -name "EulaAccepted" -value 1 -type "DWord" | out-null + md "HKCU:\Software\Sysinternals\AutoRuns\VirusTotal" 2>&1 | out-null + sp -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\aida-keys.txt")) { + 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" +} + +if (!(test-path "$logpath\aida-installed_programs.txt")) { + 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" +} + +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" +} + +# Product Keys +## Extract +md "$bin\ProduKey" 2>&1 | out-null +$sz_args = @( + "x", + ('"{0}\ProduKey.7z"' -f $bin), + ('-o"{0}\ProduKey"' -f $bin), + "-aos", + "-pAbracadabra") +start "$bin\7-Zip\7z.exe" -argumentlist $sz_args -wait -windowstyle minimized +sleep -s 1 + +## Run +if (!(test-path "$logpath\keys.txt")) { + wk-write "* Saving Product Keys" "$log" + ri "$bin\ProduKey\*.cfg" + if ($arch -eq 64) { + $prog = "$bin\ProduKey\ProduKey64.exe" + } else { + $prog = "$bin\ProduKey\ProduKey.exe" + } + start -wait $prog -argumentlist @("/nosavereg", "/stext", "$logpath\keys.txt") -workingdirectory "$bin\ProduKey" +} + +## 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\aida-installed_programs.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.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 -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 "$WKPath\Tools\.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 $WKPath +$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\Wizard-Kit.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 +} diff --git a/.bin/Scripts/dism.ps1 b/.bin/Scripts/dism.ps1 new file mode 100644 index 00000000..c8f85bc6 --- /dev/null +++ b/.bin/Scripts/dism.ps1 @@ -0,0 +1,31 @@ +# WK-DISM wrapper + +## Init ## +$wd = $(Split-Path $MyInvocation.MyCommand.Path) +pushd "$wd" +. .\init.ps1 +clear +$host.UI.RawUI.WindowTitle = "WK DISM wrapper" +$logpath = "$WKPath\Info\$date" +md "$logpath" 2>&1 | out-null +$log = "$logpath\DISM.log" +$bin = (Get-Item $wd).Parent.FullName + +# OS Check +. .\os_check.ps1 +if ($win_version -le 7 -Or $win_version -imatch 'Vista') { + wk-error "This tool is not intended for $os_name." +} else { + # Get mode + $modes = @( + @{Name="Check Health"; Command="/CheckHealth"} + @{Name="Restore Health"; Command="/Online /Cleanup-Image /RestoreHealth"} + ) + $selection = (menu-select "WK DISM Wrapper" "Please select action to perform" $modes) + $command = "DISM {0}" -f $modes[$selection - 1].Command + sleep -s 1 + start "DISM" -argumentlist @("/Online", "/Cleanup-Image", "$command", "/LogPath:$log") -NoNewWindow -Wait -RunAs +} + +# Done +pause "Press any key to exit..." \ No newline at end of file diff --git a/.bin/Scripts/enter_safemode.ps1 b/.bin/Scripts/enter_safemode.ps1 new file mode 100644 index 00000000..e9ff35fb --- /dev/null +++ b/.bin/Scripts/enter_safemode.ps1 @@ -0,0 +1,28 @@ +# WK-Enter SafeMode + +## Init ## +$wd = $(Split-Path $MyInvocation.MyCommand.Path) +pushd "$wd" +. .\init.ps1 +clear +$host.UI.RawUI.WindowTitle = "WK SafeMode Tool" + +# Ask user +if (!(ask "Enable booting to SafeMode (with Networking)?")) { + # Abort + # TODO: test this + popd + exit 1 +} + +## Configure OS ## +# Edit BCD +start -wait "bcdedit" -argumentlist @("/set", "{default}", "safeboot", "network") -nonewwindow + +# Enable MSI access under safemode +# TODO + +## Done ## +popd +pause "Press Enter to reboot..." +restart-computer diff --git a/.bin/Scripts/exit_safemode.ps1 b/.bin/Scripts/exit_safemode.ps1 new file mode 100644 index 00000000..b585574f --- /dev/null +++ b/.bin/Scripts/exit_safemode.ps1 @@ -0,0 +1,29 @@ +# WK-Exit SafeMode + +## Init ## +$wd = $(Split-Path $MyInvocation.MyCommand.Path) +pushd "$wd" +. .\init.ps1 +clear +$host.UI.RawUI.WindowTitle = "WK SafeMode Tool" + +# Ask user +if (!(ask "Disable booting to SafeMode?")) { + # Abort + # TODO: test this + popd + exit 1 +} + +## Configure OS ## +# Edit BCD +start -wait "bcdedit" -argumentlist @("/deletevalue", "{current}", "safeboot") -nonewwindow +start -wait "bcdedit" -argumentlist @("/deletevalue", "{default}", "safeboot") -nonewwindow + +# Disable MSI access under safemode +# TODO + +## Done ## +popd +pause "Press Enter to reboot..." +restart-computer diff --git a/.bin/Scripts/free_space.ps1 b/.bin/Scripts/free_space.ps1 new file mode 100644 index 00000000..8d4e73c6 --- /dev/null +++ b/.bin/Scripts/free_space.ps1 @@ -0,0 +1,32 @@ +param([string]$log) + +cd $(Split-Path $MyInvocation.MyCommand.Path) +. .\init.ps1 + +foreach ($d in [char]'C'..[char]'Z') { + $letter = "$([char]$d):" + if (-not $(test-path "$letter\")) {continue} + $drive = $(fsutil volume diskfree $letter) -replace '^.*: ','' + if ($lastexitcode -ne 0) {continue} + $percent = ($drive[2] / $drive[1]) * 100 + foreach ($x in 0,1,2) { + $tmp = [int64]$drive[$x] + if ($tmp -ge 1tb) { + $tmp /= 1tb + $tmp = "{0:N2} Tb" -f $tmp + } elseif ($tmp -ge 1gb) { + $tmp /= 1gb + $tmp = "{0:N2} Gb" -f $tmp + } elseif ($tmp -ge 1mb) { + $tmp /= 1mb + $tmp = "{0:N2} Mb" -f $tmp + } elseif ($tmp -ge 1kb) { + $tmp /= 1kb + $tmp = "{0:N2} Kb" -f $tmp + } else { + $tmp = "$tmp bytes" + } + $drive[$x] = $tmp + } + wk-write $(" {0} {1:N0}% Free ({2} / {3})" -f $letter, $percent, $drive[2], $drive[1]) $log +} diff --git a/.bin/Scripts/init.ps1 b/.bin/Scripts/init.ps1 new file mode 100644 index 00000000..2c4098a4 --- /dev/null +++ b/.bin/Scripts/init.ps1 @@ -0,0 +1,132 @@ +# WK-Init +# +# Some common settings and functions + +$host.UI.RawUI.BackgroundColor = "black" +$host.UI.RawUI.ForegroundColor = "green" +$appdata = (gci env:appdata).value +$localappdata = (gci env:localappdata).value +$username = (gci env:username).value +$userprofile = (gci env:userprofile).value +$systemdrive = (gci env:systemdrive).value +$windir = (gci env:windir).value +$programdata = (gci env:programdata).value +$programfiles = (gci env:programfiles).value +$programfiles86 = $programfiles +if (test-path env:"programfiles(x86)") { + $programfiles86 = (gci env:"programfiles(x86)").value +} +$WKPath = "$systemdrive\WK" +$date = get-date -uformat "%Y-%m-%d" +$date_time = get-date -uformat "%Y-%m-%d_%H%M" +$logpath = "$WKPath\Info\$date" + +function ask { + param([string]$text = "Kotaero", [string]$log = "WK.log") + $answered = $false + $text += " [Y/N]" + while (!$answered) { + $answer = read-host $text + if ($answer -imatch '^(y|yes)$') { + $answer = $true + $answered = $true + } elseif ($answer -imatch '^(n|no)$') { + $answer = $false + $answered = $true + } + } + $text += ": $answer" + out-file -filepath $log -inputobject $text -append + return $answer +} +function wk-error { + param([string]$text = "ERROR", [string]$log = "WK.log") + write-host ($text) -foreground "red" + out-file -filepath $log -inputobject $text -append +} +function wk-warn { + param([string]$text = "WARNING", [string]$log = "WK.log") + write-host ($text) -foreground "yellow" + out-file -filepath $log -inputobject $text -append +} +function wk-write { + param([string]$text = "", [string]$log = "WK.log") + write-host ($text) + out-file -filepath $log -inputobject $text -append +} +function menu-select { + ## $MainItems should be an "AoH" object (with at least the key "Name" for each item) + ## NOTE: if the CRLF=$true; then a spacer is added before that entry. + ## Example: + ## $MainItems = @( + ## @{Name="Windows 10 Home"; ImageFile="Win10"; ImageName="Windows 10 Home"} + ## @{Name="Windows 10 Pro"; ImageFile="Win10"; ImageName="Windows 10 Pro"} + ##) + + ## $ActionItems should be an "AoH" object (with at least the keys "Name" and "Letter" for each item) + ## NOTE: if the CRLF=$true; then a spacer is added before that entry. + ## Example: + ## $ActionItems = @( + ## @{Name="Reboot"; Letter="R"} + ## @{Name="Shutdown"; Letter="S"} + ##) + + param( + [string]$Title = "## Untitled Menu ##", + [string]$Prompt = "Please make a selection", + $MainItems = @(), + $ActionItems = @() + ) + + # Bail early if no items given + if ($MainItems.length -eq 0 -and $ActionItems.length -eq 0) { + throw "MenuError: No items given." + } + + # Build menu + $menu_splash = "{0}`r`n`r`n" -f $title + $valid_answers = @() + + # Add main items to splash + if ($MainItems.length -gt 0) { + for ($i=0; $i -lt $MainItems.length; $i++) { + if ($MainItems[$i].CRLF) { + # Add spacer + $menu_splash += "`r`n" + } + $valid_answers += ($i + 1) + $menu_splash += "{0,2:N0}: {1}`r`n" -f ($i + 1), $MainItems[$i].Name + } + $menu_splash += "`r`n" + $menu_splash += "`r`n" + } + + # Add action items to splash + if ($ActionItems.length -gt 0) { + foreach ($_item in $ActionItems) { + if ($_item.CRLF) { + # Add spacer + $menu_splash += "`r`n" + } + $menu_splash += "{0}: {1}`r`n" -f $_item.Letter.ToUpper(), $_item.Name + $valid_answers += $_item.Letter.ToLower(), $_item.Letter.ToUpper() + } + $menu_splash += "`r`n" + } + + # Add prompt to splash + $menu_splash += "{0}`r`n" -f $prompt + + # Select + do { + clear + $answer = read-host -prompt $menu_splash + } until ($valid_answers -contains $answer) + + return $answer.ToUpper() +} +function pause { + param([string]$message = "Press Enter to continue... ") + write-host $message + $x = read-host +} diff --git a/.bin/Scripts/install_chocolatey.ps1 b/.bin/Scripts/install_chocolatey.ps1 new file mode 100644 index 00000000..1638f687 --- /dev/null +++ b/.bin/Scripts/install_chocolatey.ps1 @@ -0,0 +1,274 @@ +# ===================================================================== +# Copyright 2011 - Present RealDimensions Software, LLC, and the +# original authors/contributors from ChocolateyGallery +# at https://github.com/chocolatey/chocolatey.org +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ===================================================================== + +# Environment Variables, specified as $env:NAME in PowerShell.exe and %NAME% in cmd.exe. +# For explicit proxy, please set $env:chocolateyProxyLocation and optionally $env:chocolateyProxyUser and $env:chocolateyProxyPassword +# For an explicit version of Chocolatey, please set $env:chocolateyVersion = 'versionnumber' +# To target a different url for chocolatey.nupkg, please set $env:chocolateyDownloadUrl = 'full url to nupkg file' +# NOTE: $env:chocolateyDownloadUrl does not work with $env:chocolateyVersion. +# To use built-in compression (no 7zip download), please set $env:chocolateyUseWindowsCompression = 'true' + +$url = "https://chocolatey.org/api/v2/package/chocolatey/" +# introduced when there were performance issues - kept around in case we +# run into them again. +$url = "https://packages.chocolatey.org/chocolatey.0.9.9.12.nupkg" + +$chocolateyVersion = $env:chocolateyVersion +if (![string]::IsNullOrEmpty($chocolateyVersion)){ + Write-Output "Downloading specific version of Chocolatey: $chocolateyVersion" + $url = "https://chocolatey.org/api/v2/package/chocolatey/$chocolateyVersion" + # introduced when there were performance issues - kept around in case we + # run into them again. + #$url = "https://packages.chocolatey.org/chocolatey.$chocolateyVersion.nupkg" +} + +$chocolateyDownloadUrl = $env:chocolateyDownloadUrl +if (![string]::IsNullOrEmpty($chocolateyDownloadUrl)){ + Write-Output "Downloading Chocolatey from : $chocolateyDownloadUrl" + $url = "$chocolateyDownloadUrl" +} + +if ($env:TEMP -eq $null) { + $env:TEMP = Join-Path $env:SystemDrive 'temp' +} +$chocTempDir = Join-Path $env:TEMP "chocolatey" +$tempDir = Join-Path $chocTempDir "chocInstall" +if (![System.IO.Directory]::Exists($tempDir)) {[System.IO.Directory]::CreateDirectory($tempDir)} +$file = Join-Path $tempDir "chocolatey.zip" + +# PowerShell v2/3 caches the output stream. Then it throws errors due +# to the FileStream not being what is expected. Fixes "The OS handle's +# position is not what FileStream expected. Do not use a handle +# simultaneously in one FileStream and in Win32 code or another +# FileStream." +function Fix-PowerShellOutputRedirectionBug { + try{ + # http://www.leeholmes.com/blog/2008/07/30/workaround-the-os-handles-position-is-not-what-filestream-expected/ plus comments + $bindingFlags = [Reflection.BindingFlags] "Instance,NonPublic,GetField" + $objectRef = $host.GetType().GetField("externalHostRef", $bindingFlags).GetValue($host) + $bindingFlags = [Reflection.BindingFlags] "Instance,NonPublic,GetProperty" + $consoleHost = $objectRef.GetType().GetProperty("Value", $bindingFlags).GetValue($objectRef, @()) + [void] $consoleHost.GetType().GetProperty("IsStandardOutputRedirected", $bindingFlags).GetValue($consoleHost, @()) + $bindingFlags = [Reflection.BindingFlags] "Instance,NonPublic,GetField" + $field = $consoleHost.GetType().GetField("standardOutputWriter", $bindingFlags) + $field.SetValue($consoleHost, [Console]::Out) + [void] $consoleHost.GetType().GetProperty("IsStandardErrorRedirected", $bindingFlags).GetValue($consoleHost, @()) + $field2 = $consoleHost.GetType().GetField("standardErrorWriter", $bindingFlags) + $field2.SetValue($consoleHost, [Console]::Error) + } catch { + Write-Output "Unable to apply redirection fix." + } +} + +Fix-PowerShellOutputRedirectionBug + +function Download-File { +param ( + [string]$url, + [string]$file + ) + Write-Output "Downloading $url to $file" + $downloader = new-object System.Net.WebClient + + $defaultCreds = [System.Net.CredentialCache]::DefaultCredentials + if ($defaultCreds -ne $null) { + $downloader.Credentials = $defaultCreds + } + + # check if a proxy is required + $explicitProxy = $env:chocolateyProxyLocation + $explicitProxyUser = $env:chocolateyProxyUser + $explicitProxyPassword = $env:chocolateyProxyPassword + if ($explicitProxy -ne $null) { + # explicit proxy + $proxy = New-Object System.Net.WebProxy($explicitProxy, $true) + if ($explicitProxyPassword -ne $null) { + $passwd = ConvertTo-SecureString $explicitProxyPassword -AsPlainText -Force + $proxy.Credentials = New-Object System.Management.Automation.PSCredential ($explicitProxyUser, $passwd) + } + + Write-Output "Using explicit proxy server '$explicitProxy'." + $downloader.Proxy = $proxy + + } elseif (!$downloader.Proxy.IsBypassed($url)) + { + # system proxy (pass through) + $creds = $defaultCreds + if ($creds -eq $null) { + Write-Debug "Default credentials were null. Attempting backup method" + $cred = get-credential + $creds = $cred.GetNetworkCredential(); + } + $proxyaddress = $downloader.Proxy.GetProxy($url).Authority + Write-Output "Using system proxy server '$proxyaddress'." + $proxy = New-Object System.Net.WebProxy($proxyaddress) + $proxy.Credentials = $creds + $downloader.Proxy = $proxy + } + + $downloader.DownloadFile($url, $file) +} + +# Download the Chocolatey package +Download-File $url $file + +# Determine unzipping method +$unzipMethod = '7zip' +if (![string]::IsNullOrEmpty($env:chocolateyUseWindowsCompression)){ + Write-Output 'Using built in compression to unzip.' + $unzipMethod = 'builtin' +} + +if ($unzipMethod -eq '7zip') { + # download 7zip + Write-Output "Download 7Zip commandline tool" + $7zaExe = Join-Path $tempDir '7za.exe' + Download-File 'https://chocolatey.org/7za.exe' "$7zaExe" + + # unzip the package + Write-Output "Extracting $file to $tempDir..." + Start-Process "$7zaExe" -ArgumentList "x -o`"$tempDir`" -y `"$file`"" -Wait -NoNewWindow +} else { + # unzip the package + Write-Output "Extracting $file to $tempDir..." + $shellApplication = new-object -com shell.application + $zipPackage = $shellApplication.NameSpace($file) + $destinationFolder = $shellApplication.NameSpace($tempDir) + $destinationFolder.CopyHere($zipPackage.Items(),0x10) +} + +# Call chocolatey install +Write-Output "Installing chocolatey on this machine" +$toolsFolder = Join-Path $tempDir "tools" +$chocInstallPS1 = Join-Path $toolsFolder "chocolateyInstall.ps1" + +& $chocInstallPS1 + +Write-Output 'Ensuring chocolatey commands are on the path' +$chocInstallVariableName = "ChocolateyInstall" +$chocoPath = [Environment]::GetEnvironmentVariable($chocInstallVariableName) +if ($chocoPath -eq $null -or $chocoPath -eq '') { + $chocoPath = 'C:\ProgramData\Chocolatey' +} + +$chocoExePath = Join-Path $chocoPath 'bin' + +if ($($env:Path).ToLower().Contains($($chocoExePath).ToLower()) -eq $false) { + $env:Path = [Environment]::GetEnvironmentVariable('Path',[System.EnvironmentVariableTarget]::Machine); +} + +Write-Output 'Ensuring chocolatey.nupkg is in the lib folder' +$chocoPkgDir = Join-Path $chocoPath 'lib\chocolatey' +$nupkg = Join-Path $chocoPkgDir 'chocolatey.nupkg' +if (![System.IO.Directory]::Exists($chocoPkgDir)) { [System.IO.Directory]::CreateDirectory($chocoPkgDir); } +Copy-Item "$file" "$nupkg" -Force -ErrorAction SilentlyContinue + +# SIG # Begin signature block +# MIIRFgYJKoZIhvcNAQcCoIIRBzCCEQMCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCB1u9CoeJumiBN6 +# T5KLVU3S2QMowJinRBbLYjCIOpMpW6CCDjMwggO3MIICn6ADAgECAhAM5+DlF9hG +# /o/lYPwb8DA5MA0GCSqGSIb3DQEBBQUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK +# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV +# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBa +# Fw0zMTExMTAwMDAwMDBaMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy +# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNVBAMTG0RpZ2lD +# ZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC +# AQoCggEBAK0OFc7kQ4BcsYfzt2D5cRKlrtwmlIiq9M71IDkoWGAM+IDaqRWVMmE8 +# tbEohIqK3J8KDIMXeo+QrIrneVNcMYQq9g+YMjZ2zN7dPKii72r7IfJSYd+fINcf +# 4rHZ/hhk0hJbX/lYGDW8R82hNvlrf9SwOD7BG8OMM9nYLxj+KA+zp4PWw25EwGE1 +# lhb+WZyLdm3X8aJLDSv/C3LanmDQjpA1xnhVhyChz+VtCshJfDGYM2wi6YfQMlqi +# uhOCEe05F52ZOnKh5vqk2dUXMXWuhX0irj8BRob2KHnIsdrkVxfEfhwOsLSSplaz +# vbKX7aqn8LfFqD+VFtD/oZbrCF8Yd08CAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGG +# MA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFEXroq/0ksuCMS1Ri6enIZ3zbcgP +# MB8GA1UdIwQYMBaAFEXroq/0ksuCMS1Ri6enIZ3zbcgPMA0GCSqGSIb3DQEBBQUA +# A4IBAQCiDrzf4u3w43JzemSUv/dyZtgy5EJ1Yq6H6/LV2d5Ws5/MzhQouQ2XYFwS +# TFjk0z2DSUVYlzVpGqhH6lbGeasS2GeBhN9/CTyU5rgmLCC9PbMoifdf/yLil4Qf +# 6WXvh+DfwWdJs13rsgkq6ybteL59PyvztyY1bV+JAbZJW58BBZurPSXBzLZ/wvFv +# hsb6ZGjrgS2U60K3+owe3WLxvlBnt2y98/Efaww2BxZ/N3ypW2168RJGYIPXJwS+ +# S86XvsNnKmgR34DnDDNmvxMNFG7zfx9jEB76jRslbWyPpbdhAbHSoyahEHGdreLD +# +cOZUbcrBwjOLuZQsqf6CkUvovDyMIIFMDCCBBigAwIBAgIQBAkYG1/Vu2Z1U0O1 +# b5VQCDANBgkqhkiG9w0BAQsFADBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGln +# aUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtE +# aWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwHhcNMTMxMDIyMTIwMDAwWhcNMjgx +# MDIyMTIwMDAwWjByMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5j +# MRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMTEwLwYDVQQDEyhEaWdpQ2VydCBT +# SEEyIEFzc3VyZWQgSUQgQ29kZSBTaWduaW5nIENBMIIBIjANBgkqhkiG9w0BAQEF +# AAOCAQ8AMIIBCgKCAQEA+NOzHH8OEa9ndwfTCzFJGc/Q+0WZsTrbRPV/5aid2zLX +# cep2nQUut4/6kkPApfmJ1DcZ17aq8JyGpdglrA55KDp+6dFn08b7KSfH03sjlOSR +# I5aQd4L5oYQjZhJUM1B0sSgmuyRpwsJS8hRniolF1C2ho+mILCCVrhxKhwjfDPXi +# TWAYvqrEsq5wMWYzcT6scKKrzn/pfMuSoeU7MRzP6vIK5Fe7SrXpdOYr/mzLfnQ5 +# Ng2Q7+S1TqSp6moKq4TzrGdOtcT3jNEgJSPrCGQ+UpbB8g8S9MWOD8Gi6CxR93O8 +# vYWxYoNzQYIH5DiLanMg0A9kczyen6Yzqf0Z3yWT0QIDAQABo4IBzTCCAckwEgYD +# VR0TAQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8EBAMCAYYwEwYDVR0lBAwwCgYIKwYB +# BQUHAwMweQYIKwYBBQUHAQEEbTBrMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5k +# aWdpY2VydC5jb20wQwYIKwYBBQUHMAKGN2h0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0 +# LmNvbS9EaWdpQ2VydEFzc3VyZWRJRFJvb3RDQS5jcnQwgYEGA1UdHwR6MHgwOqA4 +# oDaGNGh0dHA6Ly9jcmw0LmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRFJv +# b3RDQS5jcmwwOqA4oDaGNGh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2Vy +# dEFzc3VyZWRJRFJvb3RDQS5jcmwwTwYDVR0gBEgwRjA4BgpghkgBhv1sAAIEMCow +# KAYIKwYBBQUHAgEWHGh0dHBzOi8vd3d3LmRpZ2ljZXJ0LmNvbS9DUFMwCgYIYIZI +# AYb9bAMwHQYDVR0OBBYEFFrEuXsqCqOl6nEDwGD5LfZldQ5YMB8GA1UdIwQYMBaA +# FEXroq/0ksuCMS1Ri6enIZ3zbcgPMA0GCSqGSIb3DQEBCwUAA4IBAQA+7A1aJLPz +# ItEVyCx8JSl2qB1dHC06GsTvMGHXfgtg/cM9D8Svi/3vKt8gVTew4fbRknUPUbRu +# pY5a4l4kgU4QpO4/cY5jDhNLrddfRHnzNhQGivecRk5c/5CxGwcOkRX7uq+1UcKN +# JK4kxscnKqEpKBo6cSgCPC6Ro8AlEeKcFEehemhor5unXCBc2XGxDI+7qPjFEmif +# z0DLQESlE/DmZAwlCEIysjaKJAL+L3J+HNdJRZboWR3p+nRka7LrZkPas7CM1ekN +# 3fYBIM6ZMWM9CBoYs4GbT8aTEAb8B4H6i9r5gkn3Ym6hU/oSlBiFLpKR6mhsRDKy +# ZqHnGKSaZFHvMIIFQDCCBCigAwIBAgIQB3Rm7aJnbzrskhfSMFNxEDANBgkqhkiG +# 9w0BAQsFADByMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkw +# FwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMTEwLwYDVQQDEyhEaWdpQ2VydCBTSEEy +# IEFzc3VyZWQgSUQgQ29kZSBTaWduaW5nIENBMB4XDTE2MDMyNDAwMDAwMFoXDTE3 +# MDMyODEyMDAwMFowfTELMAkGA1UEBhMCVVMxDzANBgNVBAgTBkthbnNhczEPMA0G +# A1UEBxMGVG9wZWthMSUwIwYDVQQKExxSZWFsRGltZW5zaW9ucyBTb2Z0d2FyZSwg +# TExDMSUwIwYDVQQDExxSZWFsRGltZW5zaW9ucyBTb2Z0d2FyZSwgTExDMIIBIjAN +# BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAudmEtlilKQbXZA8idxtEJuNr/lvs +# qq+w3nYlcyHgox6SjZJpsTvPpUvp54hQ46BRjtSRvxt2csFURZTNSyh3jzNXjjes +# E9B9YL4caTM8rgv0kVvcLzLU5bx543Uy1tOjnvbbxpEJEzPK288EQyGfaHXU/AcR +# 0jphnpawDfQsCn+tM4sPIyi2Z7gLmcEoJF+Su8LzrPL4qsnZZ7e891sopi/sI7nv +# OTKWu48oyH51KrLDdas+J3HvnvPQsUw9gG1oxsJ303E4Jo9xFEiUUIA0ZCfjv7Fc +# 0v1e+sWoy6D7yOGZQLDKXit6bS2Kr4lN2WjVMy0FhY7lqnN34Y21gxRedQIDAQAB +# o4IBxTCCAcEwHwYDVR0jBBgwFoAUWsS5eyoKo6XqcQPAYPkt9mV1DlgwHQYDVR0O +# BBYEFE9BoL8b8KzqjI10PMsO0A2oCFSeMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUE +# DDAKBggrBgEFBQcDAzB3BgNVHR8EcDBuMDWgM6Axhi9odHRwOi8vY3JsMy5kaWdp +# Y2VydC5jb20vc2hhMi1hc3N1cmVkLWNzLWcxLmNybDA1oDOgMYYvaHR0cDovL2Ny +# bDQuZGlnaWNlcnQuY29tL3NoYTItYXNzdXJlZC1jcy1nMS5jcmwwTAYDVR0gBEUw +# QzA3BglghkgBhv1sAwEwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNl +# cnQuY29tL0NQUzAIBgZngQwBBAEwgYQGCCsGAQUFBwEBBHgwdjAkBggrBgEFBQcw +# AYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tME4GCCsGAQUFBzAChkJodHRwOi8v +# Y2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRTSEEyQXNzdXJlZElEQ29kZVNp +# Z25pbmdDQS5jcnQwDAYDVR0TAQH/BAIwADANBgkqhkiG9w0BAQsFAAOCAQEAA+it +# pXXw8e4TmcVurJmJIleJcV2OG3sMRr/4IdoY1oC4kP7KK589nxw54v5Dn6oZ/P9y +# r2HeFd90KjKo5v6rEacI4/TQv0NgRrk4NGsd3v2fWSL3GAeMcfAkWxirHkfZYsYD +# ACWTAlshswAvxN11/gV9wesvDecwSCkWNTO8bm/izO81vSxjIV93ueiexlBe8yM0 +# O2ZGic38RW1bxM9vyjaDRogpgO2NG4jF6V/e99A24OGfgeElHuJOFjy0v94KAKvJ +# VTBbaKkob8r65mLY9oBY0Jh9wc0gkkWawBW1mAwoGuexauwOMaxdouu5BqJY83j/ +# v9+cLqDpa4IJ9hLidTGCAjkwggI1AgEBMIGGMHIxCzAJBgNVBAYTAlVTMRUwEwYD +# VQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAv +# BgNVBAMTKERpZ2lDZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EC +# EAd0Zu2iZ2867JIX0jBTcRAwDQYJYIZIAWUDBAIBBQCggYQwGAYKKwYBBAGCNwIB +# DDEKMAigAoAAoQKAADAZBgkqhkiG9w0BCQMxDAYKKwYBBAGCNwIBBDAcBgorBgEE +# AYI3AgELMQ4wDAYKKwYBBAGCNwIBFTAvBgkqhkiG9w0BCQQxIgQgxgsHvhO1r3cK +# aMYB5kpkjm9VV51g61KEGCwHFa8BYiYwDQYJKoZIhvcNAQEBBQAEggEATERxOw4a +# vuweIsLxyPcDSLLbfEain4zC6fiTeNw7yxKtY00g73PX3dCLitNaKv9TClb3w4N1 +# /oIYJ0QoXSiRdsKVXBkqQvTRFLwXe6tYE7Vq55pnHzJuUPlRSdEAS+d1GCHCxJZ0 +# KMZwzvaTZIo7NmhskhQtvGjdDUAfD6OVtr/cJe/vCP+i7TxofsmAvxhFxvHqSj+A +# nFRAcnozvtdO2p9KOAjMD6cocUaFI4vvC2yzbcucu7PgQ8n+xN/OglCuZgJoTc34 +# KpMU124X9yW5ohjgWqwEeI2pKWmz11AGQ/UkwdCdY+ahFJ2hV8sB2yLMvaZRc408 +# 6DFlNpDti+ZRWA== +# SIG # End signature block \ No newline at end of file diff --git a/.bin/Scripts/install_mbam.ps1 b/.bin/Scripts/install_mbam.ps1 new file mode 100644 index 00000000..a2101a07 --- /dev/null +++ b/.bin/Scripts/install_mbam.ps1 @@ -0,0 +1,45 @@ +# WK Install and run MBAM + +## Init ## +$wd = $(Split-Path $MyInvocation.MyCommand.Path) +pushd "$wd" +. .\init.ps1 +clear +$host.UI.RawUI.WindowTitle = "WK / Chocolatey Installer" +$logpath = "$WKPath\Info\$date" +md "$logpath" 2>&1 | out-null +$log = "$logpath\Chocolatey.log" + +## Install/Upgrade Chocolatey ## +$choco = "$programdata\chocolatey\choco.exe" +if (test-path "$choco") { + start "choco" -argumentlist @("upgrade", "chocolatey", "-y") -nonewwindow -wait +} else { + .\install_chocolatey.ps1 +} + +## Network Check ## +wk-write "* Testing Internet Connection" "$log" +if (!(test-connection "google.com" -count 2 -quiet)) { + wk-warn "System appears offline. Please connect to the internet." "$log" + pause + if (!(test-connection "google.com" -count 2 -quiet)) { + wk-error "System still appears offline; aborting script." "$log" + exit 1 + } +} + +## Install ## +start -wait "$programdata\chocolatey\choco.exe" -argumentlist @("upgrade", "-y", "malwarebytes") -nonewwindow + +## Launch MBAM ## +if (test-path "$programfiles\Malwarebytes Anti-Malware\mbam.exe") { + start "$programfiles\Malwarebytes Anti-Malware\mbam.exe" +} elseif (test-path "$programfiles86\Malwarebytes Anti-Malware\mbam.exe") { + start "$programfiles86\Malwarebytes Anti-Malware\mbam.exe" +} + +## Done ## +popd +pause "Press Enter to exit..." +exit \ No newline at end of file diff --git a/.bin/Scripts/install_programs.ps1 b/.bin/Scripts/install_programs.ps1 new file mode 100644 index 00000000..afb99b3d --- /dev/null +++ b/.bin/Scripts/install_programs.ps1 @@ -0,0 +1,245 @@ +# WK-Check Disk + +## Init ## +$wd = $(Split-Path $MyInvocation.MyCommand.Path) +pushd "$wd" +. .\init.ps1 +clear +$host.UI.RawUI.WindowTitle = "WK / Chocolatey Installer" +$logpath = "$WKPath\Info\$date" +md "$logpath" 2>&1 | out-null +$log = "$logpath\Chocolatey.log" + +# OS Check +. .\os_check.ps1 + +## Install/Upgrade Chocolatey ## +$choco = "$programdata\chocolatey\choco.exe" +if (test-path "$choco") { + start "choco" -argumentlist @("upgrade", "chocolatey", "-y") -nonewwindow -wait +} else { + .\install_chocolatey.ps1 +} + +## Sets ## +$sets = @( + @("browsers", "Browsers"), + @("compression", "Compression"), + @("cloud", "Cloud"), + @("office", "Office"), + + @("audio_video", "Audio / Video"), + @("imaging", "Imaging / Photography"), + @("gaming", "Gaming"), + + @("runtime", "Runtimes"), + @("security", "Security"), + + @("misc", "Misc") + ) +$set_audio_video = @( + @{ChocoName="itunes"; ChocoArgs=""; Default=$false; DisplayName="iTunes"} + @{ChocoName="mpv.install"; ChocoArgs="youtube-dl"; + Default=$true; DisplayName="mpv"} + @{ChocoName="spotify"; ChocoArgs=""; Default=$false; DisplayName="Spotify"} + @{ChocoName="vlc"; ChocoArgs=""; Default=$true; DisplayName="VLC"} +) +$set_browsers = @( + @{ChocoName="googlechrome"; ChocoArgs=""; Default=$true; DisplayName="Google Chrome"} + @{ChocoName="firefox"; ChocoArgs=""; Default=$true; DisplayName="Mozilla Firefox"} + @{ChocoName="opera"; ChocoArgs=""; Default=$false; DisplayName="Opera"} +) +$set_cloud = @( + @{ChocoName="dropbox"; ChocoArgs=""; Default=$false; DisplayName="Dropbox"} + @{ChocoName="evernote"; ChocoArgs=""; Default=$false; DisplayName="Evernote"} + @{ChocoName="googledrive"; ChocoArgs=""; Default=$false; DisplayName="Google Drive"} +) +$set_compression = @( + @{ChocoName="7zip.install"; ChocoArgs=""; Default=$true; DisplayName="7-Zip"} + @{ChocoName="peazip.install"; ChocoArgs=""; Default=$false; DisplayName="PeaZip"} + @{ChocoName="winrar"; ChocoArgs=""; Default=$false; DisplayName="WinRAR"} +) +$set_gaming = @( + @{ChocoName="battle.net"; ChocoArgs=""; Default=$false; DisplayName="Battle.net"} + @{ChocoName="minecraft"; ChocoArgs=""; Default=$false; DisplayName="Minecraft"} + @{ChocoName="origin"; ChocoArgs=""; Default=$false; DisplayName="Origin"} + @{ChocoName="steam"; ChocoArgs=""; Default=$false; DisplayName="Steam"} +) +$set_imaging = @( + @{ChocoName="gimp"; ChocoArgs=""; Default=$false; DisplayName="GIMP"} + @{ChocoName="greenshot"; ChocoArgs=""; Default=$false; DisplayName="Greenshot"} + @{ChocoName="inkscape"; ChocoArgs=""; Default=$false; DisplayName="Inkscape"} + @{ChocoName="picasa"; ChocoArgs=""; Default=$false; DisplayName="Picasa"} + @{ChocoName="xnview"; ChocoArgs=""; Default=$false; DisplayName="XnView"} + @{ChocoName="xnviewmp.install"; ChocoArgs=""; Default=$false; DisplayName="XnViewMP"} +) +$set_misc = @( + @{ChocoName="classic-shell"; ChocoArgs=@("-installArgs", "ADDLOCAL=ClassicStartMenu"); + Default=$true; DisplayName="Classic Start"} + @{CRLF=$true; ChocoName="googleearth"; ChocoArgs=""; Default=$false; DisplayName="Google Earth"} + @{CRLF=$true; ChocoName="keepass.install"; ChocoArgs=""; Default=$false; DisplayName="KeePass 2"} + @{ChocoName="lastpass"; ChocoArgs=""; Default=$false; DisplayName="LastPass"} + @{CRLF=$true; ChocoName="skype"; ChocoArgs=""; Default=$false; DisplayName="Skype"} +) +$set_office = @( + @{ChocoName="adobereader"; ChocoArgs="adobereader-update"; + Default=$true; DisplayName="Adobe Reader DC"} + @{CRLF=$true; ChocoName="libreoffice"; ChocoArgs="libreoffice-help"; + Default=$false; DisplayName="LibreOffice"} + @{ChocoName="openoffice"; ChocoArgs=""; Default=$false; DisplayName="OpenOffice"} + @{ChocoName="windowsessentials"; ChocoArgs=""; Default=$false; DisplayName="Windows Essentials 2012"} + @{CRLF=$true; ChocoName="thunderbird"; ChocoArgs=""; Default=$false; DisplayName="Thunderbird"} +) +$set_runtime = @( + @{ChocoName="adobeair"; ChocoArgs=""; Default=$true; DisplayName="Adobe Air"} + @{ChocoName="jre8"; ChocoArgs=""; Default=$true; DisplayName="Java Runtime Environment"} + @{ChocoName="silverlight"; ChocoArgs=""; Default=$true; DisplayName="Silverlight"} + @{ChocoName="dotnet3.5"; ChocoArgs=""; Default=$true; DisplayName=".NET 3.5"} + @{ChocoName="dotnet4.5.1"; ChocoArgs=""; Default=$true; DisplayName=".NET 4.5.1"} +) +$set_security = @( + @{ChocoName="avastfreeantivirus"; ChocoArgs=""; Default=$false; DisplayName="Avast! Anti-Virus (Free)"} + @{ChocoName="avgantivirusfree"; ChocoArgs=""; Default=$false; DisplayName="AVG Anti-Virus (Free)"} + @{ChocoName="avirafreeantivirus"; ChocoArgs=""; Default=$false; DisplayName="Avira Anti-Virus (Free)"} + @{ChocoName="kav"; ChocoArgs=""; Default=$false; DisplayName="Kaspersky Anti-Virus"} + @{ChocoName="malwarebytes"; ChocoArgs=""; Default=$false; DisplayName="Malwarebytes Anti-Malware"} + @{ChocoName="microsoftsecurityessentials"; ChocoArgs=""; Default=$true; DisplayName="Microsoft Security Essentials"} +) + +# Disable entries +if ($win_version -imatch '^(Vista|7)$') { + $set_misc = $set_misc | where {$_.DisplayName -inotmatch '(Classic Start)'} +} +if ($win_version -imatch '^(8|10)$') { + $set_imaging = $set_imaging | where {$_.DisplayName -inotmatch '(XnView)'} + $set_security = $set_security | where {$_.DisplayName -inotmatch '(Microsoft Security Essentials)'} +} + +## Actions ## +$actions = @( + @{Name="Select All"; Letter="A"} + @{Name="Select Defaults"; Letter="D"} + @{Name="Select None"; Letter="N"} + @{Name="Accept Selection & Proceed"; Letter="P"; CRLF=$true} + @{Name="Quit"; Letter="Q"} +) + +function selection-loop { + param([string]$name, $set) + + $selection = $null + $proceed = $true + do { + # Update set + foreach ($item in $set) { + # Set default selection + if (! $item.ContainsKey('Selected')) { + $item.Selected = $item.Default + } + + # Update name with selection indicator + if ($item.Selected) { + $item.Name = "* {0}" -f $item.DisplayName + } else { + $item.Name = " {0}" -f $item.DisplayName + } + } + + # Get user input + $selection = (menu-select $name "Please select which programs to install" $set $actions) + + # Perform action + if ($selection -imatch '^[A]$') { + # Select all + foreach ($item in $set) { + $item.Selected = $true + } + } elseif ($selection -imatch '^[D]$') { + # Select defaults + foreach ($item in $set) { + $item.Selected = $item.Default + } + } elseif ($selection -imatch '^[N]$') { + # Select none + foreach ($item in $set) { + $item.Selected = $false + } + } elseif ($selection -imatch '^[Q]$') { + $proceed = $false + } elseif ($selection -imatch '^\d+$') { + # Toggle selection + $selection -= 1 + $set[$selection].Selected = !($set[$selection].Selected) + } + } until ($selection -imatch '^[PQ]$') + + # Done + if ($proceed) { + return $set + } else { + throw + } +} + +## Network Check ## +wk-write "* Testing Internet Connection" "$log" +if (!(test-connection "google.com" -count 2 -quiet)) { + wk-warn "System appears offline. Please connect to the internet." "$log" + pause + if (!(test-connection "google.com" -count 2 -quiet)) { + wk-error "System still appears offline; aborting script." "$log" + exit 1 + } +} + +## Get selections ## +clear +if (ask ("Install default selections for Windows {0}?" -f $win_version)) { + wk-write "Default Install" "$log" + wk-write "" "$log" + # Select defaults + foreach ($s in $sets) { + $set = get-variable -name ("set_{0}" -f $s[0]) -valueonly + + foreach ($prog in $set) { + $prog.Selected = $prog.Default + } + } + +} else { + clear + wk-write "Prepping Custom Install..." "$log" + sleep -s 2 + + try { + foreach ($s in $sets) { + $set = get-variable -name ("set_{0}" -f $s[0]) -valueonly + $set = (selection-loop $s[1] $set.Clone()) + } + } catch { + wk-error "Installation Aborted" "$log" + popd + pause "Press Enter to exit..." + exit + } +} + +## Install ## +foreach ($s in $sets | sort) { + # wk-write ("Set: {0}" -f $s) "$log" + $set = get-variable -name ("set_{0}" -f $s[0]) -valueonly + + foreach ($prog in $set | where {$_.Selected}) { + wk-write ("Installing: {0}" -f $prog.DisplayName) "$log" + if ($prog.ChocoArgs) { + $prog.ChocoArgs = @("upgrade", "-y", $prog.ChocoName) + $prog.ChocoArgs + start -wait "$programdata\chocolatey\choco.exe" -argumentlist $prog.ChocoArgs -nonewwindow + } else { + start -wait "$programdata\chocolatey\choco.exe" -argumentlist @("upgrade", "-y", $prog.ChocoName) -nonewwindow + } + } +} + +## Done ## +popd +pause "Press Enter to exit..." \ No newline at end of file diff --git a/.bin/Scripts/installed_ram.ps1 b/.bin/Scripts/installed_ram.ps1 new file mode 100644 index 00000000..5567803a --- /dev/null +++ b/.bin/Scripts/installed_ram.ps1 @@ -0,0 +1,42 @@ +param([string]$log) + +cd $(Split-Path $MyInvocation.MyCommand.Path) +. .\init.ps1 + +$ram_speeds = @{ + "100" = "DDR-200 (PC-1600)"; + "133" = "DDR-266 (PC-2100)"; + "134" = "DDR-266 (PC-2100)"; + "166" = "DDR-333 (PC-2700)"; + "167" = "DDR-333 (PC-2700)"; + "200" = "[DDR|DDR2]-400 ([PC|PC2]-3200)"; + "266" = "DDR2-533 (PC2-4200)"; + "267" = "DDR2-533 (PC2-4200)"; + "333" = "DDR2-667 (PC2-5300)"; + "334" = "DDR2-667 (PC2-5300)"; + "400" = "[DDR2|DDR3]-800 ([PC2|PC3]-6400)"; + "533" = "[DDR2|DDR3]-1066 ([PC2|PC3]-8500)"; + "534" = "[DDR2|DDR3]-1066 ([PC2|PC3]-8500)"; + "666" = "DDR3-1333 (PC3-10600)"; + "667" = "DDR3-1333 (PC3-10600)"; + "800" = "[DDR3|DDR4]-1600 (PC3-12800 / PC4-1600)"; + "933" = "[DDR3|DDR4]-1866 (PC3-14900 / PC4-1866)"; + "934" = "[DDR3|DDR4]-1866 (PC3-14900 / PC4-1866)"; + "1066" = "[DDR3|DDR4]-2133 (PC3-17000 / PC4-2133)"; + "1067" = "[DDR3|DDR4]-2133 (PC3-17000 / PC4-2133)"; + "1200" = "DDR4-2400 (PC4-2400)"; +} + +$cs = Get-WmiObject -Class Win32_ComputerSystem +$mem = Get-WmiObject -Class Win32_PhysicalMemory +$total = 0 +foreach ($dev in $mem) { + $_size = $dev.Capacity/1gb + $_loc = $dev.DeviceLocator + $_type = $ram_speeds."$($dev.Speed)" + wk-write $(" {0:N2} Gb ({1}) {2}" -f $_size,$_loc,$_type) "$log" + $total += $dev.Capacity +} +wk-write " -------" "$log" +wk-write $(" {0:N2} Gb Usable" -f $($cs.TotalPhysicalMemory/1gb)) "$log" +wk-write $(" {0:N2} Gb Installed" -f $($total/1gb)) "$log" diff --git a/.bin/Scripts/os_check.ps1 b/.bin/Scripts/os_check.ps1 new file mode 100644 index 00000000..0d4dbca3 --- /dev/null +++ b/.bin/Scripts/os_check.ps1 @@ -0,0 +1,58 @@ +# WK-OS Check +# +# Set some OS specific variables. + +$win_info = gp hklm:"\SOFTWARE\Microsoft\Windows NT\CurrentVersion" +if ($win_info.CurrentVersion -match "6.0") { + $win_version = "Vista" +} elseif ($win_info.CurrentVersion -match "6.1") { + $win_version = "7" +} elseif ($win_info.CurrentVersion -match "6.2") { + $win_version = "8" +} elseif ($win_info.CurrentVersion -match "6.3") { + if ($win_info.CurrentBuildNumber -match "9200") { + $win_version = "8" + } elseif ($win_info.CurrentBuildNumber -match "9600") { + $win_version = "8" + } elseif ($win_info.CurrentBuildNumber -match "10240") { + $win_version = "10" + } elseif ($win_info.CurrentBuildNumber -match "10586") { + $win_version = "10" + } +} +$arch = (gci env:processor_architecture).value +$arch = $arch -ireplace 'x86', '32' +$arch = $arch -ireplace 'AMD64', '64' + +#$win_info.CurrentBuild +# == 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 == +# 6.3.10240 +# === 10 v1511 == +# 6.3.10586 + +$os_name = $win_info.ProductName +$os_name += " " + $win_info.CSDVersion +$os_name = $os_name -replace 'Service Pack ', 'SP' +if ($win_info.CurrentBuild -match "9600") { + $os_name += " Update" +} elseif ($win_info.CurrentBuild -match "10586") { + $os_name += " Release 1511" +} + +# Get activation status +$slmgr = (gci env:windir).value + "\System32\slmgr.vbs" +$win_act = (cscript /nologo $slmgr /xpr) -imatch '^\s' diff --git a/.bin/Scripts/reset_browsers.ps1 b/.bin/Scripts/reset_browsers.ps1 new file mode 100644 index 00000000..b52c8844 --- /dev/null +++ b/.bin/Scripts/reset_browsers.ps1 @@ -0,0 +1,386 @@ +# WK-BrowserReset + +## Init ## +$wd = $(Split-Path $MyInvocation.MyCommand.Path) +pushd "$wd" +. .\init.ps1 +clear +$host.UI.RawUI.WindowTitle = "WK Browser Reset Tool" +$backup_path = "$WKPath\Backups\$username\$date" +$logpath = "$WKPath\Info\$date" +md "$backup_path" 2>&1 | out-null +md "$logpath" 2>&1 | out-null +$log = "$logpath\Browsers.log" +$bin = (Get-Item $wd).Parent.FullName + +# Vars +$ff_appdata = "$appdata\Mozilla\Firefox" +$ff_clean = $false +$ff_exe = "$programfiles86\Mozilla Firefox\firefox.exe" +if (test-path "$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 = $ff_profile_list -inotmatch '\.wkbak$' +$chrome_appdata = "$localappdata\Google\Chrome" +$chrome_clean = $false +$chrome_exe = "$programfiles86\Google\Chrome\Application\chrome.exe" +$chrome_profile_list = @(gci "$chrome_appdata\User Data" 2> $null | ?{ $_.PSIsContainer }) +$chrome_profile_list = $chrome_profile_list -inotmatch '\.wkbak$' -imatch '^(Default|Profile)' + +# OS Check +. .\os_check.ps1 + +# Functions +function gen-backup-name { + param ([String]$name) + + # Add .wkbak to name + $newname = "$name.wkbak" + + # Check if the new name exists + if (test-path "$newname") { + # Change name to avoid overwriting any backups + $x = 2 + $newname = "$name.wkbak$x" + while (test-path "$newname") { + $x += 1 + $newname = "$name.wkbak$x" + } + } + + return $newname +} +function ff-create-default-profile { + wk-write " Creating new default profile" "$log" + # Check for existing profiles + if ($ff_profile_list.length -gt 0) { + wk-error " Firefox profile folders found. Possibly corrupt?" "$log" + return $false + } + + # Backup profiles.ini if necessary + ## NOTE: While you can use the profiles.ini to recreate the default profile, + ## it is better to create a new ini to better ensure the profile dir + ## will be in "$ff_appdata\Profiles\" + if (test-path "$ff_appdata\profiles.ini") { + mv "$ff_appdata\profiles.ini" (gen-backup-name "$ff_appdata\profiles.ini") + } + + # Create default profile + if (test-path "$ff_exe") { + $ff_args = @( + "-createprofile", + "default") + start -wait "$ff_exe" -argumentlist $ff_args -windowstyle minimized + } else { + wk-error " firefox.exe not found. Please verify installation." "$log" + return $false + } + return $true +} + + +## Internet Explorer ## +wk-write "==== Internet Explorer ====" "$log" + +# Cleanup +if (test-path ".bin\Bleachbit") { + wk-write " Removing temporary files" "$log" + 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 + popd +} + +# Backup Favorites +if (test-path "$userprofile\Favorites") { + wk-write " Backing up Favorites" "$log" + pushd "$userprofile" + $sz_args = @( + "a", + "-t7z", + "-mx=1", + "$backup_path\IE Favorites.7z", + "Favorites") + start "$bin\7-Zip\7z.exe" -argumentlist $sz_args -wait -windowstyle minimized + popd +} + +# Get IE settings +$reset_homepage = $true +$ie_settings = gp -path hkcu:"Software\Microsoft\Internet Explorer\Main" + +# Reset IE settings (argmuentlist is case sensitive) +if (ask " Reset to default settings?" "$log") { + start -wait rundll32.exe -argumentlist 'inetcpl.cpl,ResetIEtoDefaults' +} + +# Get homepage(s) +$_current_homepage = $ie_settings."Start Page" +if ($_current_homepage -ne $null -and $_current_homepage.Length -ne 0) { + $_secondary_homepages = @($ie_settings."Secondary Start Pages") + wk-write " Current homepage: $_current_homepage" "$log" + foreach ($p in $_secondary_homepages) { + if ($p -ne $null -and $p.Length -ne 0) { + wk-write " $p" "$log" + } + } + if ($_current_homepage -inotmatch '^https://www\.google\.com/$' -or $_secondary_homepages -imatch '^.+') { + $reset_homepage = (ask " Replace current homepage with google.com?" "$log") + } +} + +# Set homepage(s) +wk-write " Setting homepage" "$log" +if ($reset_homepage) { + 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 +} else { + sp -path hkcu:"Software\Microsoft\Internet Explorer\Main" -name "Start Page" -Value $_current_homepage 2>&1 | out-null + new-itemproperty -path hkcu:"Software\Microsoft\Internet Explorer\Main" -name "Secondary Start Pages" -propertytype MultiString -value $_secondary_homepages 2>&1 | out-null +} + +# Additional settings +if (test-path "$programfiles86\Internet Explorer\iexplore.exe") { + if (ask " Install Google search add-on?" "$log") { + start -wait "$programfiles86\Internet Explorer\iexplore.exe" -argumentlist "http://www.iegallery.com/en-us/Addons/Details/813" + } + #if (ask " Install AdBlock Plus?" "$log") { + # start -wait "$programfiles86\Internet Explorer\iexplore.exe" -argumentlist "https://adblockplus.org" + #} +} else { + wk-error " $programfiles86\Internet Explorer\iexplore.exe not found" "$log" +} +wk-write "" "$log" +pause + + +## Mozilla Firefox ## +wk-write "==== Mozilla Firefox ====" "$log" +$ff_errors = 0 + +# Reduce size of AppData folder +if (test-path ".bin\Bleachbit") { + wk-write " Removing temporary files" "$log" + 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 + popd +} + +# Backup AppData +if (test-path "$ff_appdata") { + wk-write " Backing up AppData" "$log" + pushd "$ff_appdata" + $sz_args = @( + "a", + "-t7z", + "-mx=1", + "$backup_path\Firefox.7z", + "Profiles", + "profiles.ini") + start "$bin\7-Zip\7z.exe" -argumentlist $sz_args -wait -windowstyle minimized + popd +} + +# Create default profile if necessary +if ($ff_profile_list.length -eq 0) { + if (ff-create-default-profile) { + # Update profile list to catch newly created profiles + sleep -s 1 + $ff_profile_list = @(gci "$ff_appdata\Profiles" 2> $null | ?{ $_.PSIsContainer }) + $ff_profile_list = $ff_profile_list -inotmatch '\.wkbak\d*$' + if ($ff_profile_list.length -eq 0) { + wk-warn " Failed to create default profile." "$log" + $ff_errors += 1 + } else { + # Configure new profile + $ff_clean = $true + } + } else { + wk-error " Failed to create default profile." "$log" + $ff_errors += 1 + } +} else { + wk-write " Profiles found: $($ff_profile_list.length)" "$log" + $ff_clean = (ask " Reset profile(s) to safe settings?" "$log") +} + +# Reset profile(s) to safe defaults +if ($ff_clean -and $ff_errors -eq 0) { + pushd "$ff_appdata\Profiles" + foreach ($ff_profile in $ff_profile_list) { + wk-write " Resetting profile: $ff_profile" "$log" + + # Backup old settings and only preserve essential settings + $ff_profile_bak = (gen-backup-name "$ff_profile") + mv "$ff_profile" "$ff_profile_bak" + md "$ff_profile" 2>&1 | out-null + + # Add "search.json" to $robocopy_args preserve added search engines + $robocopy_args = @( + "/r:3", + "/w:1", + "$ff_profile_bak", + "$ff_profile", + "cookies.sqlite", + "formhistory.sqlite", + "key3.db", + "logins.json", + "persdict.dat", + "places.sqlite") + start "robocopy" -argumentlist $robocopy_args -wait -windowstyle minimized + + # Add "searchplugins" below to preserve added search engines + foreach ($subdir in @("bookmarkbackups")) { + if (test-path "$ff_profile_bak\$subdir") { + md "$ff_profile\$subdir" 2>&1 | out-null + $robocopy_args = @( + "/e", + "/r:3", + "/w:1", + "$ff_profile_bak\$subdir", + "$ff_profile\$subdir") + start "robocopy" -argumentlist $robocopy_args -wait -windowstyle minimized + } + } + + # Set homepage and search settings + 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.defaultenginename", "Google");' -append + out-file -encoding 'ascii' -filepath "$ff_profile\prefs.js" -inputobject 'user_pref("browser.search.defaultenginename.US", "Google");' -append + $homepage = "https://www.google.com/" + if (test-path "$ff_profile_bak\prefs.js") { + $_prefs = gc "$ff_profile_bak\prefs.js" + if ($_prefs -imatch '"browser.startup.homepage"') { + $_current_homepage = $_prefs -imatch '"browser.startup.homepage"' + $_current_homepage = $_current_homepage -ireplace 'user_pref\("browser.startup.homepage", "(.*)"\);', '$1' + $_header = " Current homepage:" + foreach ($url in @("$_current_homepage".split("|"))) { + wk-write "$_header $_current_homepage" "$log" + $_header = " " + } + if ($_current_homepage -inotmatch '^https://www\.google\.com/$') { + if (!(ask " Replace current homepage with google.com?" "$log")) { + $homepage = $_cur_home + } + } + } + } + $homepage = 'user_pref("browser.startup.homepage", "' + $homepage + '");' + out-file -encoding 'ascii' -filepath "$ff_profile\prefs.js" -inputobject $homepage -append + wk-write "" "$log" + } + popd +} + +# Install uBlock Origin +if (test-path "$ff_exe") { + if ($ff_errors -eq 0 -and (ask " Install uBlock Origin?" "$log")) { + start -wait "$ff_exe" -argumentlist "https://addons.mozilla.org/en-us/firefox/addon/ublock-origin/" + } +} else { + wk-error " firefox.exe not found. Please verify installation." "$log" +} + +wk-write "" "$log" +pause + + +## Google Chrome ## +wk-write "==== Google Chrome ====" "$log" +$chrome_errors = 0 + +# Reduce size of AppData folder +if (test-path ".bin\Bleachbit") { + wk-write " Removing temporary files" "$log" + 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 + popd +} + +# Backup AppData +if (test-path "$chrome_appdata") { + wk-write " Backing up AppData" "$log" + pushd "$chrome_appdata" + $sz_args = @( + "a", + "-t7z", + "-mx=1", + "$backup_path\Chrome.7z", + '"User Data"') + start "$bin\7-Zip\7z.exe" -argumentlist $sz_args -wait -windowstyle minimized + popd +} + +# Check for profiles +if ($chrome_profile_list.length -gt 0) { + wk-write " Profiles found: $($chrome_profile_list.length)" "$log" + $chrome_clean = (ask " Reset profile(s) to safe settings?" "$log") +} else { + wk-warn " No profiles found" "$log" +} + +# Reset profile(s) to safe defaults +if ($chrome_clean -and $chrome_errors -eq 0) { + pushd "$chrome_appdata\User Data" + foreach ($chrome_profile in $chrome_profile_list) { + wk-write " Cleaning profile: $chrome_profile" "$log" + $chrome_profile_bak = (gen-backup-name "$chrome_profile") + mv "$chrome_profile" "$chrome_profile_bak" + md "$chrome_profile" 2>&1 | out-null + $robocopy_args = @( + "/r:3", + "/w:1", + "$chrome_profile_bak", + "$chrome_profile", + "Bookmarks", + "Cookies", + "Favicons", + '"Google Profile*"', + "History", + '"Login Data"', + '"Top Sites"', + "TransportSecurity", + '"Visited Links"', + '"Web Data"') + start "robocopy" -argumentlist $robocopy_args -wait -windowstyle minimized + wk-write "" "$log" + } + popd +} + +# Test for single-user installation +if (test-path "$chrome_appdata\Application\chrome.exe") { + if (test-path "$chrome_exe") { + wk-warn " Single-user and multi-user installations present. Please reinstall Chrome." "$log" + } else { + $chrome_exe = "$chrome_appdata\Application\chrome.exe" + } +} + +if (test-path "$chrome_exe") { + # Set Chrome as default browser + start -wait "$chrome_exe" -argumentlist "--make-default-browser" + + # Install uBlock Origin + if ($chrome_errors -eq 0 -and (ask " Install uBlock Origin?" "$log")) { + start -wait "$chrome_exe" -argumentlist "https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm?hl=en" + } +} else { + wk-error " chrome.exe not found. Please verify installation." "$log" +} +wk-write "" "$log" + + +## 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 +} diff --git a/.bin/Scripts/transferred_keys.cmd b/.bin/Scripts/transferred_keys.cmd new file mode 100644 index 00000000..d2c63394 --- /dev/null +++ b/.bin/Scripts/transferred_keys.cmd @@ -0,0 +1,108 @@ +@echo off + +rem This script assumes it is running as admin, as such it is not meant to be run directly. + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Init +setlocal EnableDelayedExpansion +color 1b +title WK Key Finder + +:ClearConfigs +if exist "ProduKey\ProduKey.cfg" del "ProduKey\ProduKey.cfg" +if exist "ProduKey\ProduKey64.cfg" del "ProduKey\ProduKey64.cfg" + +:WKInfo +rem Create WK\Info\YYYY-MM-DD and set path as !log_dir! +call "wk_info.cmd" + +:FindHives +echo Scanning for transferred software hive(s)... +set "found_hive=" +rem Transferred (Main) +set "sw_hive=%systemdrive%\WK\Transfer\Software" +if exist "!sw_hive!" ( + set "found_hive=true" + echo. !sw_hive! + echo ==== !sw_hive! ====>> "!log_dir!\transferred_keys.txt" + call "Launch.cmd" Program "!cd!\..\ProduKey" "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\Software" +if exist "!sw_hive!" ( + set "found_hive=true" + echo. !sw_hive! + echo ==== !sw_hive! ====>> "!log_dir!\transferred_keys.txt" + call "Launch.cmd" Program "!cd!\..\ProduKey" "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 "!cd!\..\ProduKey" "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 "!cd!\..\ProduKey" "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 "!cd!\..\ProduKey" "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 "!cd!\..\ProduKey" "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 +if not defined found_hive (goto NoResults) +call "Launch.cmd" Program "!cd!\..\Notepad2" "Notepad2-Mod.exe" "!log_dir!\transferred_keys.txt" +goto Done + +:NoResults +echo. +echo No keys found. +goto Error + +:Error +color 4e +echo. +echo Press any key to exit... +pause>nul +goto Exit + +:Done +goto Exit + +:Exit +rem pause +popd +color +endlocal \ No newline at end of file diff --git a/.bin/Scripts/update-tools b/.bin/Scripts/update-tools new file mode 100644 index 00000000..9b8a9615 --- /dev/null +++ b/.bin/Scripts/update-tools @@ -0,0 +1,118 @@ +#!/usr/bin/env python3 +# +## WK Tool Updater + +import os +import re +import requests +import shutil +import zipfile +from bs4 import BeautifulSoup + +def download_file(path, name, url): + print("Downloading {}...".format(name)) + if url is not None: + r = requests.get(url, stream=True) + # If request succeeds then download + if r.status_code == 200: + os.makedirs(path, exist_ok=True) + filename = '{}/{}'.format(path, name) + with open(filename, 'wb') as f: + shutil.copyfileobj(r.raw, f) + else: + print(" Error downloading: {}".format(name)) + +def find_dynamic_url(dl_page, regex): + r = requests.get(dl_page) + soup = BeautifulSoup(r.content) + url = None + for link in soup.find_all('a'): + if re.search(regex, link.get('href'), re.IGNORECASE): + url = link.get('href') + break + return url + +## Chdir to parent folder of script (i.e. Kit root) +os.chdir(os.path.dirname(os.path.realpath(__file__))) +os.chdir(os.path.pardir) +os.chdir(os.path.pardir) + +print('Updating tools...') +## AdwCleaner +path = '.bin' +name = 'AdwCleaner.exe' +dl_page = 'http://www.bleepingcomputer.com/download/adwcleaner/dl/125/' +regex = r'^http://download\.bleepingcomputer\.com/dl/[a-zA-Z0-9]+/[a-zA-Z0-9]+/windows/security/security-utilities/a/adwcleaner/AdwCleaner\.exe' +download_file(path, name, find_dynamic_url(dl_page, regex)) + +## ComboFix +path = '.bin' +name = 'ComboFix.exe' +dl_page = 'http://www.bleepingcomputer.com/download/combofix/dl/12/' +regex = r'^http://download\.bleepingcomputer\.com/dl/[a-zA-Z0-9]+/[a-zA-Z0-9]+/windows/security/anti-virus/c/combofix/ComboFix\.exe' +download_file(path, name, find_dynamic_url(dl_page, regex)) + +## ESET Online Scanner +path = '.bin' +name = 'ESET.exe' +url = 'http://download.eset.com/special/eos/esetsmartinstaller_enu.exe' +download_file(path, name, url) + +## 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) + +## Junkware Removal Tool +path = '.bin' +name = 'JRT.exe' +url = 'http://thisisudax.org/downloads/JRT.exe' +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 = r'^http://download\.bleepingcomputer\.com/dl/[a-zA-Z0-9]+/[a-zA-Z0-9]+/windows/security/security-utilities/r/rkill/rkill\.exe' +download_file(path, name, find_dynamic_url(dl_page, regex)) + +## TDSSKiller +path = '.bin' +name = 'TDSSKiller.exe' +url = 'http://media.kaspersky.com/utilities/VirusUtilities/EN/tdsskiller.exe' +download_file(path, name, url) + +## WinAIO Repairs +path = '.bin/Windows AIO Repair' +url = 'http://www.tweaking.com/files/setups/tweaking.com_windows_repair_aio.zip' + +# Delete old version (saving settings) +print('Removing old version of WinAIO Repair...') +try: + shutil.move('.bin/Windows AIO Repair/settings-boh.ini', 'settings-boh.ini') + shutil.move('.bin/Windows AIO Repair/settings-foh.ini', 'settings-foh.ini') + shutil.rmtree('.bin/Windows AIO Repair') +except FileNotFoundError: + pass + +# Download and extract new version +download_file('.', 'Windows AIO Repair.zip', url) +print('Extracting Windows AIO Repair...') +with zipfile.ZipFile('Windows AIO Repair.zip') as z: + z.extractall('.bin') # Potentially dangerous (https://docs.python.org/3.4/library/zipfile.html#zipfile.ZipFile.extractall) +shutil.move('.bin/Tweaking.com - Windows Repair', '.bin/Windows AIO Repair') + +# Preserve previous settings and remove zip file +shutil.move('settings-boh.ini', '.bin/Windows AIO Repair/settings-boh.ini') +shutil.move('settings-foh.ini', '.bin/Windows AIO Repair/settings-foh.ini') +os.remove('Windows AIO Repair.zip') diff --git a/.bin/Scripts/update_tools.ps1 b/.bin/Scripts/update_tools.ps1 new file mode 100644 index 00000000..780e1007 --- /dev/null +++ b/.bin/Scripts/update_tools.ps1 @@ -0,0 +1,181 @@ +# 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" + +## 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 "$bin\7-Zip\7z.exe" -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..." diff --git a/.bin/Scripts/update_tools.ps1.unfinished b/.bin/Scripts/update_tools.ps1.unfinished new file mode 100644 index 00000000..37bc3edb --- /dev/null +++ b/.bin/Scripts/update_tools.ps1.unfinished @@ -0,0 +1,71 @@ +# 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 +$wget = "$bin\wget\wget.exe" + +# Functions +function download-file { + param ([String]$name, [String]$url) + + write-host ("Downloading {0}" -f $name) + $args = @( + "--quiet", "−−show−progress", + "−−timestamping", + "$url" + ) + start "$wget" -argumentlist $args -nonewwindow -wait +} +function find-dynamic-url { + param ([String]$source_page, [String]$regex) + $d_url = "" + + # Get source page + $wget_args = @( + "--quiet", + "-O", "tmp_page", + "$url") + start "$wget" -argumentlist $wget_args -nonewwindow -wait + + # Search for real url + $d_url = Get-Content "tmp_page" | Where-Object {$_ -imatch $regex} + $d_url = $d_url -ireplace '.*a href="(.*)".*', '$1' + + return $d_url +} +#function gen-backup-name { +# param ([String]$name) +# +# # Add .wkbak to name +# $newname = "$name.wkbak" +# +# # Check if the new name exists +# if (test-path "$newname") { +# # Change name to avoid overwriting any backups +# $x = 2 +# $newname = "$name.wkbak$x" +# while (test-path "$newname") { +# $x += 1 +# $newname = "$name.wkbak$x" +# } +# } +# +# return $newname +#} + +## ComboFix +$path = '.bin' +$name = 'ComboFix.exe' +$dl_page = 'http://www.bleepingcomputer.com/download/combofix/dl/12/' +$regex = '^http://download\.bleepingcomputer\.com/dl/[a-zA-Z0-9]+/[a-zA-Z0-9]+/windows/security/anti-virus/c/combofix/ComboFix\.exe' +#download_file(path, name, find_dynamic_url(dl_page, regex)) +write-host (find-dynamic-url $dl_page $regex) + +## Done ## +popd +pause "Press Enter to exit..." diff --git a/.bin/Scripts/user_data.ps1 b/.bin/Scripts/user_data.ps1 new file mode 100644 index 00000000..7b8663cf --- /dev/null +++ b/.bin/Scripts/user_data.ps1 @@ -0,0 +1,77 @@ +param([string]$log) + +cd $(Split-Path $MyInvocation.MyCommand.Path) +. .\init.ps1 + +#Folder GUIDs from: https://msdn.microsoft.com/en-us/library/windows/desktop/dd378457(v=vs.85).aspx +$user_dirs = , ("Desktop", "{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}") +$user_dirs += , ("Documents", "Personal", "{FDD39AD0-238F-46AF-ADB4-6C85480369C7}") +$user_dirs += , ("Downloads", "{374DE290-123F-4565-9164-39C4925E467B}") +$user_dirs += , ("Favorites", "{1777F761-68AD-4D8A-87BD-30B759FA33DD}") +$user_dirs += , ("Music", "My Music", "{4BD8D571-6D19-48D3-BE97-422220080E43}") +$user_dirs += , ("Pictures", "My Pictures", "{33E28130-4E1E-4676-835A-98395C3BC3BB}") +$user_dirs += , ("Videos", "My Video", "{18989B1D-99B5-455B-841C-AB7C74E4DDFC}") +#=SkyDrive= +#=Dropbox= + +function print-dir-size ($name, $location) { + #"{0}: {1}" -f $name, $location + $name += ":" + $results = .\Get-FolderSize.ps1 "$location" + [int64]$bytes = $results.TotalBytes + if ($bytes -ge 1073741824) { + $total = "{0:N2}" -f [single]$results.TotalGBytes + $s = " {0} {1} Gb ({2})" -f $name.PadRight(10), $total.PadLeft(10), $location + } elseif ($bytes -ge 1048576) { + $total = "{0:N2}" -f [single]$results.TotalMBytes + $s = " {0} {1} Mb ({2})" -f $name.PadRight(10), $total.PadLeft(10), $location + } elseif ($bytes -ge 1024) { + $total = "{0:N2}" -f [single]($bytes/1024) + $s = " {0} {1} Kb ({2})" -f $name.PadRight(10), $total.PadLeft(10), $location + } else { + $total = "{0:N0}" -f $bytes + $s = " {0} {1} Bytes ({2})" -f $name.PadRight(10), $total.PadLeft(7), $location + } + wk-write "$s" "$log" +} + +foreach ($user in get-wmiobject -class win32_useraccount) { + if (test-path registry::hku\$($user.sid)) { + wk-write (" User: {0}" -f $user.name) "$log" + + # Profile + $user_profile = gp "registry::hklm\software\microsoft\windows nt\currentversion\profilelist\$($user.sid)" + print-dir-size "Profile" $user_profile.ProfileImagePath + wk-write " ------------------------" "$log" + + # Shell Folders + $shell_folders = gp "registry::hku\$($user.sid)\software\microsoft\windows\currentversion\explorer\shell folders" + foreach ($dir in $user_dirs) { + $dir_name = $dir[0] + foreach ($reg_name in $dir) { + $dir_location = $shell_folders.$reg_name + if ($dir_location -and $(test-path "$dir_location")) { + print-dir-size $dir_name $dir_location + break + } + } + } + + # Online Backups + foreach ($dir in "Dropbox", "Mozy", "OneDrive", "SkyDrive") { + $spacer = "True" + $dir_name = $dir + $dir_location = "{0}\{1}" -f $user_profile.ProfileImagePath, $dir + if (test-path $dir_location) { + if ($spacer) { + " ------------------------" + rv spacer + } + print-dir-size $dir_name $dir_location + } + } + + # Spacer + wk-write "" "$log" + } +} \ No newline at end of file diff --git a/.bin/Scripts/wk_info.cmd b/.bin/Scripts/wk_info.cmd new file mode 100644 index 00000000..e8bcb7cb --- /dev/null +++ b/.bin/Scripts/wk_info.cmd @@ -0,0 +1,36 @@ +@echo off + +rem Set date variable and create WK\Info\%date% + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +: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% + +:CreateInfoDir +set "log_dir=%systemdrive%\WK\Info\%iso_date%" +mkdir "%log_dir%">nul 2>&1 + +:Done +goto Exit + +:Exit \ No newline at end of file diff --git a/.bin/cmder_mini/vendor/conemu-maximus5/ConEmu.xml b/.bin/cmder_mini/vendor/conemu-maximus5/ConEmu.xml new file mode 100644 index 00000000..d285c009 --- /dev/null +++ b/.bin/cmder_mini/vendor/conemu-maximus5/ConEmu.xml @@ -0,0 +1,844 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Activate Windows (with BIOS key).cmd b/Activate Windows (with BIOS key).cmd new file mode 100644 index 00000000..2f9651ee --- /dev/null +++ b/Activate Windows (with BIOS key).cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\.bin\Scripts\Launch.cmd" PSScript "%~dp0\.bin\Scripts" "activate.ps1" /admin \ No newline at end of file diff --git a/Activate Windows 8.cmd b/Activate Windows 8.cmd new file mode 100644 index 00000000..2f9651ee --- /dev/null +++ b/Activate Windows 8.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\.bin\Scripts\Launch.cmd" PSScript "%~dp0\.bin\Scripts" "activate.ps1" /admin \ No newline at end of file diff --git a/Battery Health.cmd b/Battery Health.cmd new file mode 100644 index 00000000..0bcc42d3 --- /dev/null +++ b/Battery Health.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\.bin\Scripts\Launch.cmd" PSScript "%~dp0\.bin\Scripts" "check_battery.ps1" \ No newline at end of file diff --git a/Copy-WizardKit.cmd b/Copy-WizardKit.cmd new file mode 100644 index 00000000..929c29cb --- /dev/null +++ b/Copy-WizardKit.cmd @@ -0,0 +1,189 @@ +@echo off + +:Flags +set silent= +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Init +setlocal EnableDelayedExpansion +title WK Tools Copier +color 1b +echo Initializing... + +:FindWizardKit +set wrongpath= +call :TestSource "%~dp0" +if defined wrongpath (call :TestSource "\\10.0.0.10\WizardKit") +if defined wrongpath goto WizardKitNotFound + +:Vars +rem :TestSource above runs pushd, so %cd% should be accurate. +set "source=%cd%" +set "dest=%systemdrive%\WK\Tools" + +:OS-Check +set "os_supported=" +for /f "tokens=3*" %%v in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v CurrentVersion 2^>nul') do (set "win_ver=%%v") +for /f "tokens=3*" %%b in ('reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v CurrentBuildNumber 2^>nul') do (set "win_build=%%b") + +if "!win_ver!" == "6.0" ( + set "os_supported=true" + set "win_version=Vista" +) +if "!win_ver!" == "6.1" ( + set "os_supported=true" + set "win_version=7" +) +if "!win_ver!" == "6.2" ( + set "os_supported=true" + set "win_version=8" +) +if "!win_ver!" == "6.3" ( + set "os_supported=true" + set "win_version=8" + if "!win_build!" == "10240" ( + set "win_version=10" + ) + if "!win_build!" == "10586" ( + set "win_version=10" + ) +) + +rem !win_ver!.!win_build! +rem == vista == +rem 6.0.6000 +rem 6.0.6001 +rem 6.0.6002 +rem ==== 7 ==== +rem 6.1.7600 +rem 6.1.7601 +rem 6.1.7602 +rem ==== 8 ==== +rem 6.2.9200 +rem === 8.1 === +rem 6.3.9200 +rem === 8.1u == +rem 6.3.9600 +rem === 10 == +rem 6.3.10240 +rem === 10 v1511 == +rem 6.3.10586 + +if not defined os_supported (goto WindowsVersionError) + +:CreateToolsFolder +mkdir "!dest!" > nul 2>&1 + +:: .bin folder :: +set "args=/xd Scripts" +call :RoboCopy "!source!\.bin" "!dest!\.bin" "" "!args!" + +:: RKill Alternatives :: +pushd "!dest!\.bin\RKill" +mklink /h explorer.exe RKill.exe +mklink /h iExplore.exe RKill.exe +mklink /h RKill.com RKill.exe +mklink /h RKill.scr RKill.exe +mklink /h uSeRiNiT.exe RKill.exe +mklink /h WiNlOgOn.exe RKill.exe +popd + +:: Scripts :: +set "args=/xf update-tools +call :RoboCopy "!source!\.bin\Scripts" "!dest!\.bin\Scripts" "" "!args!" +if !win_version! equ 8 (copy /y "!source!\Activate Windows 8.cmd" "!dest!\") +if !win_version! equ 10 (copy /y "!source!\Activate Windows 8.cmd" "!dest!\Activate Windows (with BIOS key).cmd") +copy /y "!source!\Battery Health.cmd" "!dest!\" +copy /y "!source!\Enter SafeMode.cmd" "!dest!\" +copy /y "!source!\Exit SafeMode.cmd" "!dest!\" +copy /y "!source!\Hide Windows 10 Upgrade.reg" "!dest!\" +copy /y "!source!\Reset Browsers.cmd" "!dest!\" +move /y "!dest!\.bin\Scripts\Final Checklist.cmd" "!dest!\" +move /y "!dest!\.bin\Scripts\SW Diagnostics.cmd" "!dest!\" + +:: 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!" +goto Done + +:: Subroutines :: +:RoboCopy +rem set args (without quotes) +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 + +:Abort +color 4e +echo. +echo Aborted. +echo. +echo Press any key to exit... +pause>nul +goto Exit + +:Done +echo. +echo Done. +goto Exit + +:Exit +popd +color +endlocal + +:EOF diff --git a/Data Recovery/PhotoRec (CLI).cmd b/Data Recovery/PhotoRec (CLI).cmd new file mode 100644 index 00000000..aa0c98d0 --- /dev/null +++ b/Data Recovery/PhotoRec (CLI).cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Console "%~dp0\..\.bin\TestDisk" "photorec_win.exe" "" /admin \ No newline at end of file diff --git a/Data Recovery/PhotoRec.cmd b/Data Recovery/PhotoRec.cmd new file mode 100644 index 00000000..666c6594 --- /dev/null +++ b/Data Recovery/PhotoRec.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\TestDisk" "qphotorec_win.exe" "" /admin \ No newline at end of file diff --git a/Data Recovery/TestDisk.cmd b/Data Recovery/TestDisk.cmd new file mode 100644 index 00000000..b1e8586b --- /dev/null +++ b/Data Recovery/TestDisk.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Console "%~dp0\..\.bin\TestDisk" "testdisk_win.exe" "" /admin \ No newline at end of file diff --git a/Data Transfers/Explorer++.cmd b/Data Transfers/Explorer++.cmd new file mode 100644 index 00000000..b46e95dc --- /dev/null +++ b/Data Transfers/Explorer++.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\Explorer++" "Explorer++.exe" "%userprofile%" /max \ No newline at end of file diff --git a/Data Transfers/FastCopy (as ADMIN).cmd b/Data Transfers/FastCopy (as ADMIN).cmd new file mode 100644 index 00000000..33c974d6 --- /dev/null +++ b/Data Transfers/FastCopy (as ADMIN).cmd @@ -0,0 +1,13 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:WKInfo +rem Create WK\Info\YYYY-MM-DD and set path as %log_dir% +call "%~dp0\..\.bin\Scripts\wk_info.cmd" + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.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 \ No newline at end of file diff --git a/Data Transfers/FastCopy.cmd b/Data Transfers/FastCopy.cmd new file mode 100644 index 00000000..d8e3450d --- /dev/null +++ b/Data Transfers/FastCopy.cmd @@ -0,0 +1,13 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:WKInfo +rem Create WK\Info\YYYY-MM-DD and set path as %log_dir% +call "%~dp0\..\.bin\Scripts\wk_info.cmd" + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.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\" \ No newline at end of file diff --git a/Data Transfers/KVRT.cmd b/Data Transfers/KVRT.cmd new file mode 100644 index 00000000..594193e9 --- /dev/null +++ b/Data Transfers/KVRT.cmd @@ -0,0 +1,13 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:CreateQuarantineDir +set "q_dir=%systemdrive%\WK\Quarantine\KVRT" +mkdir "%q_dir%">nul 2>&1 + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin" "KVRT.exe" "-accepteula -d %q_dir% -processlevel 3 -dontcryptsupportinfo -fixednames" \ No newline at end of file diff --git a/Data Transfers/Transferred Keys.cmd b/Data Transfers/Transferred Keys.cmd new file mode 100644 index 00000000..937bebff --- /dev/null +++ b/Data Transfers/Transferred Keys.cmd @@ -0,0 +1,16 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Extract +if not exist "%~dp0\..\.bin\ProduKey" ( + mkdir "%~dp0\..\.bin\ProduKey" >nul 2>&1 + call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin" "%~dp0\..\.bin\7-Zip\7z.exe" "x ProduKey.7z -oProduKey -aos -pAbracadabra" /wait + ping -n 1 127.0.0.1>nul +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Console "%~dp0\..\.bin\Scripts" "transferred_keys.cmd" /admin \ No newline at end of file diff --git a/Diagnostics/AIDA64.cmd b/Diagnostics/AIDA64.cmd new file mode 100644 index 00000000..6b38e30f --- /dev/null +++ b/Diagnostics/AIDA64.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\AIDA64" "aida64.exe" "" /admin \ No newline at end of file diff --git a/Diagnostics/Auslogics DiskDefrag.cmd b/Diagnostics/Auslogics DiskDefrag.cmd new file mode 100644 index 00000000..1a5e35c1 --- /dev/null +++ b/Diagnostics/Auslogics DiskDefrag.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\Auslogics DiskDefrag" "DiskDefrag.exe" "" /admin \ No newline at end of file diff --git a/Diagnostics/Autoruns.cmd b/Diagnostics/Autoruns.cmd new file mode 100644 index 00000000..f0f36eab --- /dev/null +++ b/Diagnostics/Autoruns.cmd @@ -0,0 +1,21 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:ModifySettings +reg add HKCU\Software\Sysinternals\AutoRuns /v checkvirustotal /t REG_DWORD /d 1 /f >nul +reg add HKCU\Software\Sysinternals\AutoRuns /v EulaAccepted /t REG_DWORD /d 1 /f >nul +reg add HKCU\Software\Sysinternals\AutoRuns /v shownomicrosoft /t REG_DWORD /d 1 /f >nul +reg add HKCU\Software\Sysinternals\AutoRuns /v shownowindows /t REG_DWORD /d 1 /f >nul +reg add HKCU\Software\Sysinternals\AutoRuns /v showonlyvirustotal /t REG_DWORD /d 1 /f >nul +reg add HKCU\Software\Sysinternals\AutoRuns /v submitvirustotal /t REG_DWORD /d 0 /f >nul +reg add HKCU\Software\Sysinternals\AutoRuns /v verifysignatures /t REG_DWORD /d 1 /f >nul +reg add HKCU\Software\Sysinternals\AutoRuns\SigCheck /v EulaAccepted /t REG_DWORD /d 1 /f >nul +reg add HKCU\Software\Sysinternals\AutoRuns\Streams /v EulaAccepted /t REG_DWORD /d 1 /f >nul +reg add HKCU\Software\Sysinternals\AutoRuns\VirusTotal /v VirusTotalTermsAccepted /t REG_DWORD /d 1 /f >nul + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\SysinternalsSuite" "Autoruns.exe" "-e" \ No newline at end of file diff --git a/Diagnostics/BIOSCodes.cmd b/Diagnostics/BIOSCodes.cmd new file mode 100644 index 00000000..c297cdd2 --- /dev/null +++ b/Diagnostics/BIOSCodes.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\BIOSCodes" "BIOSCodes.exe" "" \ No newline at end of file diff --git a/Diagnostics/BatteryInfoView.cmd b/Diagnostics/BatteryInfoView.cmd new file mode 100644 index 00000000..0dde50f7 --- /dev/null +++ b/Diagnostics/BatteryInfoView.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\BatteryInfoView" "BatteryInfoView.exe" "" /admin \ No newline at end of file diff --git a/Diagnostics/BleachBit.cmd b/Diagnostics/BleachBit.cmd new file mode 100644 index 00000000..f9e12634 --- /dev/null +++ b/Diagnostics/BleachBit.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\BleachBit" "bleachbit.exe" "" /admin \ No newline at end of file diff --git a/Diagnostics/BlueScreenView.cmd b/Diagnostics/BlueScreenView.cmd new file mode 100644 index 00000000..fec3c011 --- /dev/null +++ b/Diagnostics/BlueScreenView.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\BlueScreenView" "BlueScreenView.exe" "" /admin \ No newline at end of file diff --git a/Diagnostics/CPU-Z.cmd b/Diagnostics/CPU-Z.cmd new file mode 100644 index 00000000..59e44b02 --- /dev/null +++ b/Diagnostics/CPU-Z.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\CPU-Z" "cpuz.exe" "" \ No newline at end of file diff --git a/Diagnostics/ERUNT.cmd b/Diagnostics/ERUNT.cmd new file mode 100644 index 00000000..47bda065 --- /dev/null +++ b/Diagnostics/ERUNT.cmd @@ -0,0 +1,13 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:WKInfo +rem Create WK\Info\YYYY-MM-DD and set path as %log_dir% +call "%~dp0\..\.bin\Scripts\wk_info.cmd" + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\erunt" "ERUNT.EXE" "%log_dir%%\Registry sysreg curuser otherusers" /admin \ No newline at end of file diff --git a/Diagnostics/GpuTest.cmd b/Diagnostics/GpuTest.cmd new file mode 100644 index 00000000..06ed3b19 --- /dev/null +++ b/Diagnostics/GpuTest.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\GpuTest" "GpuTest_GUI.exe" "" \ No newline at end of file diff --git a/Diagnostics/HWMonitor.cmd b/Diagnostics/HWMonitor.cmd new file mode 100644 index 00000000..dd035cf0 --- /dev/null +++ b/Diagnostics/HWMonitor.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\HWMonitor" "HWMonitor.exe" "" \ No newline at end of file diff --git a/Diagnostics/HeavyLoad.cmd b/Diagnostics/HeavyLoad.cmd new file mode 100644 index 00000000..e780f727 --- /dev/null +++ b/Diagnostics/HeavyLoad.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\HeavyLoad" "HeavyLoad.exe" "" /admin \ No newline at end of file diff --git a/Diagnostics/HitmanPro (FullBreach).cmd b/Diagnostics/HitmanPro (FullBreach).cmd new file mode 100644 index 00000000..e0949e95 --- /dev/null +++ b/Diagnostics/HitmanPro (FullBreach).cmd @@ -0,0 +1,13 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:WKInfo +rem Create WK\Info\YYYY-MM-DD and set path as %log_dir% +call "%~dp0\..\.bin\Scripts\wk_info.cmd" + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\HitmanPro" "HitmanPro.exe" "/scan /noinstall /noupload /log=%log_dir%\hitman.xml /fb" /admin \ No newline at end of file diff --git a/Diagnostics/HitmanPro.cmd b/Diagnostics/HitmanPro.cmd new file mode 100644 index 00000000..c15f99e5 --- /dev/null +++ b/Diagnostics/HitmanPro.cmd @@ -0,0 +1,13 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:WKInfo +rem Create WK\Info\YYYY-MM-DD and set path as %log_dir% +call "%~dp0\..\.bin\Scripts\wk_info.cmd" + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\HitmanPro" "HitmanPro.exe" "/scan /noinstall /noupload /log=%log_dir%\hitman.xml" /admin \ No newline at end of file diff --git a/Diagnostics/MailPasswordView (as ADMIN).cmd b/Diagnostics/MailPasswordView (as ADMIN).cmd new file mode 100644 index 00000000..e3258b2d --- /dev/null +++ b/Diagnostics/MailPasswordView (as ADMIN).cmd @@ -0,0 +1,14 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Extract +mkdir "%~dp0\..\.bin\mailpv" >nul 2>&1 +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin" "%~dp0\..\.bin\7-Zip\7z.exe" "x mailpv.7z -omailpv -aos -Abracadabra" /wait +ping -n 1 127.0.0.1>nul + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\mailpv" "mailpv.exe" "" /admin \ No newline at end of file diff --git a/Diagnostics/MailPasswordView.cmd b/Diagnostics/MailPasswordView.cmd new file mode 100644 index 00000000..ec9d6d01 --- /dev/null +++ b/Diagnostics/MailPasswordView.cmd @@ -0,0 +1,14 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Extract +mkdir "%~dp0\..\.bin\mailpv" >nul 2>&1 +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin" "%~dp0\..\.bin\7-Zip\7z.exe" "x mailpv.7z -omailpv -aos -Abracadabra" /wait +ping -n 1 127.0.0.1>nul + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\mailpv" "mailpv.exe" "" \ No newline at end of file diff --git a/Diagnostics/ProduKey.cmd b/Diagnostics/ProduKey.cmd new file mode 100644 index 00000000..d3197689 --- /dev/null +++ b/Diagnostics/ProduKey.cmd @@ -0,0 +1,71 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Init +setlocal EnableDelayedExpansion + +:ClearConfigs +pushd %~dp0\..\.bin\ProduKey +if exist "ProduKey.cfg" del "ProduKey.cfg" +if exist "ProduKey64.cfg" del "ProduKey64.cfg" +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! +) + +:Extract +mkdir "%~dp0\..\.bin\ProduKey" >nul 2>&1 +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin" "%~dp0\..\.bin\7-Zip\7z.exe" "x ProduKey.7z -oProduKey -aos -pAbracadabra" /wait +ping -n 1 127.0.0.1>nul + +:Choose +echo. +set "args=" + +rem If there are no choices, then don't ask +if "!choices!" == "L" (goto Launch) + +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!") + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\ProduKey" "ProduKey.exe" "!args!" /admin + +:Done +endlocal \ No newline at end of file diff --git a/Drivers/Auto Detect - Acer.cmd b/Drivers/Auto Detect - Acer.cmd new file mode 100644 index 00000000..d0680db6 --- /dev/null +++ b/Drivers/Auto Detect - Acer.cmd @@ -0,0 +1,11 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +echo Waiting for software installation to finish... +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\_Drivers" "SerialNumberDetectionTool.exe" "" /admin /wait +start "" "http://us.acer.com/ac/en/US/content/drivers" \ No newline at end of file diff --git a/Drivers/Auto Detect - Dell.cmd b/Drivers/Auto Detect - Dell.cmd new file mode 100644 index 00000000..17d04a19 --- /dev/null +++ b/Drivers/Auto Detect - Dell.cmd @@ -0,0 +1,11 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +echo Waiting for software installation to finish... +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\_Drivers" "DellSystemDetectLauncher.exe" "" /admin /wait +start "" "http://www.dell.com/support/home/us/en/19/Eula/scan?sourcePage=J&scanType=TMC&loadSection=N&AppName=drivers&app=drivers" \ No newline at end of file diff --git a/Drivers/Auto Detect - HP.cmd b/Drivers/Auto Detect - HP.cmd new file mode 100644 index 00000000..7b33bc19 --- /dev/null +++ b/Drivers/Auto Detect - HP.cmd @@ -0,0 +1,11 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +echo Waiting for software installation to finish... +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\_Drivers" "HPSupportSolutionsFramework-12.3.11.29.exe" "" /admin /wait +start "" "http://h22213.www2.hp.com/ediags/gmd/ProdDetect.aspx?lc=en&cc=us" \ No newline at end of file diff --git a/Drivers/Auto Detect - Intel.cmd b/Drivers/Auto Detect - Intel.cmd new file mode 100644 index 00000000..4dd0fa7c --- /dev/null +++ b/Drivers/Auto Detect - Intel.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\_Drivers" "Intel Driver Update Utility Installer.exe" "" \ No newline at end of file diff --git a/Drivers/Auto Detect - Lenovo.cmd b/Drivers/Auto Detect - Lenovo.cmd new file mode 100644 index 00000000..f90e0a37 --- /dev/null +++ b/Drivers/Auto Detect - Lenovo.cmd @@ -0,0 +1,11 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +echo Waiting for software installation to finish... +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\_Drivers" "LSBsetup.exe" "" /admin /wait +start "" "http://support.lenovo.com/us/en/products?tabName=Downloads" \ No newline at end of file diff --git a/Drivers/Auto Detect - SDI.cmd b/Drivers/Auto Detect - SDI.cmd new file mode 100644 index 00000000..baadc0b0 --- /dev/null +++ b/Drivers/Auto Detect - SDI.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\_Drivers\SDI" "SDI.exe" "" \ No newline at end of file diff --git a/Drivers/Auto Detect - Toshiba.cmd b/Drivers/Auto Detect - Toshiba.cmd new file mode 100644 index 00000000..b65838e6 --- /dev/null +++ b/Drivers/Auto Detect - Toshiba.cmd @@ -0,0 +1,11 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +echo Waiting for software installation to finish... +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\_Drivers" "GetProductInfo.exe" "" /admin /wait +start "" "http://support.toshiba.com/drivers" \ No newline at end of file diff --git a/Drivers/GPU - AMD.cmd b/Drivers/GPU - AMD.cmd new file mode 100644 index 00000000..e7a6fd44 --- /dev/null +++ b/Drivers/GPU - AMD.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\_Drivers" "autodetectutility.exe" "" \ No newline at end of file diff --git a/Drivers/GPU - Gaming Evolved (AMD).cmd b/Drivers/GPU - Gaming Evolved (AMD).cmd new file mode 100644 index 00000000..458281f3 --- /dev/null +++ b/Drivers/GPU - Gaming Evolved (AMD).cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\_Drivers" "raptr_installer.exe" "" \ No newline at end of file diff --git a/Drivers/GPU - GeForce Experience.cmd b/Drivers/GPU - GeForce Experience.cmd new file mode 100644 index 00000000..27afe072 --- /dev/null +++ b/Drivers/GPU - GeForce Experience.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\_Drivers" "GeForce_Experience_v2.11.2.66.exe" "" \ No newline at end of file diff --git a/Drivers/SSD - ExpressCache.cmd b/Drivers/SSD - ExpressCache.cmd new file mode 100644 index 00000000..44d8380f --- /dev/null +++ b/Drivers/SSD - ExpressCache.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\_Drivers" "ExpressCacheSetup.exe" "" \ No newline at end of file diff --git a/Drivers/SSD - Intel.cmd b/Drivers/SSD - Intel.cmd new file mode 100644 index 00000000..5d1dac79 --- /dev/null +++ b/Drivers/SSD - Intel.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\_Drivers" "Intel SSD Toolbox - v3.3.4.exe" "" \ No newline at end of file diff --git a/Drivers/SSD - Samsung.cmd b/Drivers/SSD - Samsung.cmd new file mode 100644 index 00000000..7121517d --- /dev/null +++ b/Drivers/SSD - Samsung.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\_Drivers" "Samsung_Magician_Setup_v495.exe" "" \ No newline at end of file diff --git a/Enter SafeMode.cmd b/Enter SafeMode.cmd new file mode 100644 index 00000000..f8f69191 --- /dev/null +++ b/Enter SafeMode.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\.bin\Scripts\Launch.cmd" PSScript "%~dp0\.bin\Scripts" "enter_safemode.ps1" /admin \ No newline at end of file diff --git a/Exit SafeMode.cmd b/Exit SafeMode.cmd new file mode 100644 index 00000000..c1ede008 --- /dev/null +++ b/Exit SafeMode.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\.bin\Scripts\Launch.cmd" PSScript "%~dp0\.bin\Scripts" "exit_safemode.ps1" /admin \ No newline at end of file diff --git a/Final Checklist.cmd b/Final Checklist.cmd new file mode 100644 index 00000000..7adda3b8 --- /dev/null +++ b/Final Checklist.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\.bin\Scripts\Launch.cmd" PSScript "%~dp0\.bin\Scripts" "checklist.ps1" /admin \ No newline at end of file diff --git a/Hide Windows 10 Upgrade.reg b/Hide Windows 10 Upgrade.reg new file mode 100644 index 00000000..8e6be40c Binary files /dev/null and b/Hide Windows 10 Upgrade.reg differ diff --git a/Installers/BackBlaze.url b/Installers/BackBlaze.url new file mode 100644 index 00000000..6f2db611 --- /dev/null +++ b/Installers/BackBlaze.url @@ -0,0 +1,5 @@ +[{000214A0-0000-0000-C000-000000000046}] +Prop3=19,11 +[InternetShortcut] +URL=https://www.backblaze.com/gen/install_backblaze-af9duk +IDList= diff --git a/Installers/Chocolatey (Deprecated)/Install Chocolatey.cmd b/Installers/Chocolatey (Deprecated)/Install Chocolatey.cmd new file mode 100644 index 00000000..17375c5a --- /dev/null +++ b/Installers/Chocolatey (Deprecated)/Install Chocolatey.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" PSScript "%~dp0\..\.bin\Scripts" "install_chocolatey.ps1" /admin \ No newline at end of file diff --git a/Installers/Chocolatey (Deprecated)/MSE.cmd b/Installers/Chocolatey (Deprecated)/MSE.cmd new file mode 100644 index 00000000..ee607115 --- /dev/null +++ b/Installers/Chocolatey (Deprecated)/MSE.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" chocolatey "%userprofile%" "microsoftsecurityessentials" \ No newline at end of file diff --git a/Installers/Chocolatey (Deprecated)/Win10.cmd b/Installers/Chocolatey (Deprecated)/Win10.cmd new file mode 100644 index 00000000..83372cb6 --- /dev/null +++ b/Installers/Chocolatey (Deprecated)/Win10.cmd @@ -0,0 +1,15 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" chocolatey "%userprofile%" "classic-shell -installArgs ADDLOCAL=ClassicStartMenu" +echo "Please wait until Classic Shell is installed before continuing." +echo. +ping 127.0.0.1 -n 3 >nul 2>&1 +echo "Press any key to continue..." +pause>nul +call "%~dp0\..\.bin\Scripts\Launch.cmd" chocolatey "%userprofile%" "7zip.install googlechrome firefox mpv.install vlc adobeair adobereader adobereader-update jre8 silverlight dotnet3.5 dotnet4.5.1" /wait \ No newline at end of file diff --git a/Installers/Chocolatey (Deprecated)/Win7.cmd b/Installers/Chocolatey (Deprecated)/Win7.cmd new file mode 100644 index 00000000..b7415234 --- /dev/null +++ b/Installers/Chocolatey (Deprecated)/Win7.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" chocolatey "%userprofile%" "7zip.install googlechrome firefox mpv.install vlc microsoftsecurityessentials adobeair adobereader adobereader-update jre8 silverlight dotnet3.5 dotnet4.5.1" \ No newline at end of file diff --git a/Installers/Chocolatey (Deprecated)/Win8.cmd b/Installers/Chocolatey (Deprecated)/Win8.cmd new file mode 100644 index 00000000..83372cb6 --- /dev/null +++ b/Installers/Chocolatey (Deprecated)/Win8.cmd @@ -0,0 +1,15 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" chocolatey "%userprofile%" "classic-shell -installArgs ADDLOCAL=ClassicStartMenu" +echo "Please wait until Classic Shell is installed before continuing." +echo. +ping 127.0.0.1 -n 3 >nul 2>&1 +echo "Press any key to continue..." +pause>nul +call "%~dp0\..\.bin\Scripts\Launch.cmd" chocolatey "%userprofile%" "7zip.install googlechrome firefox mpv.install vlc adobeair adobereader adobereader-update jre8 silverlight dotnet3.5 dotnet4.5.1" /wait \ No newline at end of file diff --git a/Installers/Install Programs.cmd b/Installers/Install Programs.cmd new file mode 100644 index 00000000..b436c695 --- /dev/null +++ b/Installers/Install Programs.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:LaunchProgramSelection +call "%~dp0\..\.bin\Scripts\Launch.cmd" PSScript "%~dp0\..\.bin\Scripts" "install_programs.ps1" /admin \ No newline at end of file diff --git a/Installers/Office/2007/2007 Microsoft Office system (SP3).cmd b/Installers/Office/2007/2007 Microsoft Office system (SP3).cmd new file mode 100644 index 00000000..f9e0be4a --- /dev/null +++ b/Installers/Office/2007/2007 Microsoft Office system (SP3).cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\..\..\.bin\Scripts\Launch.cmd" Office "%~dp0\..\..\..\.bin\Scripts" "2007\2007 Microsoft Office system (SP3)" diff --git a/Installers/Office/2007/Access 2007 (SP3).cmd b/Installers/Office/2007/Access 2007 (SP3).cmd new file mode 100644 index 00000000..8d812e16 --- /dev/null +++ b/Installers/Office/2007/Access 2007 (SP3).cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\..\..\.bin\Scripts\Launch.cmd" Office "%~dp0\..\..\..\.bin\Scripts" "2007\Access 2007 (SP3)" diff --git a/Installers/Office/2007/AccessRuntime2007.cmd b/Installers/Office/2007/AccessRuntime2007.cmd new file mode 100644 index 00000000..05fc0113 --- /dev/null +++ b/Installers/Office/2007/AccessRuntime2007.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\..\..\.bin\Scripts\Launch.cmd" Office "%~dp0\..\..\..\.bin\Scripts" "2007\AccessRuntime2007.exe" diff --git a/Installers/Office/2007/Home and Student 2007 (SP3).cmd b/Installers/Office/2007/Home and Student 2007 (SP3).cmd new file mode 100644 index 00000000..3f0d004b --- /dev/null +++ b/Installers/Office/2007/Home and Student 2007 (SP3).cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\..\..\.bin\Scripts\Launch.cmd" Office "%~dp0\..\..\..\.bin\Scripts" "2007\Home and Student 2007 (SP3)" diff --git a/Installers/Office/2007/Outlook 2007 (SP3).cmd b/Installers/Office/2007/Outlook 2007 (SP3).cmd new file mode 100644 index 00000000..3c61f72b --- /dev/null +++ b/Installers/Office/2007/Outlook 2007 (SP3).cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\..\..\.bin\Scripts\Launch.cmd" Office "%~dp0\..\..\..\.bin\Scripts" "2007\Outlook 2007 (SP3)" diff --git a/Installers/Office/2007/Professional 2007 (SP3).cmd b/Installers/Office/2007/Professional 2007 (SP3).cmd new file mode 100644 index 00000000..4cb81197 --- /dev/null +++ b/Installers/Office/2007/Professional 2007 (SP3).cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\..\..\.bin\Scripts\Launch.cmd" Office "%~dp0\..\..\..\.bin\Scripts" "2007\Professional 2007 (SP3)" diff --git a/Installers/Office/2007/Publisher 2007 (SP3).cmd b/Installers/Office/2007/Publisher 2007 (SP3).cmd new file mode 100644 index 00000000..b080bfad --- /dev/null +++ b/Installers/Office/2007/Publisher 2007 (SP3).cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\..\..\.bin\Scripts\Launch.cmd" Office "%~dp0\..\..\..\.bin\Scripts" "2007\Publisher 2007 (SP3)" diff --git a/Installers/Office/2007/Small Business 2007 (SP3).cmd b/Installers/Office/2007/Small Business 2007 (SP3).cmd new file mode 100644 index 00000000..23994162 --- /dev/null +++ b/Installers/Office/2007/Small Business 2007 (SP3).cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\..\..\.bin\Scripts\Launch.cmd" Office "%~dp0\..\..\..\.bin\Scripts" "2007\Small Business 2007 (SP3)" diff --git a/Installers/Office/2010/Outlook 2010 (SP2) (x32).cmd b/Installers/Office/2010/Outlook 2010 (SP2) (x32).cmd new file mode 100644 index 00000000..12ebe94e --- /dev/null +++ b/Installers/Office/2010/Outlook 2010 (SP2) (x32).cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\..\..\.bin\Scripts\Launch.cmd" Office "%~dp0\..\..\..\.bin\Scripts" "2010\Outlook 2010 (SP2) (x32)" diff --git a/Installers/Office/2010/Outlook 2010 (SP2) (x64).cmd b/Installers/Office/2010/Outlook 2010 (SP2) (x64).cmd new file mode 100644 index 00000000..2b6f8d32 --- /dev/null +++ b/Installers/Office/2010/Outlook 2010 (SP2) (x64).cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\..\..\.bin\Scripts\Launch.cmd" Office "%~dp0\..\..\..\.bin\Scripts" "2010\Outlook 2010 (SP2) (x64)" diff --git a/Installers/Office/2010/Professional Plus 2010 (SP2).cmd b/Installers/Office/2010/Professional Plus 2010 (SP2).cmd new file mode 100644 index 00000000..bd3f5b16 --- /dev/null +++ b/Installers/Office/2010/Professional Plus 2010 (SP2).cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\..\..\.bin\Scripts\Launch.cmd" Office "%~dp0\..\..\..\.bin\Scripts" "2010\Professional Plus 2010 (SP2)" diff --git a/Installers/Office/2010/Publisher 2010 (SP2).cmd b/Installers/Office/2010/Publisher 2010 (SP2).cmd new file mode 100644 index 00000000..cfb9fe62 --- /dev/null +++ b/Installers/Office/2010/Publisher 2010 (SP2).cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\..\..\.bin\Scripts\Launch.cmd" Office "%~dp0\..\..\..\.bin\Scripts" "2010\Publisher 2010 (SP2)" diff --git a/Installers/Office/2010/Single Image 2010 (SP2).cmd b/Installers/Office/2010/Single Image 2010 (SP2).cmd new file mode 100644 index 00000000..9446dbe7 --- /dev/null +++ b/Installers/Office/2010/Single Image 2010 (SP2).cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\..\..\.bin\Scripts\Launch.cmd" Office "%~dp0\..\..\..\.bin\Scripts" "2010\Single Image 2010 (SP2)" diff --git a/Installers/Office/2013/Home and Business 2013.cmd b/Installers/Office/2013/Home and Business 2013.cmd new file mode 100644 index 00000000..2a0b6d1b --- /dev/null +++ b/Installers/Office/2013/Home and Business 2013.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\..\..\.bin\Scripts\Launch.cmd" Office "%~dp0\..\..\..\.bin\Scripts" "2013\Home and Business 2013" diff --git a/Installers/Office/2013/Home and Student 2013.cmd b/Installers/Office/2013/Home and Student 2013.cmd new file mode 100644 index 00000000..6f623a16 --- /dev/null +++ b/Installers/Office/2013/Home and Student 2013.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\..\..\.bin\Scripts\Launch.cmd" Office "%~dp0\..\..\..\.bin\Scripts" "2013\Home and Student 2013" diff --git a/Installers/Office/2013/Professional Plus 2013.cmd b/Installers/Office/2013/Professional Plus 2013.cmd new file mode 100644 index 00000000..0a2bfc90 --- /dev/null +++ b/Installers/Office/2013/Professional Plus 2013.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\..\..\.bin\Scripts\Launch.cmd" Office "%~dp0\..\..\..\.bin\Scripts" "2013\Professional Plus 2013" diff --git a/Installers/Office/2016/Home and Business 2016.cmd b/Installers/Office/2016/Home and Business 2016.cmd new file mode 100644 index 00000000..244d6610 --- /dev/null +++ b/Installers/Office/2016/Home and Business 2016.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\..\..\.bin\Scripts\Launch.cmd" Office "%~dp0\..\..\..\.bin\Scripts" "2016\Home and Business 2016" diff --git a/Installers/Office/2016/Home and Student 2016.cmd b/Installers/Office/2016/Home and Student 2016.cmd new file mode 100644 index 00000000..58eb86cb --- /dev/null +++ b/Installers/Office/2016/Home and Student 2016.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\..\..\.bin\Scripts\Launch.cmd" Office "%~dp0\..\..\..\.bin\Scripts" "2016\Home and Student 2016" diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 00000000..7734ae70 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,7 @@ +Copyright (c) 2016 Alan Mason + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/Misc/Cmder (as ADMIN).cmd b/Misc/Cmder (as ADMIN).cmd new file mode 100644 index 00000000..38d69f5e --- /dev/null +++ b/Misc/Cmder (as ADMIN).cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\cmder_mini" "Cmder.exe" "" /admin \ No newline at end of file diff --git a/Misc/Cmder.cmd b/Misc/Cmder.cmd new file mode 100644 index 00000000..402bdf12 --- /dev/null +++ b/Misc/Cmder.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\cmder_mini" "Cmder.exe" "" \ No newline at end of file diff --git a/Misc/DeviceRemover.cmd b/Misc/DeviceRemover.cmd new file mode 100644 index 00000000..afed341a --- /dev/null +++ b/Misc/DeviceRemover.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin" "DeviceRemover.exe" "" \ No newline at end of file diff --git a/Misc/Explorer++.cmd b/Misc/Explorer++.cmd new file mode 100644 index 00000000..b46e95dc --- /dev/null +++ b/Misc/Explorer++.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\Explorer++" "Explorer++.exe" "%userprofile%" /max \ No newline at end of file diff --git a/Misc/Notepad2.cmd b/Misc/Notepad2.cmd new file mode 100644 index 00000000..3619ae49 --- /dev/null +++ b/Misc/Notepad2.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\Notepad2" "Notepad2-Mod.exe" "" \ No newline at end of file diff --git a/Misc/SysinternalsSuite.cmd b/Misc/SysinternalsSuite.cmd new file mode 100644 index 00000000..2e8ddfbc --- /dev/null +++ b/Misc/SysinternalsSuite.cmd @@ -0,0 +1,10 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:OpenFolder +cd /d %~dp0 +start "" "explorer.exe" "%cd%\..\.bin\SysinternalsSuite" \ No newline at end of file diff --git a/Misc/WinDirStat.cmd b/Misc/WinDirStat.cmd new file mode 100644 index 00000000..27b8d494 --- /dev/null +++ b/Misc/WinDirStat.cmd @@ -0,0 +1,23 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:ModifySettings +reg add HKCU\Software\Seifert\WinDirStat\options /v followJunctionPoints /t REG_DWORD /d 0 /f >nul +reg add HKCU\Software\Seifert\WinDirStat\options /v followMountPoints /t REG_DWORD /d 0 /f >nul +reg add HKCU\Software\Seifert\WinDirStat\options /v humanFormat /t REG_DWORD /d 1 /f >nul +reg add HKCU\Software\Seifert\WinDirStat\options /v language /t REG_DWORD /d 409 /f >nul +reg add HKCU\Software\Seifert\WinDirStat\options /v listFullRowSelection /t REG_DWORD /d 1 /f >nul +reg add HKCU\Software\Seifert\WinDirStat\options /v listStripes /t REG_DWORD /d 1 /f >nul +reg add HKCU\Software\Seifert\WinDirStat\options /v pacmanAnimation /t REG_DWORD /d 1 /f >nul +reg add HKCU\Software\Seifert\WinDirStat\options /v showTimeSpent /t REG_DWORD /d 0 /f >nul +reg add HKCU\Software\Seifert\WinDirStat\options /v treelistGrid /t REG_DWORD /d 0 /f >nul +reg add HKCU\Software\Seifert\WinDirStat\options /v treemapGrid /t REG_DWORD /d 0 /f >nul +reg add HKCU\Software\Seifert\WinDirStat\options /v useWdsLocale /t REG_DWORD /d 0 /f >nul +reg add HKCU\Software\Seifert\WinDirStat\persistence /v showTreemap /t REG_DWORD /d 0 /f >nul + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\WinDirStat" "windirstat.exe" "" /admin /max \ No newline at end of file diff --git a/Misc/XMPlay.cmd b/Misc/XMPlay.cmd new file mode 100644 index 00000000..f006797c --- /dev/null +++ b/Misc/XMPlay.cmd @@ -0,0 +1,15 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:RestoreDefaults +del "xmplay.library" +del "xmplay.library~" +del "xmplay.pls" +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\XMPlay" "%~dp0\..\.bin\7-Zip\7z.exe" "e defaults.7z -aoa" + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\XMPlay" "xmplay.exe" "music.7z" \ No newline at end of file diff --git a/Misc/_Update Kit.cmd b/Misc/_Update Kit.cmd new file mode 100644 index 00000000..65101ac9 --- /dev/null +++ b/Misc/_Update Kit.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" PSScript "%~dp0\..\.bin\Scripts" "update_tools.ps1" \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 00000000..b3a3f94f --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# README + +A collection of scripts to help technicians service Windows systems. diff --git a/Repairs/AdwCleaner.cmd b/Repairs/AdwCleaner.cmd new file mode 100644 index 00000000..4d23efbd --- /dev/null +++ b/Repairs/AdwCleaner.cmd @@ -0,0 +1,15 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Copy +cd /d "%~dp0\..\.bin" +set "prog=AdwCleaner.exe" +mkdir "tmp" >nul 2>&1 +copy /y "%prog%" "tmp\%prog%" + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin" "%prog%" "" \ No newline at end of file diff --git a/Repairs/Autoruns.cmd b/Repairs/Autoruns.cmd new file mode 100644 index 00000000..04a660cc --- /dev/null +++ b/Repairs/Autoruns.cmd @@ -0,0 +1,21 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:ModifySettings +reg add HKCU\Software\Sysinternals\AutoRuns /v checkvirustotal /t REG_DWORD /d 0 /f >nul +reg add HKCU\Software\Sysinternals\AutoRuns /v EulaAccepted /t REG_DWORD /d 1 /f >nul +reg add HKCU\Software\Sysinternals\AutoRuns /v shownomicrosoft /t REG_DWORD /d 1 /f >nul +reg add HKCU\Software\Sysinternals\AutoRuns /v shownowindows /t REG_DWORD /d 1 /f >nul +reg add HKCU\Software\Sysinternals\AutoRuns /v showonlyvirustotal /t REG_DWORD /d 0 /f >nul +reg add HKCU\Software\Sysinternals\AutoRuns /v submitvirustotal /t REG_DWORD /d 0 /f >nul +reg add HKCU\Software\Sysinternals\AutoRuns /v verifysignatures /t REG_DWORD /d 0 /f >nul +reg add HKCU\Software\Sysinternals\AutoRuns\SigCheck /v EulaAccepted /t REG_DWORD /d 1 /f >nul +reg add HKCU\Software\Sysinternals\AutoRuns\Streams /v EulaAccepted /t REG_DWORD /d 1 /f >nul +reg add HKCU\Software\Sysinternals\AutoRuns\VirusTotal /v VirusTotalTermsAccepted /t REG_DWORD /d 1 /f >nul + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\SysinternalsSuite" "Autoruns.exe" "-e" \ No newline at end of file diff --git a/Repairs/CHKDSK (Fix).cmd b/Repairs/CHKDSK (Fix).cmd new file mode 100644 index 00000000..95252e72 --- /dev/null +++ b/Repairs/CHKDSK (Fix).cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Console "%~dp0\..\.bin\Scripts" "check_disk.cmd" "/f" /admin \ No newline at end of file diff --git a/Repairs/CHKDSK.cmd b/Repairs/CHKDSK.cmd new file mode 100644 index 00000000..6223cd51 --- /dev/null +++ b/Repairs/CHKDSK.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Console "%~dp0\..\.bin\Scripts" "check_disk.cmd" "" /admin \ No newline at end of file diff --git a/Repairs/Complete Internet Repair.cmd b/Repairs/Complete Internet Repair.cmd new file mode 100644 index 00000000..6287bdd6 --- /dev/null +++ b/Repairs/Complete Internet Repair.cmd @@ -0,0 +1,18 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:WKInfo +rem Create WK\Info\YYYY-MM-DD and set path as %log_dir% +call "%~dp0\..\.bin\Scripts\wk_info.cmd" + +:LaunchERUNT +rem Backup registry before running WinAIO +echo Backing up registry... +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\erunt" "ERUNT.EXE" "%log_dir%\Registry sysreg curuser otherusers" /admin /wait + +:LaunchWinAIO +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\Complete Internet Repair" "ComIntRep.exe" "" \ No newline at end of file diff --git a/Repairs/DISM.cmd b/Repairs/DISM.cmd new file mode 100644 index 00000000..d74e49e2 --- /dev/null +++ b/Repairs/DISM.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" PSScript "%~dp0\..\.bin\Scripts" "dism.ps1" "" \ No newline at end of file diff --git a/Repairs/ESET & KVRT.cmd b/Repairs/ESET & KVRT.cmd new file mode 100644 index 00000000..5bcf7426 --- /dev/null +++ b/Repairs/ESET & KVRT.cmd @@ -0,0 +1,16 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:CreateQuarantineDir +set "q_dir=%systemdrive%\WK\Quarantine\KVRT" +mkdir "%q_dir%">nul 2>&1 + +:LaunchESET +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin" "ESET.exe" "" + +:LaunchKVRT +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin" "KVRT.exe" "-accepteula -d %q_dir% -processlevel 3 -dontcryptsupportinfo -fixednames" \ No newline at end of file diff --git a/Repairs/JRT.cmd b/Repairs/JRT.cmd new file mode 100644 index 00000000..4cf5d519 --- /dev/null +++ b/Repairs/JRT.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin" "JRT.exe" "" \ No newline at end of file diff --git a/Repairs/MBAM & SAS.cmd b/Repairs/MBAM & SAS.cmd new file mode 100644 index 00000000..45909798 --- /dev/null +++ b/Repairs/MBAM & SAS.cmd @@ -0,0 +1,16 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Install +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin" "MBAM SAS.exe" "" /wait + +:LaunchMBAM +if exist "%programfiles%\Malwarebytes Anti-Malware\mbam.exe" (call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%programfiles%\Malwarebytes Anti-Malware" "mbam.exe" "") +if exist "%programfiles(x86)%\Malwarebytes Anti-Malware\mbam.exe" (call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%programfiles(x86)%\Malwarebytes Anti-Malware" "mbam.exe" "") + +:LaunchSAS +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%programfiles%\SUPERAntiSpyware" "SUPERAntiSpyware.exe" "" \ No newline at end of file diff --git a/Repairs/MBAM (Chocolatey).cmd b/Repairs/MBAM (Chocolatey).cmd new file mode 100644 index 00000000..e2f1f1b5 --- /dev/null +++ b/Repairs/MBAM (Chocolatey).cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:InstallMBAM +call "%~dp0\..\.bin\Scripts\Launch.cmd" PSScript "%~dp0\..\.bin\Scripts" "install_mbam.ps1" /admin diff --git a/Repairs/RKill.cmd b/Repairs/RKill.cmd new file mode 100644 index 00000000..a7492104 --- /dev/null +++ b/Repairs/RKill.cmd @@ -0,0 +1,61 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Init +setlocal EnableDelayedExpansion +color 1b +title WK Launcher +pushd %~dp0\..\.bin + +:CheckHardLinks +pushd RKill +for %%r in (explorer.exe iExplore.exe RKill.com RKill.scr uSeRiNiT.exe WiNlOgOn.exe) do ( + if not exist "%%r" mklink /h %%r RKill.exe>nul 2>&1 +) +popd + +:WKInfo +rem Create WK\Info\YYYY-MM-DD and set path as !log_dir! +call "%~dp0\..\.bin\Scripts\wk_info.cmd" + +:RKill +echo Scanning system with RKill... +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin" "RKill\RKill.exe" "-l !log_dir!\rkill.log" +choice /c YA /d A /t 300 /m "Did RKill run correctly? Press Y for Yes, A to run Alternative." +if %errorlevel% equ 0 goto Abort +if %errorlevel% equ 1 goto Done +if %errorlevel% equ 2 goto RKillAlt + +:RKillAlt +echo Scanning system with RKill... +set "prog=RKill\explorer.exe" +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin" "RKill\explorer.exe" "-l !log_dir!\rkill.log" +choice /c YM /d M /t 300 /m "Did RKill run correctly? Press Y for Yes, M to run manually." +if %errorlevel% equ 0 goto Abort +if %errorlevel% equ 1 goto Done +if %errorlevel% equ 2 goto RKillManual + +:RKillManual +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\Explorer++" "Explorer++.exe" "%cd%\RKill" +goto Done + +:Abort +color 4e +echo. +echo Aborted. Try running an alternate version manually. +echo. +echo Press any key to exit... +pause>nul +goto Exit + +:Done +goto Exit + +:Exit +popd +color +endlocal \ No newline at end of file diff --git a/Repairs/SFC Scan.cmd b/Repairs/SFC Scan.cmd new file mode 100644 index 00000000..c0fc20d5 --- /dev/null +++ b/Repairs/SFC Scan.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Console "%windir%\System32" "sfc.exe" "/scannow" /admin \ No newline at end of file diff --git a/Repairs/Shortcut Cleaner (Testing).cmd b/Repairs/Shortcut Cleaner (Testing).cmd new file mode 100644 index 00000000..9468765a --- /dev/null +++ b/Repairs/Shortcut Cleaner (Testing).cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin" "Shortcut Cleaner.exe" "" \ No newline at end of file diff --git a/Repairs/TDSSKiller.cmd b/Repairs/TDSSKiller.cmd new file mode 100644 index 00000000..7f8ebae3 --- /dev/null +++ b/Repairs/TDSSKiller.cmd @@ -0,0 +1,18 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:CreateQuarantineDir +set "q_dir=%systemdrive%\WK\Quarantine\TDSSKiller" +mkdir "%q_dir%">nul 2>&1 + +:WKInfo +rem Create WK\Info\YYYY-MM-DD and set path as %log_dir% +call "%~dp0\..\.bin\Scripts\wk_info.cmd" + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin" "TDSSKiller.exe" "-l %log_dir%\TDSSKiller.log -qpath %q_dir% -accepteula -accepteulaksn -dcexact -tdlfs" +rem call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin" "TDSSKiller.exe" "-l %log_dir%\TDSSKiller.log -qpath %q_dir% -accepteula -accepteulaksn -dcexact -qsus -tdlfs" \ No newline at end of file diff --git a/Reset Browsers.cmd b/Reset Browsers.cmd new file mode 100644 index 00000000..531f64ca --- /dev/null +++ b/Reset Browsers.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\.bin\Scripts\Launch.cmd" PSScript "%~dp0\.bin\Scripts" "reset_browsers.ps1" \ No newline at end of file diff --git a/SW Diagnostics.cmd b/SW Diagnostics.cmd new file mode 100644 index 00000000..b2e5020e --- /dev/null +++ b/SW Diagnostics.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\.bin\Scripts\Launch.cmd" PSScript "%~dp0\.bin\Scripts" "diagnostics.ps1" /admin \ No newline at end of file diff --git a/Uninstallers/IObit Uninstaller.cmd b/Uninstallers/IObit Uninstaller.cmd new file mode 100644 index 00000000..56836147 --- /dev/null +++ b/Uninstallers/IObit Uninstaller.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\IObitUninstaller" "IObitUninstaler.exe" "" /admin \ No newline at end of file diff --git a/Uninstallers/PC Decrapifier (Deprecated).cmd b/Uninstallers/PC Decrapifier (Deprecated).cmd new file mode 100644 index 00000000..2c8234f6 --- /dev/null +++ b/Uninstallers/PC Decrapifier (Deprecated).cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\PC Decrapifier 2.2.8" "pc-decrapifier.exe" "" \ No newline at end of file diff --git a/Uninstallers/Removal Tools.cmd b/Uninstallers/Removal Tools.cmd new file mode 100644 index 00000000..c544049b --- /dev/null +++ b/Uninstallers/Removal Tools.cmd @@ -0,0 +1,11 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +pushd "%~dp0\..\.bin\_Removal Tools" +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%windir%" "explorer.exe" "%cd%" +popd \ No newline at end of file diff --git a/Uninstallers/Revo Uninstaller.cmd b/Uninstallers/Revo Uninstaller.cmd new file mode 100644 index 00000000..30d1046d --- /dev/null +++ b/Uninstallers/Revo Uninstaller.cmd @@ -0,0 +1,9 @@ +@echo off + +:Flags +for %%f in (%*) do ( + if /i "%%f" == "/DEBUG" (@echo on) +) + +:Launch +call "%~dp0\..\.bin\Scripts\Launch.cmd" Program "%~dp0\..\.bin\Revo Uninstaller" "Revouninstaller.exe" "" \ No newline at end of file