WizardKit/.bin/Scripts/init_client_dir.cmd
Alan Mason b180b42ec9 2016-10: Retroactive Updates
# Migration to Python started #
  * PoSH has an extreme slowdown for some systems while it runs an optimization
  ** pass for .NET on the first PoSH script execution.
  ** This is reason enough to move to an alternative.

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

* ConEmu
  * Moving back to ConEmu for better performance.

* Copy-WizardKit
  * Now uses FastCopy

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

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

* transferred_keys.cmd
  * Expanded searched paths

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

53 lines
No EOL
1.4 KiB
Batchfile

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