Jump to content

Outlook Express Unattended


Recommended Posts

hi MHz

for some reason the "to find the Store Root" code doesent create a reg file

is this correct?

btw, nice to see you again :)

Hi SixPack,

Always nice to see a friend.

The script does not make reg files. It's purpose is to locate the store folders from registry, and copy the *.dbx files there.

The 40kb backup program, that I supplied a link to, copies the *dbx and exports the reg files, to a chosen folder. So then you can script the process.

Given time. I maybe able to create a full solution. Should do the address book too?

@Oleg_II

That link looks like a good option.

yes that would be nice if it does the WAB book too

o... i did play around with your code and this one copy's the dbx files from the store:

#NoTrayIcon
If Not FileExists(@ScriptDir & '\mail') Then
DirCreate(@ScriptDir & '\mail')
EndIf

Opt('ExpandEnvStrings', 1)
$key = RegRead('HKEY_CURRENT_USER\Identities', 'Default User ID')
$value = RegRead('HKEY_CURRENT_USER\Identities\' & $key & '\Software\Microsoft\Outlook Express\5.0', 'Store Root')
FileCopy($value, @ScriptDir & '\mail\*.dbx', 1)
Exit

:)

Link to comment
Share on other sites


Looks very good Sixpack. I would probably remove the *.dbx, from the FileCopy() function.

I tried earlier with the reg entries to Virtual PC. Seems like the ID should be replaced with the one in registry. Perhaps a StringReplace, on the reg files, but the entries still seem to work.

Busy with CMenu project, currently. Will look into this later.

You can also use that program, to get the files?

Edit: On second look.

