Real Geek Forums  

Go Back   Real Geek Forums > Archives > Operating Systems > Windows Vista > Windows Vista Administration

Notices

Reply

Programmatically setting user picture

 

LinkBack Thread Tools Display Modes
Old 10-30-2007, 04:30 PM   #1 (permalink)
Default 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

Alex Lomas
Guest
 
Posts: n/a
Reply With Quote  
Old 10-30-2007, 04:46 PM   #2 (permalink)
Default Re: Programmatically setting user picture

"Alex Lomas" <alexlomas@gmail.com> wrote in message
news:1193761843.499891.116080@19g2000hsx.googlegro ups.com...
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

Mike Brannigan
Guest
 
Posts: n/a
Reply With Quote  
Old 10-31-2007, 06:39 PM   #3 (permalink)
Default Re: Programmatically setting user picture

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

Alex Lomas
Guest
 
Posts: n/a
Reply With Quote  
Old 12-27-2007, 03:56 PM   #4 (permalink)
Default Re: Programmatically setting user picture

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

"Alex Lomas" wrote:
Quote:
> On Oct 30, 5:46 pm, "Mike Brannigan" <Mike.Brannigan@localhost> wrote:
Quote:
> > "Alex Lomas" <alexlo...@gmail.com> wrote in message
> >
> > news:1193761843.499891.116080@19g2000hsx.googlegro ups.com...
> >
> >
> >
> >
> >
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).
>
>
Dan
Guest
 
Posts: n/a
Reply With Quote  
Old 12-29-2007, 02:18 AM   #5 (permalink)
Default Re: Programmatically setting user picture

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" <Dan@discussions.microsoft.com> wrote in message
news:163E646B-5D5A-40C7-AE98-41D8FA8060F6@microsoft.com...
Quote:
> Were you ever able to figure this out? I would like to do the same thing.
>
Ronnie Vernon MVP
Guest
 
Posts: n/a
Reply With Quote  
Old 12-30-2007, 04:28 PM   #6 (permalink)
Default Re: Programmatically setting user picture

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:
Quote:
> 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" <Dan@discussions.microsoft.com> wrote in message
> news:163E646B-5D5A-40C7-AE98-41D8FA8060F6@microsoft.com...
Quote:
> > Were you ever able to figure this out? I would like to do the same thing.
> >
>
Dan
Guest
 
Posts: n/a
Reply With Quote  
Old 12-31-2007, 03:02 AM   #7 (permalink)
Default Re: Programmatically setting user picture

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" <Dan@discussions.microsoft.com> wrote in message
news:756CD3D5-F76F-4DFC-95DB-9B3DBCAD1570@microsoft.com...
Quote:
> 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:
>
Quote:
>> 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" <Dan@discussions.microsoft.com> wrote in message
>> news:163E646B-5D5A-40C7-AE98-41D8FA8060F6@microsoft.com...
Quote:
>> > Were you ever able to figure this out? I would like to do the same
>> > thing.
>> >
>>
Ronnie Vernon MVP
Guest
 
Posts: n/a
Reply With Quote  
Old 12-31-2007, 04:32 PM   #8 (permalink)
Default Re: Programmatically setting user picture

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

"Ronnie Vernon MVP" wrote:
Quote:
> 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" <Dan@discussions.microsoft.com> wrote in message
> news:756CD3D5-F76F-4DFC-95DB-9B3DBCAD1570@microsoft.com...
Quote:
> > 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:
> >
Quote:
> >> 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" <Dan@discussions.microsoft.com> wrote in message
> >> news:163E646B-5D5A-40C7-AE98-41D8FA8060F6@microsoft.com...
> >> > Were you ever able to figure this out? I would like to do the same
> >> > thing.
> >> >
> >>
>
Dan
Guest
 
Posts: n/a
Reply With Quote  
Reply

Tags
None

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may 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 On


Similar Threads

Thread Thread Starter Forum Replies Last Post
DPI setting is not user specific nbrady Windows Vista Administration 2 07-06-2007 09:02 PM
User picture - does it map to AD ? Keith Lawrence MCP Windows Vista Administration 0 05-02-2007 05:30 PM
User setting forgotten MarvH Windows Vista Administration 0 03-02-2007 09:57 PM
Setting default picture editor Ken Windows XP Photos 1 11-06-2003 03:32 PM
setting default picture viewer jdm Windows XP Photos 1 09-02-2003 11:14 PM


All times are GMT. The time now is 07:32 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright © 2005 - 2007 RealGeek.com. All rights reserved.

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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90