[Libosinfo] [PATCH] installer, win7: Setup user avatar for desktop profile

Christophe Fergeau cfergeau at redhat.com
Mon Apr 8 08:54:20 UTC 2013


On Fri, Apr 05, 2013 at 03:24:18AM +0300, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)" <zeeshanak at gnome.org>
> 
> While I failed to find a way to setup avatar for the user we create, I
> did find this method to setup avatar for admin. Since we setup our user
> as admin, this in the end means the same as setting up user's avatar.

http://deployment.xtremeconsulting.com/2010/06/23/usertile-automation-part-1/
seems to get into details about how to do this.
user.bmp is apparently the default avatar used for users, not necessarily
the 'admin' one. It seems it can be forced to be used for all users, but
that's not what we want
http://social.technet.microsoft.com/Forums/en-US/windowsserver2008r2general/thread/55c2a47a-6503-49c0-9822-482f5b933b65/


> ---
>  data/install-scripts/windows-cmd.xml | 17 ++++++++++++++++-
>  1 file changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/data/install-scripts/windows-cmd.xml b/data/install-scripts/windows-cmd.xml
> index 3c341fc..876cf53 100644
> --- a/data/install-scripts/windows-cmd.xml
> +++ b/data/install-scripts/windows-cmd.xml
> @@ -62,15 +62,30 @@
>            </xsl:choose>
>          </xsl:template>
>  
> +        <xsl:template name="avatar-destination">
> +          <xsl:call-template name="target-disk"/>
> +          <xsl:choose>
> +            <xsl:when test="os/version < 6.0">
> +              <xsl:text>:\Documents and Settings\All Users\Application Data\Microsoft\User Account Pictures\</xsl:text>
> +              <xsl:value-of select="config/user-realname"/>
> +              <xsl:text>.bmp</xsl:text>
> +            </xsl:when>
> +            <xsl:otherwise>
> +              <xsl:text>:\ProgramData\Microsoft\User Account Pictures\user.bmp</xsl:text>
> +            </xsl:otherwise>
> +          </xsl:choose>
> +        </xsl:template>
> +
>  	<xsl:template match="/install-script-config">
>  <xsl:if test="os/version < 6.0">
>  sc config TlntSvr start= auto
>  net user <xsl:value-of select="config/user-realname"/> <xsl:text> </xsl:text> <xsl:value-of select="config/admin-password"/> /add /passwordreq:no
>  net localgroup administrators <xsl:value-of select="config/user-realname"/> /add
>  net accounts /maxpwage:unlimited
> -if not "<xsl:value-of select="config/avatar-location"/>"=="" copy "<xsl:value-of select="config/avatar-disk"/>:<xsl:value-of select="config/avatar-location"/>" "<xsl:call-template name="target-disk"/>:\Documents and Settings\All Users\Application Data\Microsoft\User Account Pictures\<xsl:value-of select="config/user-realname"/>.bmp"
>  REGEDIT /S <xsl:call-template name="script-disk"/>:\windows.reg
>  </xsl:if>
> +if not "<xsl:value-of select="config/avatar-location"/>"=="" copy "<xsl:value-of select="config/avatar-disk"/>:<xsl:value-of select="config/avatar-location"/>" "<xsl:call-template name="avatar-destination"/>
> +<xsl:text>&#xa;</xsl:text>
>  
>  <xsl:call-template name="post-install-drivers-disk"/>:
>  <xsl:if test="config/driver-signing = 'false' and os/version > 5.1">

ACK.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libosinfo/attachments/20130408/9f299880/attachment.sig>


More information about the Libosinfo mailing list