Posted On March 31, 2019

Restore User Script

kimconnect 0 comments
blog.KimConnect.com >> Codes >> Restore User Script
echo off

SET RAR="C:\Program Files\WinRAR\RAR.EXE"

IF NOT EXIST P:\ (
NET USE P: \\WDFS1\BACKUP
)

cd %USERPROFILE%
%RAR% x -y p:\%username%\desktopstuff.rar
C:
cd %APPDATA%\MICROSOFT
MKDIR SIGNATURES
XCOPY P:\%USERNAME%\SIGNATURES SIGNATURES /E /H /Y
CD %APPDATA%\
MKDIR MOZILLA
MKDIR MOZILLA\FIREFOX
MKDIR MOZILLA\FIREFOX\PROFILES
XCOPY P:\%USERNAME%\FIREFOX MOZILLA\FIREFOX\PROFILES /E /H /Y

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

Generate an XML file from MySQL

This is a silly little snippet has been being generated by the venerable ChatGPT website…

PowerShell: How to Change Active Directory Username

$oldUsername='testUser' $newUsername='tUser' function changeUsername{ param( $oldUsername, $newUsername ) $domainName=$env:USERDNSDOMAIN $newUserPrincipleName="$newUsername@$domainName" try{ Set-ADUser $oldUsername -SamAccountName $newUsername…

How to Use Google SMTP Relay with Sendmail

Check to see if TLS is enabled:# sendmail -d0.1 -bv rootMake a certs directory:# mkdir…