Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Administration > Programmatically setting user picture

Reply
Thread Tools Display Modes

Programmatically setting user picture

 
 
Alex Lomas
Guest
Posts: n/a

 
      10-30-2007
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

 
Reply With Quote
 
 
 
 
Mike Brannigan
Guest
Posts: n/a

 
      10-30-2007
"Alex Lomas" <> wrote in message
news: ups.com...
> 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

 
Reply With Quote
 
Alex Lomas
Guest
Posts: n/a

 
      10-31-2007
On Oct 30, 5:46 pm, "Mike Brannigan" <Mike.Brannigan@localhost> wrote:
> "Alex Lomas" <alexlo...@gmail.com> wrote in message
>
> news: ups.com...
>
>
>
>
>
> > 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).

 
Reply With Quote
 
Dan
Guest
Posts: n/a

 
      12-27-2007
Were you ever able to figure this out? I would like to do the same thing.

"Alex Lomas" wrote:

> On Oct 30, 5:46 pm, "Mike Brannigan" <Mike.Brannigan@localhost> wrote:
> > "Alex Lomas" <alexlo...@gmail.com> wrote in message
> >
> > news: ups.com...
> >
> >
> >
> >
> >
> > > 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).
>
>

 
Reply With Quote
 
Ronnie Vernon MVP
Guest
Posts: n/a

 
      12-29-2007
Dan

You can do this. How you do it depends on which version of Vista you are
using.

If you are using Business or Ultimate, you can use the Group Policy Editor.

Press WINKEY+R to open the Run dialog. Type gpedit.msc and press OK.
Navigate to 'Computer Configuration/Administrative Templates/Control
Panel/User Accounts'.
Double click the 'Apply the default user logon picture to all users' policy.
Click the Enabled button.
Select Apply/OK
Exit the Group Policy Editor and rebott the system.

If you want to use a customized picture for the users, read the expanation
in this policy for the instructions.

If you are using either one of the Vista Home versions, you can set this
policy in the registry.

Go to Start and type regedit.exe in the search box.
In the results, right click regedit and select the 'Run As Administrator'
option.
In the registry editor, navigate to the following key.
HKLM\Software\Microsoft\Windows\CurrentVersion\Pol icies
Right click the Policies Key and select New/Key.
Name this key Explorer.
Click the new Explorer key.
In the right side pane, right click an empty space and select New/DWord
(32bit) Value.
Rename this value to UseDefaultTile (This name must be Case Sensitive)
Double click the new UseDefaultTile value and place a 1 (one) in the Value
Data line.
Click OK.
Exit the registry editor.

--

Ronnie Vernon
Microsoft MVP
Windows Shell/User


"Dan" <> wrote in message
news:163E646B-5D5A-40C7-AE98-...
> Were you ever able to figure this out? I would like to do the same thing.
>


 
Reply With Quote
 
Dan
Guest
Posts: n/a

 
      12-30-2007
Thanks. That sort of worked, but now the picture doens't show up on the
user's start menu, only on the logon screen. The picture is blank for all
users when I go into control panel as well. When I remove this policy,
everything is fine.

Is this normal behavior? If so, how can I get around this? If not, any
suggestions?

"Ronnie Vernon MVP" wrote:

> Dan
>
> You can do this. How you do it depends on which version of Vista you are
> using.
>
> If you are using Business or Ultimate, you can use the Group Policy Editor.
>
> Press WINKEY+R to open the Run dialog. Type gpedit.msc and press OK.
> Navigate to 'Computer Configuration/Administrative Templates/Control
> Panel/User Accounts'.
> Double click the 'Apply the default user logon picture to all users' policy.
> Click the Enabled button.
> Select Apply/OK
> Exit the Group Policy Editor and rebott the system.
>
> If you want to use a customized picture for the users, read the expanation
> in this policy for the instructions.
>
> If you are using either one of the Vista Home versions, you can set this
> policy in the registry.
>
> Go to Start and type regedit.exe in the search box.
> In the results, right click regedit and select the 'Run As Administrator'
> option.
> In the registry editor, navigate to the following key.
> HKLM\Software\Microsoft\Windows\CurrentVersion\Pol icies
> Right click the Policies Key and select New/Key.
> Name this key Explorer.
> Click the new Explorer key.
> In the right side pane, right click an empty space and select New/DWord
> (32bit) Value.
> Rename this value to UseDefaultTile (This name must be Case Sensitive)
> Double click the new UseDefaultTile value and place a 1 (one) in the Value
> Data line.
> Click OK.
> Exit the registry editor.
>
> --
>
> Ronnie Vernon
> Microsoft MVP
> Windows Shell/User
>
>
> "Dan" <> wrote in message
> news:163E646B-5D5A-40C7-AE98-...
> > Were you ever able to figure this out? I would like to do the same thing.
> >

>

 
Reply With Quote
 
Ronnie Vernon MVP
Guest
Posts: n/a

 
      12-31-2007
Dan

I'm not sure what would cause this behavior, but I was able to recreate what
you are describing.

I'll try and track down a fix, keep an eye out for a response in this
thread.

--

Ronnie Vernon
Microsoft MVP
Windows Shell/User


