maxXPsoft Posted April 13, 2013 Share Posted April 13, 2013 (edited) Not for Windows 8This 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.xmlI prefer not to do that so I looked and came up with thisFrom http://joco.name/2010/12/06/i-discovered-the-new-windows-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 .csFor example Tile_replace.cs and save it on desktopOpen a command prompt on whatever directory you saved the fileCompile the code with the following command from command prompt:C:\Windows\Microsoft.NET\Framework\v2.0.50727\csc.exe Tile_replace.cs EDIT:Use latest .NET you have for thisC:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exeYou get a Tile_replace.exe I copy somewhere like DVD\sources\$OEM$\$1\InstallCopy the picture there also. .jpg or .pngUsing DVD\sources\$OEM$\$$\setup\scripts\setupcomplete.cmd I do this rem Change User PictureCMD /C %systemdrive%\Install\Tile_replace.exe Maxxpsoft %systemdrive%\Install\Maxxpsoft.jpgThat's it. When login screen appears my Tile is setI'll include the compiled exe and code hereTile_replace.zip Edited September 24, 2014 by maxXPsoft Link to comment Share on other sites More sharing options...
tes-com Posted September 2, 2014 Share Posted September 2, 2014 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 ? Link to comment Share on other sites More sharing options...
maxXPsoft Posted September 24, 2014 Author Share Posted September 24, 2014 (edited) 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 ?I update original post Use latest .NET you have for thisC:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe works for me Edited September 24, 2014 by maxXPsoft Link to comment Share on other sites More sharing options...
MrJinje Posted September 24, 2014 Share Posted September 24, 2014 (edited) Threw that p/invoke inside an add-type so you might not need an external.exe for this trick. Add-Type -Language CSharp -TypeDefinition @"using System;using System.Runtime.InteropServices; namespace FejesJoco{ public class Program { [DllImport("shell32.dll", EntryPoint = "#262", CharSet = CharSet.Unicode, PreserveSig = false)] public static extern void SetUserTile(string username, int whatever, string picpath); [STAThread] public static void Main(string[] args) { SetUserTile(args[0], 0, args[1]); } }}"@[FejesJoco.Program]::Main("Maxxpsoft" "%systemdrive%\Install\Maxxpsoft.jpg") Edited September 24, 2014 by MrJinje Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now