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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Zeeshan Ali (Khattak)" <zeeshanak@xxxxxxxxx>

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.
---
 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 &lt; 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 &lt; 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 &gt; 5.1">
-- 
1.8.1.4

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux