Windows Vista Forums

Programmatically setting user picture
  1. #1


    Alex Lomas Guest

    Programmatically setting user picture

    Hi there,

    I want to set the little display picture you see on the start menu and
    logon screen via a logon script (or similar).

    I can't really work out how to do this - it seems quite complicated. I
    can see a .bmp file is created in C:\Users\%username%\Local Settings
    \temp (filename domain+username.bmp) and also a .dat file in C:
    \ProgramData\microsoft\User Account Pictures

    The .dat file is always 32KB in size and isn't a .bmp in disguise, but
    the last few octets of the file refer to the the file path that the
    picture originally looked at. Process monitor seems to imply
    imgres.dll is involved along the line, but this is really beyond my
    experience now!

    Does anyone have any 'official' way of setting this?



    Cheers,

    Alex


      My System SpecsSystem Spec

  2. #2


    Mike Brannigan Guest

    Re: Programmatically setting user picture

    "Alex Lomas" <alexlomas@xxxxxx> wrote in message
    news:1193761843.499891.116080@xxxxxx

    > Hi there,
    >
    > I want to set the little display picture you see on the start menu and
    > logon screen via a logon script (or similar).
    >
    > I can't really work out how to do this - it seems quite complicated. I
    > can see a .bmp file is created in C:\Users\%username%\Local Settings
    > \temp (filename domain+username.bmp) and also a .dat file in C:
    > \ProgramData\microsoft\User Account Pictures
    >
    > The .dat file is always 32KB in size and isn't a .bmp in disguise, but
    > the last few octets of the file refer to the the file path that the
    > picture originally looked at. Process monitor seems to imply
    > imgres.dll is involved along the line, but this is really beyond my
    > experience now!
    >
    > Does anyone have any 'official' way of setting this?
    >
    > Cheers,
    >
    > Alex
    >
    What would be the point of altering a picture by login script which will
    fire after a user has logged on ?

    --

    Mike Brannigan


      My System SpecsSystem Spec

  3. #3


    Alex Lomas Guest

    Re: Programmatically setting user picture

    On Oct 30, 5:46 pm, "Mike Brannigan" <Mike.Brannigan@xxxxxx> wrote:

    > "Alex Lomas" <alexlo...@xxxxxx> wrote in message
    >
    > news:1193761843.499891.116080@xxxxxx
    >
    >
    >
    >
    >

    > > Hi there,
    >

    > > I want to set the little display picture you see on the start menu and
    > > logon screen via a logon script (or similar).
    >

    > > I can't really work out how to do this - it seems quite complicated. I
    > > can see a .bmp file is created in C:\Users\%username%\Local Settings
    > > \temp (filename domain+username.bmp) and also a .dat file in C:
    > > \ProgramData\microsoft\User Account Pictures
    >

    > > The .dat file is always 32KB in size and isn't a .bmp in disguise, but
    > > the last few octets of the file refer to the the file path that the
    > > picture originally looked at. Process monitor seems to imply
    > > imgres.dll is involved along the line, but this is really beyond my
    > > experience now!
    >

    > > Does anyone have any 'official' way of setting this?
    >

    > > Cheers,
    >

    > > Alex
    >
    > What would be the point of altering a picture by login script which will
    > fire after a user has logged on ?
    >
    > --
    >
    > Mike Brannigan- Hide quoted text -
    >
    > - Show quoted text -
    Then it will be set for future logons (but logon script was just one
    example mechanism, it doesn't matter where it runs, just whether it's
    possible or not).


      My System SpecsSystem Spec

Programmatically setting user picture problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Enable User to Re-Order Programmatically Created Buttons on Form? Patrick A .NET General 0 05 Nov 2009
Setting Output Cacheability Programmatically is Not Working - In Custom Handler Jordan S. .NET General 0 22 May 2008
Setting User Picture Bob Vista account administration 3 19 Mar 2008
How to chage the default setting for saving a picture in my own fo smarty Vista music pictures video 1 13 Mar 2008
Finding user's Contacts folder programmatically Skip Bremer Vista file management 1 11 May 2007