Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

I do not fear computers. I fear the lack of them. -- Isaac Asimov


computers / alt.comp.os.windows-10 / red admin cmd windows taskbar running programs icon

SubjectAuthor
* red admin cmd windows taskbar running programs iconRobin Goodfellow
`* Re: red admin cmd windows taskbar running programs iconVanguardLH
 `* Re: red admin cmd windows taskbar running programs iconRobin Goodfellow
  `* Re: red admin cmd windows taskbar running programs iconRobin Goodfellow
   `- Re: red admin cmd windows taskbar running programs iconRobin Goodfellow

1
red admin cmd windows taskbar running programs icon

<sh2oar$11mu$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=54941&group=alt.comp.os.windows-10#54941

  copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!rocksolid2!i2pn.org!aioe.org!QyNH1gZR42jtWWZb/F0wpw.user.46.165.242.75.POSTED!not-for-mail
From: Ancient-of-Days@Heaven.Net (Robin Goodfellow)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: red admin cmd windows taskbar running programs icon
Date: Sun, 5 Sep 2021 15:39:09 +0000
Organization: Keeping Good Company
Message-ID: <sh2oar$11mu$1@gioia.aioe.org>
Injection-Info: gioia.aioe.org; logging-data="34526"; posting-host="QyNH1gZR42jtWWZb/F0wpw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Xnews/5.04.25
X-Notice: Filtered by postfilter v. 0.9.2
 by: Robin Goodfellow - Sun, 5 Sep 2021 15:39 UTC

How can we colorize any given running-task icon in the taskbar?

I open command windows with the "Run" command (not from a shortcut!).
I don't make shortcuts for something that is only three letters. :)

Some of those are admin windows, but most are user windows.
Each shows up as a "running task" in the taskbar.

But they all look the same in the running tasks icons in the taskbar.

Currently I open a red admin command window using the cmda.bat script
(which is appended to the sig below, and which works beautifully).

But the icon for that red admin command window is indistinguishable from any
other icon in the taskbar for running programs.

How can I change the color of the cmda.bat running icon in the taskbar?
--
@ECHO OFF

REM This is a standalone cmda.bat program
REM It opens a very visible RED command window
REM Open a new shell "Run As Administrator" (cmda.bat)
REM Type "cmda" in a Run window (instead of "cmd")
REM Based on script by foxidrive on alt.msdos.batch

SETLOCAL ENABLEEXTENSIONS

IF NOT "%~1"=="" goto :START

SET LogFile=%TEMP%\cmda.vbs"
Echo Set UAC = CreateObject("Shell.Application") >"%LogFile%"
Echo UAC.ShellExecute "%~f0", "%cd%", "", "runas", 1 >>"%LogFile%"
Start "" /MIN "%LogFile%"
goto :EOF

:START
Cmd /k "CD /D "%*" & Echo Administrator: & color 4F"
:EOF

Re: red admin cmd windows taskbar running programs icon

<1vmjfnkr38hs7.dlg@v.nguard.lh>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=54955&group=alt.comp.os.windows-10#54955

  copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: V@nguard.LH (VanguardLH)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: red admin cmd windows taskbar running programs icon
Date: Sun, 5 Sep 2021 20:53:15 -0500
Organization: Usenet Elder
Lines: 53
Message-ID: <1vmjfnkr38hs7.dlg@v.nguard.lh>
References: <sh2oar$11mu$1@gioia.aioe.org>
Reply-To: invalid@invalid.invalid
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: individual.net aVD7IyEtlec7oKX7p1vV5wzG5FJ+EHYOTpQkUEOQDHEP4hWagv
Keywords: VanguardLH VLH811
Cancel-Lock: sha1:7giSatBwYCjDGLQh5j9hY22shJc=
User-Agent: 40tude_Dialog/2.0.15.41
 by: VanguardLH - Mon, 6 Sep 2021 01:53 UTC

Robin Goodfellow <Ancient-of-Days@Heaven.Net> wrote:

