Created
April 13, 2018 06:36
-
-
Save norman-bauer/c61d32bb2f34b95e6eac35180cdc47e5 to your computer and use it in GitHub Desktop.
UserAccountPicture.exe C# version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Runtime.InteropServices; | |
namespace useraccountpicture | |
{ | |
class Program | |
{ | |
[DllImport("shell32.dll", EntryPoint = "#262", CharSet = CharSet.Unicode, PreserveSig = false)] | |
public static extern void SetUserTile(string username, int notneeded, string picturefilename); | |
[STAThread] | |
static void Main(string[] args) | |
{ | |
if (args.Length == 2) | |
{ | |
SetUserTile(args[0], 0, args[1]); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment