WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: morenos1 on July 10, 2015, 11:53:35 AM

Title: Neat trick.
Post by: morenos1 on July 10, 2015, 11:53:35 AM
This is a neat trick to display the computer name on the Task Bar (for support time)...

http://www.nextofwindows.com/tip-easily-show-computer-name-in-the-taskbar-in-3-steps-in-windows-7/#comments

I am just trying to find the way to apply it to a high number of machines.

Looking for ideas on how to do it via WinBatch ......
Title: Re: Neat trick.
Post by: td on July 13, 2015, 07:01:22 AM
There might be a better way but if I were to do this in a WIL script, I would use WinBatch CLR hosting (dotNet) and create a c# in memory assembly that uses COM interop to call the appropriate shell COM interfaces.  The resulting class could then be called to accomplish the task.

With a sufficiently well crafted search string passed to your search engine of choice, you should be able to find the c# code already written. So all you should need is the bit to compile the code on the fly, which can be found in the Tech Database and a basic understanding of how to use dotNet classes in your WIL scripts.

At least, that is the theory. 
Title: Re: Neat trick.
Post by: JTaylor on July 13, 2015, 08:16:43 AM
Have you looked at BGInfo?  It has a taskbar switch and will do what you want plus more.

Jim
Title: Re: Neat trick.
Post by: td on July 13, 2015, 09:18:09 AM
Certainly, fits the definition of 'easier'.
Title: Re: Neat trick.
Post by: DAG_P6 on July 13, 2015, 01:33:06 PM
Jim,

Quote from: JTaylor on July 13, 2015, 08:16:43 AM
Have you looked at BGInfo?  It has a taskbar switch and will do what you want plus more.

I've known about BGInfo for years, but I was unaware that it could display messages in the taskbar. In a heartbeat, I would use it on my desktop,, except that the information I had at the time indicated that it needed to usurp your wallpaper. The last time I looked into it, which has been a few years, it still had the same requirement.
Title: Re: Neat trick.
Post by: JTaylor on July 13, 2015, 02:09:49 PM
Using that switch puts an icon in the SystemTray and pops-up the info when you click on it.  Don't know if that will do what the OP needs but thought it might be worth mentioning.

Jim
Title: Re: Neat trick.
Post by: DAG_P6 on July 15, 2015, 03:46:55 PM
Jim,

Quote from: JTaylor on July 13, 2015, 02:09:49 PM
Using that switch puts an icon in the SystemTray and pops-up the info when you click on it.  Don't know if that will do what the OP needs but thought it might be worth mentioning.

IMO, that is much more useful than embedding it into a bitmap file that becomes the wallpaper, especially if such items as the free space on each HDD that are subject to change without notice are computed when you click the balloon.