Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

Change a User Tile with Setupcomplete.cmd


  • Please log in to reply
1 reply to this topic

#1
maxXPsoft

maxXPsoft

    MSFN Master

  • Developer
  • 2,887 posts
  • OS:Windows 7 x64
  • Country: Country Flag
Not for Windows 8
This is not default tile with $OEM$

Someone asked me if you could change the user tile using the xml. Nothing there unless you use oobe.xml
I prefer not to do that so I looked and came up with this

From http://joco.name/201...-user-tile-api/
Using his code compiled to exe

using System;
using System.Runtime.InteropServices;
 
namespace FejesJoco
{
    class Program
    {
        [DllImport("shell32.dll", EntryPoint = "#262", CharSet = CharSet.Unicode, PreserveSig = false)]
        public static extern void SetUserTile(string username, int whatever, string picpath);
 
        [STAThread]
        static void Main(string[] args)
        {
            SetUserTile(args[0], 0, args[1]);
        }
    }
}

Copy and paste the above code lines in notepad.
Save the file as UTF8 and with an extention of .cs
For example Tile_replace.cs and save it on desktop

Open a command prompt on whatever directory you saved the file
Compile the code with the following command from command prompt:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\csc.exe Tile_replace.cs

You get a Tile_replace.exe I copy somewhere like DVD\sources\$OEM$\$1\Install
Copy the picture there also. .jpg or .png

Using DVD\sources\$OEM$\$$\setup\scripts\setupcomplete.cmd I do this

rem      Change User Picture
CMD /C %systemdrive%\Install\Tile_replace.exe Maxxpsoft %systemdrive%\Install\Maxxpsoft.jpg

That's it. When login screen appears my Tile is set
Attached File  0413131136-00.jpg   32.64KB   7 downloads

I'll include the compiled exe and code here

Attached Files


Edited by maxXPsoft, 13 April 2013 - 11:37 AM.

Download ++> Windows 7 + 8 Unattended DVD + App Installer + Services Disabler + Load All Button + XML Creator
Jump2Reg - Registry: - Oct 4, 2013 - Version 3.0.4 - 98, ME, NT, 2K, XP, VISTA, Seven, Windows 8+ and 32 or 64 bit

XP Unattended CD/DVD creator - Version 4.1.7
Sample xml + Setupcomplete + Add Right click .wim Windows 7 or Windows 8/8.1


How to remove advertisement from MSFN

#2
tes-com

tes-com
  • Member
  • 1 posts
  • OS:Windows 8.1 x64
  • Country: Country Flag

i used this on a windows 7 sp1 system. But Always get the error that the Tile_replace.exe is not working anymore

 

can you help me ?






1 user(s) are reading this topic

1 members, 0 guests, 0 anonymous users


    tes-com


How to remove advertisement from MSFN