FileCopy($value & '*.dbx', @ScriptDir & '\mail\', 1)

That looks better? The reg entry also contains a trialing backslash.

Edited by MHz
Link to comment
Share on other sites

Thanks you guys for posting. For starters, I'll try the thing that MAVERICKS CHOICE wrote as it seems very interesting.

If you DL his latest release & follow the backup options this Autoit script will run the restore. you just need to alter the paths of course.
Could you point in the right direction to find this "latest release" MAVERICKS CHOICE?
If you also want to add all your e-mail database you can make a self extracting archive from it and unzip/unrar to the right folder directly from CD.
Where exactly is this "right" folder?
Link to comment
Share on other sites

Thanks you guys for posting. For starters, I'll try the thing that MAVERICKS CHOICE wrote as it seems very interesting.
If you DL his latest release & follow the backup options this Autoit script will run the restore. you just need to alter the paths of course.
Could you point in the right direction to find this "latest release" MAVERICKS CHOICE?
If you also want to add all your e-mail database you can make a self extracting archive from it and unzip/unrar to the right folder directly from CD.
Where exactly is this "right" folder?

@Marthax

Here is the link Fabs Autobackup_win

Just remember to follow his guide, quite simple. Once youve backed up what you require you can automate the restore option by the cmd line or alter the autoit script in my earlier posting. You can follow Fabs plugin on the 911cd forums.

Goodluck :yes:

Link to comment
Share on other sites

Simply 100% AutoIt.

If $CMDLine[0] = 1 Then
   If $CMDLine[1] = '/backup' Then
       RunWait('Reg.exe export "HKCU\Identities" Indentities.reg', @ScriptDir, @SW_HIDE)
       RunWait('Reg.exe export "HKCU\Software\Microsoft\Internet Account Manager" Internet_Account_Manager.reg"', @ScriptDir, @SW_HIDE)
       RunWait('Reg.exe export "HKCU\Software\Microsoft\Outlook Express" Outlook_Express.reg"', @ScriptDir, @SW_HIDE)
       RunWait('Reg.exe export "HKCU\Software\Microsoft\WAB\WAB4" AddressBook.reg"', @ScriptDir, @SW_HIDE)
       $user_id = RegRead('HKCU\Identities', 'Default User ID')
       $store_root = RegRead('HKCU\Identities\' & $user_id & '\Software\Microsoft\Outlook Express\5.0', 'Store Root')
       $store_root = StringReplace($store_root, '%userprofile%', '')
       FileChangeDir(@UserProfileDir & $store_root)
       FileCopy('*.dbx', @ScriptDir & '\')
       $wab_file = RegRead('HKCU\Software\Microsoft\WAB\WAB4\Wab File Name', '')
       FileCopy($wab_file, @ScriptDir & '\')
   ElseIf $CMDLine[1] = '/restore' Then
       RegDelete('HKCU\Identities')
       If Not @error Then
           RunWait('Reg.exe import Indentities.reg', @ScriptDir, @SW_HIDE)
       EndIf
       RegDelete('HKCU\Software\Microsoft\Internet Account Manager')
       If Not @error Then
           RunWait('Reg.exe import Internet_Account_Manager.reg', @ScriptDir, @SW_HIDE)
       EndIf
       RegDelete('HKCU\Software\Microsoft\Outlook Express')
       If Not @error Then
           RunWait('Reg.exe import Outlook_Express.reg', @ScriptDir, @SW_HIDE)
       EndIf
       RegDelete('HKCU\Software\Microsoft\WAB\WAB4')
       If Not @error Then
           RunWait('Reg.exe import AddressBook.reg', @ScriptDir, @SW_HIDE)
       EndIf
   EndIf
   $user_id = RegRead('HKCU\Identities', 'Default User ID')
   $store_root = RegRead('HKCU\Identities\' & $user_id & '\Software\Microsoft\Outlook Express\5.0', 'Store Root')
   $store_root = StringReplace($store_root, '%userprofile%', '')
   DirCreate(@UserProfileDir & $store_root)
   FileCopy(@ScriptDir & '\*.dbx', @UserProfileDir & $store_root, 1)
   $wab_file = RegRead('HKCU\Software\Microsoft\WAB\WAB4\Wab File Name', '')
   $count = StringInStr($wab_file, '\', 0, -1)
   $wab_file = StringLeft($wab_file, $count)
   FileCopy(@ScriptDir & '\*.wab', $wab_file, 1)
EndIf

This will do the registry entries, *.dbx files and address book, saved and restored from the current run directory.

Accepts /backup, to backup files to current directory.

Accepts /restore, to restore reg files, *.dbx files and the address book.

Just compile it with AutoIt, and use the switches, as mentioned.

Link to comment
Share on other sites

Will it backup adress books, mails & profile settings? And I assume that all files will be placed in the same folder as this script.

It will backup your address book, restore registry settings. Everything works from the current directory, that it is executed from. Keep it all in one folder.

Edited by MHz
Link to comment
Share on other sites

Ok, then I just gotta figure out a way to backup all emails and to restore them. That Autobackup programs seems to be able to do the job, but it also copies profiles settings at the same time which means that if I used that program and this AutoIT script that you have provided me MHz, it would do the same thing twice. I'll probably just create a AutoIT script that backups all emails.

Link to comment
Share on other sites

Ok, then I just gotta figure out a way to backup all emails and to restore them. That Autobackup programs seems to be able to do the job, but it also copies profiles settings at the same time which means that if I used that program and this AutoIT script that you have provided me MHz, it would do the same thing twice. I'll probably just create a AutoIT script that backups all emails.

Why both? The script that I have shown, does the dbx files (that is your emails)

Compile it, and run it with YourCompiledName.exe /backup. You will see all the files that it can backup. Remove the dbx files, if you do not want to restore them.

To restore, just use YourCompiledName.exe /restore

Link to comment
Share on other sites

Oh, I'm sorry MHz :P. I'm learning the backup process of Outlook Express so this was a new thing for me. Didn't know that the *.dbx files are the ones that store the emails, but now I know. I'll do it as soon as I can. Thanks a lot for clearing that out for me :D

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...