[x-post /r/TronScript]
Background
Tron is a script that "fights for the User"; basically automates a bunch of scanning/disinfection/cleanup tools on a Windows system. I got tired of running these utilities manually and decided to just script the whole thing. I hope this helps other techs and admins.
Stages of Tron:
0. Prep: rkill, ProcessKiller, TDSSKiller, registry backup, WMI repair, sysrestore clean, oldest VSS set purge
Tempclean: TempFileCleanup, CCLeaner, BleachBit, backup & clear event logs, Windows Update cache cleanup, Internet Explorer cleanup, USB device cleanup
De-bloat: remove OEM bloatware; customizable list is in \resources\stage_3_de-bloat\oem\; Metro debloat (Win8/8.1/2012 only)
Disinfect: RogueKiller, Vipre Rescue Scanner, Sophos Virus Removal Tool, Malwarebytes Anti-Malware, DISM image check (Win8/2012 only), sfc /scannow
Patch: Updates 7-Zip, Java, and Adobe Flash/Reader and disables nag/update screens (uses some of our PDQ packs); then installs any pending Windows updates
Optimize: chkdsk (if necessary), Defrag %SystemDrive% (usually C:); skipped if system drive is an SSD
Wrap-up: Email job completion report (if configured; specify SMTP settings in \resources\stage_6_wrap-up\email_report\SwithMailSettings.xml
Manual stuff: Additional tools that can't currently be automated (ComboFix, AdwCleaner, aswMBR, autoruns, etc.)
Saves a log to C:\Logs\tron.log (configurable).
Screenshots
Welcome Screen | Email Report | New version detected | Help screen | Config dump | Dry run | Disclaimer
Changelog
(full changelog on Github)
v5.0.0 (2015-03-05)
* tron.bat: Significant robustness improvement against missing files or directories. Tron now does relative path calls directly to each sub-utility rather than "walking" in and out the sub-directories in the \resources tree. Now if a file or directory is missing only that section will fail, rather than the entire script. A side benefit is it's now easier to drop a replacement Tron.bat on top of an older \resources tree without having to worry about Tron getting "off track" based on the underlying directory structure
* tron.bat: Many minor bug fixes and general script cleanup
* misc: Update many sub-tools, including smartctl.exe used for SSD detection
Download
Primary method: Download a self-extracting .exe pack from one of the mirrors:
6 | link | --- | BT Sync mirror | /u/Falkerz (HTTP mirror of the BT Sync repo)
2. Secondary method: Connect to the BT Sync repo to get fixes/updates immediately. Use the read-only key:
B3Y7W44YDGUGLHL47VRSMGBJEV4RON7IS <-- NEW KEY !!
*Make sure the settings for your Sync folder [look like this](http://i.imgur.com/CFZp4iz.png) (or [this](http://i.imgur.com/cq8Kw1m.png) on v1.3.x).*
3. Tertiary method: Connect to the SyncThing repo (testing) to get fixes/updates immediately. Instructions here
4. Quaternary method: Source code
All the code I've written is available [here on Github](https://github.com/bmrf/tron/) (Note: this doesn't include many of the utilities Tron relies on to function). If you want to see the code without downloading a big package, or want to contribute to the project, the Git page is a good place to do it.
Command-Line Support
Tron has full command-line support. All flags are optional, can be combined, and override their respective script default when used.
Usage: tron.bat [-a -c -d -e -er -gsl -m -o -p -r -sa -sb -sd -se -sp -v -x] | [-h]
Optional flags (can be combined):
-a Automatic mode (no welcome screen or prompts; implies -e)
-c Config dump (display current config. Can be used with other
flags to see what WOULD happen, but script will never execute
if this flag is used)
-d Dry run (run through script without executing any jobs)
-e Accept EULA (suppress display of disclaimer warning screen)
-er Email a report when finished. Requires you to configure SwithMailSettings.xml
-gsl Generate summary logs. These specifically list removed files and programs
-m Preserve OEM Metro apps (don't remove them)
-o Power off after running (overrides -r)
-p Preserve power settings (don't reset power settings to default)
-r Reboot automatically (auto-reboot 30 seconds after completion)
-sa Skip anti-virus scans (Sophos, Vipre, MBAM)
-sb Skip de-bloat (OEM bloatware removal; implies -m)
-sd Skip defrag (force Tron to ALWAYS skip Stage 5 defrag)
-se Skip Event Log clearing
-sp Skip patches (do not patch 7-Zip, Java Runtime, Adobe Flash or Reader)
-sw Skip Windows Updates (do not attempt to run Windows Update)
-v Verbose. Show as much output as possible. NOTE: Significantly slower!
-x Self-destruct. Tron deletes itself after running and leaves logs intact
Misc flags (must be used alone):
-h Display this help text
Integrity
checksums.txt contains SHA-256 checksums for every file and is signed with my PGP key (0x07d1490f82a211a2; pubkey included). You can use this to verify package integrity.
Please suggest modifications and fixes; community input is helpful and appreciated.
Tips: 1JP2X5Qvo3yFwcuZyNHyz8NmURmhwLeKb5
Quiet ^Professionals