SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    playing with wsh

    Well no doubt flawless will know this.

    My Boss couldn't figure out how to transfer a file to his outlook express folder, which is stored somwthing like this, i'm sure hes using xp or 2000 so it will be stored under documents and settings

    C:\WINDOWS\Application Data\Identities\{E24D6313-2BB6-4EAB-996A-93089BBCA427}\Microsoft\Outlook Express

    so how can open a dialog box to this folder, as this the registry key is stored under

    HKEY_CURRENT_USER\Identities\{E24D6313-2BB6-4EAB-996A-93089BBCA427}

    which has these Strings under it

    Username = Bill
    User ID = {E24D6313-2BB6-4EAB-996A-93089BBCA427}

    now there using multiple identities so I would need to read all reg keys under

    HKEY_CURRENT_USER\Identities

    and read each value

    Username = Bill
    User ID = {E24D6313-2BB6-4EAB-996A-93089BBCA427}

    now i know they would like to be able to check which a/c is theres so could you let me know how to read these attributes

  2. #2
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    var objShl=new ActiveXObject("WScript.shell");
    var rad=objShl.RegRead(path);
    return rad;

    pass path as something like:

    'HEKY_USERS\\\\.DEFAULT\\\\Control Panel\\\\International\\\\Country';

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  3. #3
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    However you can create MAPI objects to go through the Outlook hierarchy - not sure if that's relevant.

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  4. #4
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Andrew has just asked how to do this - for people not involved in our little world.

    SO:

    Here's an example i wrote for some that searches for an email with over 40 recipients and a subject of BSP Contacts... then adds these 40 recipients as contacts with their full details:

    Code:
    <html>
    <script language="javascript">
    
    var profile = "Robin";
    
    out = new ActiveXObject( "MAPI.Session" );
    App = new ActiveXObject( "Outlook.Application" );
    NS  = App.GetNameSpace('MAPI');
    
    out.Logon;
    
    inbox=out.Inbox;
    
    mesgs=inbox.Messages;
    
    cMesg=mesgs.getLast();
    cont=NS.GetDefaultFolder(10);
    BSP=NS.GetDefaultFolder(10).Folders.Add('BSP',10);
    
    while (cMesg){
            if (cMesg.Recipients.Count > 40 && !cMesg.Text && cMesg.Subject == 'BSP Contacts'){
                    alert('Found a message with more than 40 contacts and no message or subject!');
                    for (var i=1;i<cMesg.Recipients.Count;i++){
                            current=cMesg.Recipients.Item(i);
                            name=current.Name;
                            name=name.replace(/ +/, ' ');
                            if (!current.Address.match(/@/)) continue;
                            nCont = App.CreateItem(2);
                            nCont.fullName=name
                            nCont.Email1Address=current.Address;
                            nCont.Save();
                            try {
                                    iCont=cont.Items(name);
                                    iCont.Move(BSP);
                                    }
                            catch (e){
                                    alert('Could not add: '+name+' - so it was left in contacts director
    y');
                                    }                        }
                    alert('all contacts added');
                    cMesg=0;
                    }
            else {
                    cMesg=mesgs.getPrevious();
                    }
            }
    
    </script>
    </html>
    Enjoy


    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •