* NEW: CompressedBin folder .cbin
* This folder holds compressed versions of what was in .bin
* These files are 7-zip compressed using file + header encryption
* (This is to avoid false-positive AV alerts)
* NEW: Python conversion
* All scripts rewritten / ported to Python
* All PoSH scripts removed
* All scripts adjusted to no longer use vars as a variable
* This is because vars is a built-in function
* Also, slightly more clear as vars_wk == variables for Wizard Kit
* vars_os merged with vars_wk for since both are based on the current system
* Launch.cmd no longer uses %path% and instead directly modifies L_PATH
* fixes bug where an empty %PATH% would halt various scripts
* Copy WizardKit
* Now only copies the required folders in .bin
* Avoids potentially massive slowdowns on often-used UFDs
* Updated to support the new .cbin folder
* User Data Transfer expanded
* File-based main data selection is now done first
* Default inclusions and exclusions adjusted
* Cleanup should now unhide TransferDir
* Launch.cmd and Launchers updated
* Launch and Launcher_Template reworked to support the new .cbin method
* Launch will extract the archive (if exists) and then launch the item
* Launch.cmd now automatically reloads inside ConEmu
* Launch.cmd now runs from L_ITEM's dir in most cases
* Added L_NCMD to use the native command window instead of ConEmu
* Added PywScript mode that uses Python native console window
* Launchers are customized at the top of the files now
* FindBin and Flags functions have been moved to the end of the file
* Launchers and Launch.cmd now use more descriptive variable names
* Helps readability and troubleshooting
* Ported code from copy_office.cmd into Launch.cmd
* Office setup local folders now have better naming
* Scripts should now print details about the ENV when aborting
* Should help diagnose future breaks, typos, etc..
* Added a gen_office.bash script for creating the Office Setup Launchers
* Fixed Office variable issue (needed delayedexpansion)
* SW Diagnostics / SW Checklist
* (Re)added Kill All Processes section using ProcessKiller 2.0 from Tron
* Added Everything - dumps a file listing of the %systemdrive%
* Added Opera to the browser backup section
* AdwCleaner is no longer removed during the checklist
* HWiNFO has replaced HWMonitor due to false AMD/ATI readings
* HWiNFO is not opened until after Enter is pressed to exit the checklist
* Installed OS warnings expanded to mark many more versions as outdated
* SAS is no longer force-removed at the end of the script
* The new user data size function is reading data for all users
54 lines
No EOL
1.4 KiB
Batchfile
54 lines
No EOL
1.4 KiB
Batchfile
:: Wizard Kit: Create client_dir folder(s)
|
|
|
|
@echo off
|
|
if defined DEBUG (@echo on)
|
|
|
|
:Flags
|
|
set _backups=
|
|
set _info=
|
|
set _office=
|
|
set _quarantine=
|
|
set _transfer=
|
|
for %%f in (%*) do (
|
|
if /i "%%f" == "/DEBUG" (@echo on)
|
|
if /i "%%f" == "/Backups" set _backups=True
|
|
if /i "%%f" == "/Info" set _info=True
|
|
if /i "%%f" == "/Office" set _office=True
|
|
if /i "%%f" == "/Quarantine" set _quarantine=True
|
|
if /i "%%f" == "/Transfer" set _transfer=True
|
|
)
|
|
|
|
:GetDate
|
|
:: Credit to SS64.com Code taken from http://ss64.com/nt/syntax-getdate.html
|
|
:: Use WMIC to retrieve date and time in ISO 8601 format.
|
|
for /f "skip=1 tokens=1-6" %%G in ('WMIC Path Win32_LocalTime Get Day^,Hour^,Minute^,Month^,Second^,Year /Format:table') do (
|
|
if "%%~L"=="" goto s_done
|
|
set _yyyy=%%L
|
|
set _mm=00%%J
|
|
set _dd=00%%G
|
|
set _hour=00%%H
|
|
set _minute=00%%I
|
|
)
|
|
:s_done
|
|
:: Pad digits with leading zeros
|
|
set _mm=%_mm:~-2%
|
|
set _dd=%_dd:~-2%
|
|
set _hour=%_hour:~-2%
|
|
set _minute=%_minute:~-2%
|
|
set iso_date=%_yyyy%-%_mm%-%_dd%
|
|
|
|
:SetVariables
|
|
set "client_dir=%systemdrive%\WK"
|
|
set "log_dir=%client_dir%\Info\%iso_date%"
|
|
|
|
:CreateDirs
|
|
if defined _backups mkdir "%client_dir%\Backups">nul 2>&1
|
|
if defined _info mkdir "%client_dir%\Info">nul 2>&1
|
|
if defined _office mkdir "%client_dir%\Office">nul 2>&1
|
|
if defined _quarantine mkdir "%client_dir%\Quarantine">nul 2>&1
|
|
if defined _transfer mkdir "%client_dir%\Transfer">nul 2>&1
|
|
|
|
:Done
|
|
goto Exit
|
|
|
|
:Exit |