Jump to content

OE - Import&Export Rules


MtK

Recommended Posts

Hi,

Is there an easy (and preferably unattended) way to Import Outlook Express rules?

I know I can eport the registry entries, but they are UID related, so it cannot be imported after a new installation...

I could make a batch file for that, but I have too many rules...

what about WINNT.SIF, is it possible through there? I couldn't find any documentation about it...

any other ideas?

Link to comment
Share on other sites


or RegExp way.

output your pre-configured mailRules into $OEM$\$1\preMade.reg, and save the following script into $OEM$\$Docs\Default User\Start Menu\Programs\Startup\OE_Rules.js

var wsh = WScript.CreateObject("WScript.Shell");
var fso = WScript.CreateObject("Scripting.FileSystemObject");

var fileName = wsh.ExpandEnvironmentStrings('%SystemDrive%\\preMade.reg');

var ForReading = 1, ForWriting = 2, ForAppending = 8;
var TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0;
var f = fso.openTextFile(fileName, ForReading, false, TristateTrue);
var regRules = f.readAll();
f.close();
var Identity = wsh.regRead('HKCU\\Identities\\Default User ID');
var re = /Identities\\\{[0-9A-F\-]+\}\\Software/ig;
var result = regRules.replace(re, 'Identities\\' + Identity + '\\Software');
f = fso.openTextFile(fileName, ForWriting, false, TristateTrue);
f.write(result);
f.close();

//run REGEDIT /S %SystemDrive%\preMade.reg
wsh.exec('REGEDIT /S ' + fileName).stdOut.readAll();

//kill itself
fso.deleteFile(WScript.ScriptFullName);

this script just replace user identities inside preMade.reg with current user's, then execute REGEDIT /S %SystemDrive%\preMade.reg, then kill itself(every user run it once).

Link to comment
Share on other sites

idle.newbie

Great! As I understand your script is universal: we can save pre-configured settings nearly for everything we need with User ID and the script will apply it to ALL acounts created? I guss I even can change from you previous script for OE to the new one ;)

Regards,

Oleg 2

Link to comment
Share on other sites

idle.newbie

Didn't work for me :( The error message is:

Script: C:\OE_Rules.js

Line: 19

Char: 1

Error: Object doesn't support this property or method

Code: 800A01B6

Source: Microsoft JScript runtime error

Regards,

Oleg 2

Link to comment
Share on other sites

Configure OE however you want it, add your own rulez, change the paths to your storefolder and wab and then extract following registry keys:

[HKEY_CURRENT_USER\Identities]

[HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager]

[HKEY_CURRENT_USER\Software\Microsoft\Outlook Express]

This way all your OE settings are saved and ready for a Unattended CD

Link to comment
Share on other sites

@MtK

fso.deleteFile(WScript.ScriptFullName, true);

try force delete Read-Only file...

the kill-itself script was tricky, share-violation should happen, but every time i ran the script, it had no problem with that. i can't give you a firm answer or solution, but this tricky script do it's job for me all the time.

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...