Log In     Register    

Help and Support
Ask a question, report a problem, request a feature...
<<  Back To Forum

Backup Windows config dat's (on login) GP script

by bobcollege on 2018/03/11 11:34:37 PM    
I've gotten frustrated by corrupted dat files for the last time. Over the years I've used tixati the dat files have corrupted on me probably 6 times every year. (Just a guess from the last years broken dat files still on my desktop...)
This is a simple login script that serves to backup the windows app data tixati folder upon login via group policy:


@echo off
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a"
set "YY=%dt:~2,2%" & set "YYYY=%dt:~0,4%" & set "MM=%dt:~4,2%" & set "DD=%dt:~6,2%"
set "HH=%dt:~8,2%" & set "Min=%dt:~10,2%" & set "Sec=%dt:~12,2%"

set "datestamp=%YYYY%%MM%%DD%%HH%%Min%"

ROBOCOPY C:\Users\<user>\AppData\Roaming\tixati\ C:\Users\<user>\AppData\Roaming\tixati_backup\%datestamp%\ /MIR /COPY:DAT /DCOPY:T  


saved as bat or cmd file into the folder:
"WINDOWS\System32\GroupPolicy\User\Scripts\Logon"
enabled by adding through local group policy editor:
User>Windows>scripts>login>add
I know there's plenty of other ways to backup these dat files (scheduled tasks, tixati's built-in scheduler, script to backup immediately prior to opening tixati, etc.) but this is the best option for me as I already have other login scripts and don't leave my computer on longer than 1-3 hours per day except weekends. Hopefully this is useful for someone else...
by Pete on 2018/03/14 06:28:16 PM    
tixati's built-in scheduler
Thanks for this information. Somehow I missed this in news.
by bobcollege on 2018/03/17 07:20:07 AM    
v2.57 3/17/2018:
"re-engineered background config-file saving, now has much smoother operation"
Well hey lookit that!




This web site is powered by Super Simple Server