Was a little bored so got to updating some of my old DISM command I use. Then suddenly thought it might be nice to change the icon that is in the top left of the command prompt window. Googling did not help really so I thought I'd ask here..
console windows just use the first icon in their executable as the icon (if there isn't one it just uses that ugly white "generic" icon). its hardwired into the console window host to my knowledge the only way off the top of my head that I can think of to override this would be detour (read: hijack, rootkit) conhost.exe as it starts up and rejig where it loads the icon from when it registers the console window class - would not be fun edit - might be able to do some magic with a remote thread, LoadResource and SendMessage come to think of it
Solution #1 Hi, You can change this icon ! To make it, you have to compile your bat file in exe. I use "Bat To Exe Converter" downloadable here : http://www.f2ko.de/en/b2e.php Features Extended commands Visible and invisible applications Executables with administrator priviliges Inclusion of additional files, folders, *icon* and version information Creation of 32-Bit and 64-Bit EXE files Commandline interface Portable Encryption Multilanguage support Free for commercial and non-commercial use Have fun mate !
Yep, know how to set up icons for shortcuts to .cmd, .vbs too but just wondered about the command promt window. It was just the other day I was messing about with DISM and a Win 10 image. I have my .cmd files with DISM commands on them and when run the command promt window pops up and tells me whats going on like. I like to see whats happening but thought it might be nice just to have a different icon in the command window. No big thing really.
I made a few, here is one a sample, it bases on 10.0.14393.0 cmd.exe (in Windows 10). Download, unpack, and you want, can to test. Code: [FONT=source_sans_proregular]https://mega.nz/#!tsYDCYZT!R2TB2jWLs8PPCz5gwukGJq4m8I-1NnLfsJL800LUyo0[/FONT] virustotal.com - https://virustotal.com/en/file/20d3...15d1813d488e5c829d86b5ad/analysis/1485006363/ Spoiler SHA256:20d3e8ef5c49be369e9f35afaad8aed6d0ab386915d1813d488e5c829d86b5ad File name:cmd.exe Detection ratio:0 / 55 Analysis date:2017-01-21 13:46:03 UTC
I am surprised no one has given you the correct answer. Here it is in screen grabs on Windows 7 : Spoiler Right click on Command Prompt...
Strange coincidence. This answer is not correct, but in this case, the works. It method changes only shortcut icon, but not .exe file icon.
Are you surprised or fulfilled with pride and arrogance YOU are the only one with the intelligence to solve this riddle?
Frankly I am shocked. I thought, apparently mistakenly, that MDL had intelligent users. So is that SSD working OK for you?
The opening poster was not asking to change the icon within the .exe file, which is also not that hard to do but requires some more advanced tools. But doing so would also break things like SFC. He was asking to change the icon on the command prompt window. Edit to add:
Indeed I was... When running a .cmd file as admin, mainly some DISM command I thought it would be nice if the little icon reflected DISM in some way. A custom icon of my own making perhaps. Making shortcuts have different icons I am able to do but I do thank folk for all their input. Seems too much trouble for the little reward so I recon I will let this go.