> How can we colorize any given running-task icon in the taskbar?
>
> I open command windows with the "Run" command (not from a shortcut!).
> I don't make shortcuts for something that is only three letters. :)
>
> Some of those are admin windows, but most are user windows.
> Each shows up as a "running task" in the taskbar.
>
> But they all look the same in the running tasks icons in the taskbar.
>
> Currently I open a red admin command window using the cmda.bat script
> (which is appended to the sig below, and which works beautifully).
>
> But the icon for that red admin command window is indistinguishable from any
> other icon in the taskbar for running programs.
>
> How can I change the color of the cmda.bat running icon in the taskbar?

The icon shown in the Taskbar is taken from the image resources in the
executable file for the program when you run it (a default one is
specified, but there could be more than 1 image resource). If you are
asking how to make multiple running instances of the program have
different images for their taskbar buttons, you can change the icon in
the shortcut properties.

Right-click on a shortcut -> Shortcut tab -> Change icon

The default is to show you the image resources in the executable file
specified for the shortcut to run. Some programs only have 1 image
resource, and console-mode (DOS) programs often don't have any, so you
pick one. cmd.exe has just 1 image resource, so opening multiple
instances has the 1 image used in each taskbar button.

There are some other files bundled with Windows that provide image
resources, like shell32.dll, and moricons.dll. Any file with an image
resource (.exe, .dll) can be used to specify the icon source; however,
if they for software you install, those image resources disappear when
you uninstall that software.

If you don't like any that are in Windows bundled files, or in
executables you installed, you can also find .ico files online. I did
that for a weather.com icon since the icon resources in Windows didn't
work. While I could try to rely on cached icons (favicon.ico) from a
web site, periodially they seem to disappear, probably if you purge all
locally cached data when exiting the web browser.

As I recall, a shortcut cannot point at a .bat file to run it. That's a
text file that has to get fed into a command interpreter. The shortcut
has to call cmd.exe when then runs the .bat file, as in:

cmd.exe /c <path>\<batfile>

Re: red admin cmd windows taskbar running programs icon

<sh3tie$1lft$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=54956&group=alt.comp.os.windows-10#54956

  copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!aioe.org!QyNH1gZR42jtWWZb/F0wpw.user.46.165.242.75.POSTED!not-for-mail
From: Ancient-of-Days@Heaven.Net (Robin Goodfellow)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: red admin cmd windows taskbar running programs icon
Date: Mon, 6 Sep 2021 02:14:35 +0000
Organization: Keeping Good Company
Message-ID: <sh3tie$1lft$1@gioia.aioe.org>
References: <sh2oar$11mu$1@gioia.aioe.org> <1vmjfnkr38hs7.dlg@v.nguard.lh>
Injection-Info: gioia.aioe.org; logging-data="54781"; posting-host="QyNH1gZR42jtWWZb/F0wpw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Xnews/5.04.25
X-Notice: Filtered by postfilter v. 0.9.2
 by: Robin Goodfellow - Mon, 6 Sep 2021 02:14 UTC

VanguardLH <V@nguard.LH> asked
> The icon shown in the Taskbar is taken from the image resources in the
> executable file for the program when you run it (a default one is
> specified, but there could be more than 1 image resource).

Hi Vanguard,
I've written tutorials on assigning icons so I'm aware of where _all_ the
Windows icons are kept (scattered about); but you just gave me a good idea.

Maybe perhaps I can _copy_ the cmd.exe executable and then I might be able
to call one cmd.exe for the user-level command and then call a copy of that
cmd.exe for the admin level command where I would have previously set each
to different icons... (dunno if that will work yet though - need to test)...

a. User level command window "Run > cmd [enter]" ==> black taskbar icon
b. Admin level command window "Run > [shift+alt+enter] ==> red taskbar icon

Maybe I can then set the admin level cmd.exe to show a red icon in the
taskbar while the normal user level cmd.exe would show the black icon.

I'll try that. Thanks for the idea.

> If you are
> asking how to make multiple running instances of the program have
> different images for their taskbar buttons, you can change the icon in
> the shortcut properties.
> Right-click on a shortcut -> Shortcut tab -> Change icon

