To complete a full registry backup of Windows:
- Open [regedit] via the start menu search or a RUN command
- Highlight [Computer] at the top of the tree within regedit
- Click [File] > [Export] and then save the backup somewhere safe
To complete a full registry backup of Windows:
This SQL statement creates the archive table based on any primary locations that equal ’23 Banbury Road’ or ‘Acland’, it then pulls in the data from the other reference tables.
CREATE TABLE `_archive_asset_log_verbose` AS
SELECT
`x`.`autonum`,
`x`.`barcode`,
`asset_list`.`description`,
`asset_list`.`assetgroup`,
`locations`.`priloc` as `locpriloc`,
`locations`.`secloc` as `locsecloc`,
`locations`.`terloc` as `locterloc`,
`x`.`datedue`,
`x`.`user`,
`users`.`employeename`,
`x`.`pdaid`,
`pda`.`human` as `pda#`,
`pda`.`pdauid`,
`x`.`timecreated`,
`x`.`status`,
`x`.`actiontaken`,
`x`.`actionremaining`,
`x`.`checkrqd`,
`x`.`changedesc`,
`x`.`changegroup`,
`x`.`changeloc`,
`changeloc`.`priloc` as `changepriloc`,
`changeloc`.`secloc` as `changesecloc`,
`changeloc`.`terloc` as `changeterloc`,
`x`.`ts`
FROM (((((maintenancev2.asset_log as x
LEFT JOIN `users` on `x`.`user`=`users`.`autonum`)
LEFT JOIN `pda` on `x`.`pdaid`=`pda`.`autonum`)
LEFT JOIN `asset_list` on `x`.`barcode`=`asset_list`.`barcode`)
LEFT JOIN `locations` on `asset_list`.`loc`=`locations`.`autonum`)
LEFT JOIN `locations` as `changeloc` on `x`.`changeloc`=`changeloc`.`autonum`)
where `x`.`barcode` in
(select `barcode` from `asset_list` where `loc` in
(select `autonum` from `maintenancev2`.`locations`
where ((`priloc`=’23 Banbury Road’) or `priloc`=’Acland’)
)
);
This guide uses a VB script copied from https://techniclee.wordpress.com/2013/05/09/export-outlook-folders-to-the-file-system/ as it’s basis.
The script here only copies emails from Outlook with no option for deleting the emails, for another layer of safety the deletion is left to the user to complete manually.
The script will copy all emails from a selected folder, including subfolders, into Windows and retain each email’s attachments, sender and recipient addresses along with the timestamp information relating to the email (not the creation date within Windows).
I’ve copied the edited script below for reference, thanks to the Keble IT Manager and a few of my own edits too I have a slightly improved version which handles errors better, this is available at the end of this article.
The process for importing this script to users is manual, thankfully only a handful of people require it so it’s not a huge overhead. The deployment process is:
From within Outlook:
This creates a new tab with the script loaded into a single command named “Export” on the Outlook ribbon. The script doesn’t *ever* delete mail from Outlook, it only ever copies. To use the script:
'On the next line edit the starting folder as desired. If you leave it blank, then the starting folder will be the local computer. Const STARTING_FOLDER = "" Dim objFSO As Object Sub CopyOutlookFolderToFileSystem() ExportController "Copy" End Sub 'Sub MoveOutlookFolderToFileSystem() ' ExportController "Move" 'End Sub Sub ExportController(strAction As String) Dim olkFld As Outlook.MAPIFolder, strPath As String, dest As String strPath = SelectFolder(STARTING_FOLDER) If strPath = "" Then MsgBox "You did not select a folder. Export cancelled.", vbInformation + vbOKOnly, "Export Outlook Folder" Else Set objFSO = CreateObject("Scripting.FileSystemObject") Set olkFld = Application.ActiveExplorer.CurrentFolder ExportOutlookFolder olkFld, strPath If LCase(strAction) = "move" Then olkFld.Delete Else dest = strPath & "\" & olkFld.Name MsgBox "Now check that the right number of messages and folders are in " & dest & ", then delete the folder from Outlook" End If End If Set olkFld = Nothing Set objFSO = Nothing End Sub Sub ExportOutlookFolder(ByVal olkFld As Outlook.MAPIFolder, strStartingPath As String) Dim olkSub As Outlook.MAPIFolder, olkItm As Object, strPath As String, strMyPath As String, strSubject As String, intCount As Integer, s As String, d As Date, f As String, itemlist As Outlook.items On Error Resume Next ' Set an initial date just in case first item is broken d = Date strPath = strStartingPath & "\" & olkFld.Name objFSO.CreateFolder strPath ' Folder exists If Err.Number = 58 Then Dim rc As Integer rc = MsgBox("The folder " & strPath & " already exists, proceed anyway?", vbOKCancel) If rc = 1 Then Err.Clear Else Exit Sub End If End If Set itemlist = olkFld.items itemlist.Sort "[SentOn]", False For Each olkItm In itemlist ' Start with clean slate Err.Clear s = RemoveIllegalCharacters(olkItm.Subject) If Err.Number <> 0 Then s = "[Error in subject]" Err.Clear End If f = RemoveIllegalCharacters(olkItm.SenderName) If Err.Number <> 0 Then f = "[Error in sender]" Err.Clear End If ' This may fail in very rare circumstances. It'll use the date of the previous item as we've not reset it. That's probably close enough as the items are sorted into ascending date order. d = olkItm.SentOn strSubject = "[From] " & f & " [Subject] " & s strFilename = strSubject & ".msg" intCount = 0 Do While True strMyPath = strPath & "\" & strFilename If objFSO.FileExists(strMyPath) Then intCount = intCount + 1 strFilename = strSubject & " (" & intCount & ").msg" Else Exit Do End If Loop olkItm.SaveAs strMyPath, olMSG ChangeTimeStamp strMyPath, d Next For Each olkSub In olkFld.Folders ExportOutlookFolder olkSub, strPath Next Set olkFld = Nothing Set olkItm = Nothing End Sub Function SelectFolder(varStartingFolder As Variant) As String ' This function is a modified version of the SelectFolder function written by Rob van der Woude (http://www.robvanderwoude.com/vbstech_ui_selectfolder.php) ' Standard housekeeping Dim objFolder As Object, objShell As Object ' Custom error handling On Error Resume Next ' Create a dialog object Set objShell = CreateObject("Shell.Application") Set objFolder = objShell.BrowseForFolder(0, "Select the folder you want to export to", 0, varStartingFolder) ' Return the path of the selected folder If TypeName(objFolder) <> "Nothing" Then SelectFolder = objFolder.self.Path ' Standard housekeeping Set objFolder = Nothing Set objShell = Nothing On Error GoTo 0 End Function Function RemoveIllegalCharacters(strValue As String) As String ' Purpose: Remove characters that cannot be in a filename from a string.' ' Written: 4/24/2009' ' Author: BlueDevilFan' ' Outlook: All versions' RemoveIllegalCharacters = strValue ' RemoveIllegalCharacters = LCase(RemoveIllegalCharacters) RemoveIllegalCharacters = Replace(RemoveIllegalCharacters, "<", "(") RemoveIllegalCharacters = Replace(RemoveIllegalCharacters, ">", ")") RemoveIllegalCharacters = Replace(RemoveIllegalCharacters, ":", "-") RemoveIllegalCharacters = Replace(RemoveIllegalCharacters, Chr(34), "'") RemoveIllegalCharacters = Replace(RemoveIllegalCharacters, "/", "") RemoveIllegalCharacters = Replace(RemoveIllegalCharacters, "\", "") RemoveIllegalCharacters = Replace(RemoveIllegalCharacters, "|", "") RemoveIllegalCharacters = Replace(RemoveIllegalCharacters, "?", "") RemoveIllegalCharacters = Replace(RemoveIllegalCharacters, "*", "") RemoveIllegalCharacters = Replace(RemoveIllegalCharacters, "+", "") RemoveIllegalCharacters = Replace(RemoveIllegalCharacters, "@", "_at_") RemoveIllegalCharacters = Replace(RemoveIllegalCharacters, Chr(9), "") RemoveIllegalCharacters = Replace(RemoveIllegalCharacters, "û", "u") RemoveIllegalCharacters = Replace(RemoveIllegalCharacters, "ü", "u") RemoveIllegalCharacters = Replace(RemoveIllegalCharacters, "à", "a") RemoveIllegalCharacters = Replace(RemoveIllegalCharacters, "ç", "c") RemoveIllegalCharacters = Replace(RemoveIllegalCharacters, "é", "e") RemoveIllegalCharacters = Replace(RemoveIllegalCharacters, "è", "e") RemoveIllegalCharacters = Replace(RemoveIllegalCharacters, "ê", "e") End Function Sub ChangeTimeStamp(strFile As String, datStamp As Date) Dim objShell As Object, objFolder As Object, objFolderItem As Object, varPath As Variant, varName As Variant varName = Mid(strFile, InStrRev(strFile, "\") + 1) varPath = Mid(strFile, 1, InStrRev(strFile, "\")) Set objShell = CreateObject("Shell.Application") Set objFolder = objShell.NameSpace(varPath) Set objFolderItem = objFolder.ParseName(varName) objFolderItem.ModifyDate = CStr(datStamp) Set objShell = Nothing Set objFolder = Nothing Set objFolderItem = Nothing End Sub