System Brand Changer v1.2.1

Discussion in 'MDL Projects and Applications' started by Alphawaves, Aug 7, 2012.

Thread Status:
Not open for further replies.
  1. Boyfriend

    Boyfriend MDL Senior Member

    Feb 10, 2010
    362
    112
    10
    Thanks Alphawaves for amazing utility :) It works nice here...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Doctor_Spam

    Doctor_Spam MDL Novice

    Apr 4, 2012
    11
    3
    0
    all I need is the reg key really but for others to start learning it might be a good starting point
     
  3. Alphawaves

    Alphawaves Super Moderator/Developer
    Staff Member

    Aug 11, 2008
    6,160
    21,854
    210
    Hi, this does not touch the registry at all. Its direct image replacement.. ;)
     
  4. Doctor_Spam

    Doctor_Spam MDL Novice

    Apr 4, 2012
    11
    3
    0
    I see now what file does it mod? and what offset if your using a filestream or what? just installed sharp develop so code would help me learn just a little bit more :D
     
  5. Jessica Alba

    Jessica Alba MDL Expert

    Jul 26, 2009
    1,082
    2,189
    60
    i got a laptop, i think onboard video card may use some of the ram.
     
  6. Jessica Alba

    Jessica Alba MDL Expert

    Jul 26, 2009
    1,082
    2,189
    60
    edit: damn double post by mistake :(
     
  7. Alphawaves

    Alphawaves Super Moderator/Developer
    Staff Member

    Aug 11, 2008
    6,160
    21,854
    210
    #29 Alphawaves, Aug 8, 2012
    Last edited by a moderator: Apr 20, 2017
    (OP)
    shellbrd.dll, Bitmap image: 1050, 2050, 3050

    An example of its usage:

    Code:
            [DllImport("kernel32.dll", SetLastError = true)]
            public static extern IntPtr LoadResource(IntPtr hModule, IntPtr hResInfo);
            [DllImport("kernel32.dll", SetLastError = true)]
            public static extern IntPtr BeginUpdateResource(string pFileName,
            [MarshalAs(UnmanagedType.Bool)]bool bDeleteExistingResources);
            [DllImport("kernel32.dll", SetLastError = true)]
            public static extern bool UpdateResource(IntPtr hUpdate, uint lpType, uint lpName, uint wLanguage, byte[] lpData, uint cbData);
            [DllImport("kernel32.dll", SetLastError = true)]
            public static extern bool EndUpdateResource(IntPtr hUpdate, bool fDiscard);
            [DllImport("kernel32.dll", SetLastError = true)]
            public static extern uint SizeofResource(IntPtr hModule, IntPtr hResInfo);
            private string NewImage = Path.GetTempPath() + "\\";
            private string IDS = CultureInfo.InstalledUICulture.Name;
            private string windir = Environment.GetEnvironmentVariable("WINDIR");
            private const uint BitMap = 0x2;
            private int id = 0;
            private int[,] imageID = new int[,] { 
                { 1050 },
                { 2050 },
                { 3050 }          
            };
    
            private string SourceFile(string IMAGES)
            {
                string TempDir = NewImage;
                string IMAGE = "";
                {
                    IMAGE = "My image";
                }
                return TempDir + IMAGE;
            }
    
    USAGE:
    
    foreach (uint IMAGE in imageID)
                    {
                        byte[] IMG = File.ReadAllBytes(SourceFile(IMAGE.ToString()));
                        byte[] RES = new byte[IMG.Length - 14];
                        id = CultureInfo.GetCultureInfoByIetfLanguageTag(IDS).LCID;
                        Buffer.BlockCopy(IMG, 14, RES, 0, RES.Length);
                        IntPtr ipTarget = BeginUpdateResource(windir + "\\Branding\\ShellBrd\\shellbrd.dll", false);
                        if (UpdateResource(ipTarget, BitMap, IMAGE, Convert.ToUInt32(id), RES, (uint)RES.Length))
                        {
                            EndUpdateResource(ipTarget, false);
                        }
                    }
     
  8. Doctor_Spam

    Doctor_Spam MDL Novice

    Apr 4, 2012
    11
    3
    0
    #30 Doctor_Spam, Aug 8, 2012
    Last edited by a moderator: Apr 20, 2017
    got it but I don't like CS :p ill do something in VB and show what I come up with.. ill do the drag and drop stuff should be nice
     
  9. Tito

    Tito Super Mod / Adviser
    Staff Member

    Nov 30, 2009
    17,742
    16,120
    340
  10. UVAIS

    UVAIS MDL Expert

    Mar 17, 2011
    1,333
    1,894
    60
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. Alphawaves

    Alphawaves Super Moderator/Developer
    Staff Member

    Aug 11, 2008
    6,160
    21,854
    210
    Update:

    Changelog 1.3:
    Added silent mode switches for commandline usage
    Updated GUI
     
  12. luky

    luky MDL Addicted

    Dec 21, 2008
    732
    33
    30
    How do you install? Thank you
     
  13. Alphawaves

    Alphawaves Super Moderator/Developer
    Staff Member

    Aug 11, 2008
    6,160
    21,854
    210
    #36 Alphawaves, Aug 9, 2012
    Last edited by a moderator: Apr 20, 2017
    (OP)
    @ luky, its a portable app (no installation) ;)

    Update:

    Code:
    Changelog 1.4:
    Updated silent mode switches
    Added restore switch
     
  14. huryiw

    huryiw MDL Novice

    Jul 22, 2011
    5
    1
    0
    Awesome Tool...

    Thanks, dude... :hug2:
     
  15. Josh Cell

    Josh Cell MDL Developer

    Jan 8, 2011
    3,515
    7,150
    120
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. melwin

    melwin MDL Novice

    Apr 4, 2012
    27
    7
    0
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. liverpal

    liverpal MDL Novice

    Nov 16, 2012
    9
    1
    0
    please help, I got CLR20r3 error!

    Win 7 x86