As I said in the OP, I'm not using shortcuts because I generally don't make
shortcuts for a 3-character command (Run > cmd).

Having said that, I'm rather familiar with shortcuts to the scheduled tasks
(yes, I wrote a tutorial on that also) which bypass the UAC prompts.

I _could_ do this with shortcuts, but I was hoping for more elegance, which
usually takes knowledge of how Windows actually works to be successful.

> The default is to show you the image resources in the executable file
> specified for the shortcut to run. Some programs only have 1 image
> resource, and console-mode (DOS) programs often don't have any, so you
> pick one. cmd.exe has just 1 image resource, so opening multiple
> instances has the 1 image used in each taskbar button.

As I said in the OP, I'm not using a shortcut for a 3-character command,
but, of course, if that's the _only_ way to do it, I'll stoop that low. :)

> There are some other files bundled with Windows that provide image
> resources, like shell32.dll, and moricons.dll. Any file with an image
> resource (.exe, .dll) can be used to specify the icon source; however,
> if they for software you install, those image resources disappear when
> you uninstall that software.

Rest assured, I've located _every_ one as I wrote tutorials on this stuff.

> If you don't like any that are in Windows bundled files, or in
> executables you installed, you can also find .ico files online. I did
> that for a weather.com icon since the icon resources in Windows didn't
> work. While I could try to rely on cached icons (favicon.ico) from a
> web site, periodially they seem to disappear, probably if you purge all
> locally cached data when exiting the web browser.

I've been making my own icons for years, where, nowadays, with Irfanview
being able to save a transparent bg ico file, it's trivial to create them.
> As I recall, a shortcut cannot point at a .bat file to run it. That's a
> text file that has to get fed into a command interpreter. The shortcut
> has to call cmd.exe when then runs the .bat file, as in:
> cmd.exe /c <path>\<batfile>

The restrictions between shortcuts to batch versus executable files is
something I habitually deal with on a case-by-case basis, and the ability to
string along "%comspec% -k" (or "%comspec% -c") commands is often used.

I have no problem stringing them together (using the "&&" syntax); but
that's not really what I'm asking here if that, in and of itself, doesn't
end up with the following:
1. When I run cmd as admin, I get a red icon in the taskbar.
2. When I run cmd as a user, I keep the normal black ion in the taskbar.

I'm almost never unsuccessful; I was just hoping someone else who knows
Windows better than I do had already solved this particular problem set.

Thanks. I'll let you know when I'm successful.

Re: red admin cmd windows taskbar running programs icon

<sh4ab7$1m86$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=54965&group=alt.comp.os.windows-10#54965

  copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!aioe.org!QyNH1gZR42jtWWZb/F0wpw.user.46.165.242.75.POSTED!not-for-mail
From: Ancient-of-Days@Heaven.Net (Robin Goodfellow)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: red admin cmd windows taskbar running programs icon
Date: Mon, 6 Sep 2021 05:52:40 +0000
Organization: Keeping Good Company
Message-ID: <sh4ab7$1m86$1@gioia.aioe.org>
References: <sh2oar$11mu$1@gioia.aioe.org> <1vmjfnkr38hs7.dlg@v.nguard.lh> <sh3tie$1lft$1@gioia.aioe.org>
Injection-Info: gioia.aioe.org; logging-data="55558"; posting-host="QyNH1gZR42jtWWZb/F0wpw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Xnews/5.04.25
X-Notice: Filtered by postfilter v. 0.9.2
 by: Robin Goodfellow - Mon, 6 Sep 2021 05:52 UTC

> Maybe perhaps I can _copy_ the cmd.exe executable and then I might be able
> to call one cmd.exe for the user-level command and then call a copy of that
> cmd.exe for the admin level command where I would have previously set each
> to different icons... (dunno if that will work yet though - need to test)...

Unfortunately, it's a little harder than I thought it would be to _replace_
the existing cmd.exe with one that has red resource icons, so I simply
document below what I tried, which failed, but the idea "may" still be
sound.

The idea is to have _two_ cmd.exe executables (exactly the same in all but
name & icon resources).

