Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Newsgroups > Vista account administration

Vista - Programmatically setting user picture

Reply
 
Old 10-30-2007   #1 (permalink)
Alex Lomas


 
 

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
Old 10-30-2007   #2 (permalink)
Mike Brannigan


 
 

Re: Programmatically setting user picture

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

> 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
Old 10-31-2007   #3 (permalink)
Alex Lomas


 
 

Re: Programmatically setting user picture

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

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

> > Hi there,
>
Quote:

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

> > 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
>
Quote:

> > 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!
>
Quote:

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

> > Cheers,
>
Quote:

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

Thread Tools


Similar Threads
Thread Forum
User Picture Live Mail
Setting Output Cacheability Programmatically is Not Working - In Custom Handler .NET General
Setting User Picture Vista account administration
How to chage the default setting for saving a picture in my own fo Vista music pictures video
User picture - does it map to AD ? Vista account administration


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46