"Dan" <> wrote in message
news:756CD3D5-F76F-4DFC-95DB-...
> Thanks. That sort of worked, but now the picture doens't show up on the
> user's start menu, only on the logon screen. The picture is blank for all
> users when I go into control panel as well. When I remove this policy,
> everything is fine.
>
> Is this normal behavior? If so, how can I get around this? If not, any
> suggestions?
>
> "Ronnie Vernon MVP" wrote:
>
>> Dan
>>
>> You can do this. How you do it depends on which version of Vista you are
>> using.
>>
>> If you are using Business or Ultimate, you can use the Group Policy
>> Editor.
>>
>> Press WINKEY+R to open the Run dialog. Type gpedit.msc and press OK.
>> Navigate to 'Computer Configuration/Administrative Templates/Control
>> Panel/User Accounts'.
>> Double click the 'Apply the default user logon picture to all users'
>> policy.
>> Click the Enabled button.
>> Select Apply/OK
>> Exit the Group Policy Editor and rebott the system.
>>
>> If you want to use a customized picture for the users, read the
>> expanation
>> in this policy for the instructions.
>>
>> If you are using either one of the Vista Home versions, you can set this
>> policy in the registry.
>>
>> Go to Start and type regedit.exe in the search box.
>> In the results, right click regedit and select the 'Run As
>> Administrator'
>> option.
>> In the registry editor, navigate to the following key.
>> HKLM\Software\Microsoft\Windows\CurrentVersion\Pol icies
>> Right click the Policies Key and select New/Key.
>> Name this key Explorer.
>> Click the new Explorer key.
>> In the right side pane, right click an empty space and select New/DWord
>> (32bit) Value.
>> Rename this value to UseDefaultTile (This name must be Case
>> Sensitive)
>> Double click the new UseDefaultTile value and place a 1 (one) in the
>> Value
>> Data line.
>> Click OK.
>> Exit the registry editor.
>>
>> --
>>
>> Ronnie Vernon
>> Microsoft MVP
>> Windows Shell/User
>>
>>
>> "Dan" <> wrote in message
>> news:163E646B-5D5A-40C7-AE98-...
>> > Were you ever able to figure this out? I would like to do the same
>> > thing.
>> >

>>


 
Reply With Quote
 
Dan
Guest
Posts: n/a

 
      12-31-2007
Thank you. It might help you to know that I'm using Vista SP1 Beta.

"Ronnie Vernon MVP" wrote:

> Dan
>
> I'm not sure what would cause this behavior, but I was able to recreate what
> you are describing.
>
> I'll try and track down a fix, keep an eye out for a response in this
> thread.
>
> --
>
> Ronnie Vernon
> Microsoft MVP
> Windows Shell/User
>
>
> "Dan" <> wrote in message
> news:756CD3D5-F76F-4DFC-95DB-...
> > Thanks. That sort of worked, but now the picture doens't show up on the
> > user's start menu, only on the logon screen. The picture is blank for all
> > users when I go into control panel as well. When I remove this policy,
> > everything is fine.
> >
> > Is this normal behavior? If so, how can I get around this? If not, any
> > suggestions?
> >
> > "Ronnie Vernon MVP" wrote:
> >
> >> Dan
> >>
> >> You can do this. How you do it depends on which version of Vista you are
> >> using.
> >>
> >> If you are using Business or Ultimate, you can use the Group Policy
> >> Editor.
> >>
> >> Press WINKEY+R to open the Run dialog. Type gpedit.msc and press OK.
> >> Navigate to 'Computer Configuration/Administrative Templates/Control
> >> Panel/User Accounts'.
> >> Double click the 'Apply the default user logon picture to all users'
> >> policy.
> >> Click the Enabled button.
> >> Select Apply/OK
> >> Exit the Group Policy Editor and rebott the system.
> >>
> >> If you want to use a customized picture for the users, read the
> >> expanation
> >> in this policy for the instructions.
> >>
> >> If you are using either one of the Vista Home versions, you can set this
> >> policy in the registry.
> >>
> >> Go to Start and type regedit.exe in the search box.
> >> In the results, right click regedit and select the 'Run As
> >> Administrator'
> >> option.
> >> In the registry editor, navigate to the following key.
> >> HKLM\Software\Microsoft\Windows\CurrentVersion\Pol icies
> >> Right click the Policies Key and select New/Key.
> >> Name this key Explorer.
> >> Click the new Explorer key.
> >> In the right side pane, right click an empty space and select New/DWord
> >> (32bit) Value.
> >> Rename this value to UseDefaultTile (This name must be Case
> >> Sensitive)
> >> Double click the new UseDefaultTile value and place a 1 (one) in the
> >> Value
> >> Data line.
> >> Click OK.
> >> Exit the registry editor.
> >>
> >> --
> >>
> >> Ronnie Vernon
> >> Microsoft MVP
> >> Windows Shell/User
> >>
> >>
> >> "Dan" <> wrote in message
> >> news:163E646B-5D5A-40C7-AE98-...
> >> > Were you ever able to figure this out? I would like to do the same
> >> > thing.
> >> >
> >>

>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
User Account Picture MasterYoda042 Windows Vista Administration 2 05-05-2010 09:45 PM
Setting User Picture Bob Windows Vista Administration 3 03-19-2008 04:16 AM
User Profile Picture Nick Windows Vista General Discussion 0 11-08-2007 05:58 PM
User picture - does it map to AD ? Keith Lawrence MCP Windows Vista Administration 0 05-02-2007 05:30 PM
User login picture designer2176 Windows Vista General Discussion 3 04-07-2007 09:17 PM



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 47 48 49 50 51 52 53 54 55 56 57 58 59