1. cmd.exe (original, with default black icon resources)
2. cmda.exe (copy of the original, with new red icon resources)

Here's what I tried (and failed so far) to do, but only because I don't
understand yet how to get past the Windows Trusted Installer permissions!

Resource Hacker 5.1.8
https://www.howtogeek.com/75983/stupid-geek-tricks-how-to-modify-the-icon-of-an-.exe-file/
http://www.angusj.com/resourcehacker/

Name: reshacker_setup.exe
Size: 4176295 bytes (4078 KiB)
SHA256: 080E97F7C198AEEAC2A172F055C09D8DA365B59B58BF6A71BDE4486D9992FF66

1. I right clicked to "Run as Administrator" the Resource Hacker
C:\Program Files (x86)\Resource Hacker\ResourceHacker.exe
2. ResourceHacker:File > Open > C:\Windows\System32\cmd.exe
Select the "Icon" folder > Action > Replace Icon
Press "Open file with new icon"
Browse to any exe, dll, res, or ico file of your choice.
C:\Windows\system32\fontview.exe > Replace > Save

Note: I could have picked _any_ file that had resources,
as later I'll create a custom icon; so any resource will do for now.

3. Drat. I can't overwrite the old cmd.exe in the System32 directory!
You need permission from Trusted Installer to make changes to this file.
https://www.drivereasy.com/knowledge/you-require-permission-from-trustedinstaller-error-fixing-guide/

In summary, my goal was to have _two_ duplicate cmd.exe files, where the
second cmda.exe differed only in name and in icon.

I have a few more ideas to try, but that's what I wanted to document
for now, before I try another approach.

Re: red admin cmd windows taskbar running programs icon

<sh4aus$1sl7$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=54967&group=alt.comp.os.windows-10#54967

  copy link   Newsgroups: alt.comp.os.windows-10 alt.msdos.batch
Path: i2pn2.org!i2pn.org!aioe.org!QyNH1gZR42jtWWZb/F0wpw.user.46.165.242.75.POSTED!not-for-mail
From: Ancient-of-Days@Heaven.Net (Robin Goodfellow)
Newsgroups: alt.comp.os.windows-10,alt.msdos.batch
Subject: Re: red admin cmd windows taskbar running programs icon
Date: Mon, 6 Sep 2021 06:03:10 +0000
Organization: Keeping Good Company
Message-ID: <sh4aus$1sl7$1@gioia.aioe.org>
References: <sh2oar$11mu$1@gioia.aioe.org> <1vmjfnkr38hs7.dlg@v.nguard.lh> <sh3tie$1lft$1@gioia.aioe.org> <sh4ab7$1m86$1@gioia.aioe.org>
Injection-Info: gioia.aioe.org; logging-data="62119"; posting-host="QyNH1gZR42jtWWZb/F0wpw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Xnews/5.04.25
X-Notice: Filtered by postfilter v. 0.9.2
 by: Robin Goodfellow - Mon, 6 Sep 2021 06:03 UTC

> I have a few more ideas to try, but that's what I wanted to document
> for now, before I try another approach.

BTW, I should mention I had googled _before_ I had asked, and every one I
found failed, but I have no intention of failing in this Windows task.

1. Change icons of specific cmd windows in Windows 10
https://superuser.com/questions/1254293/change-icons-of-specific-cmd-windows-in-windows-10

2. Changing CMD/BAT icons on task bar
https://answers.microsoft.com/en-us/windows/forum/all/changing-cmdbat-icons-on-task-bar/97323ec1-7fea-4346-802c-18566e93d4a0

3. Way to change icon for individual cmd file?
https://icofx.ro/forum/viewtopic.php?f=3&t=934

What I'll try next is just changing the _copy_ of cmd.exe (instead of
changing the original cmd.exe, which I hadn't known was going to be so well
protected by Windows as I had never tried to change its resources before).

This is basically what I'll try next:
a. Make a copy of cmd.exe
b. Change the icon resources of _that_ copy.
c. Use that modified cmd.exe for the red icon in the task bar

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor