PSAppDeployToolkit icon indicating copy to clipboard operation
PSAppDeployToolkit copied to clipboard

Toast Notification Image Color

Open GubbelVogel opened this issue 3 years ago • 14 comments

Hello, the display of the image file for toast notification is incorrect. The icon (a custom icon) is displaying in yellow color. The original image is in blue color. And it doesn't matter whether the "Install" or the "Uninstall" process is started. Additional, the BalloonTipTitle is not viewing correctly. Only "PSAppDeployToolkit" is viewing, not the $installTitle. Please see at screenshot.

I am using Toolkit version 3.9.2 Powershell version 5.1 is using.

ToastNotifyIcon

GubbelVogel avatar Feb 20 '23 09:02 GubbelVogel

I've experienced a similar issue, and in fact I also see the icon is different sometimes and not always the "AppDeployToolkitLogo.png" in the AppDeployToolkit subfolder folder I'm using (like it's cached somewhere and not loading the current, active PNG for the app I'm installing). So the smaller icon will sometimes appear and not appear, or show an icon from a different application I've deployed. Below, my .png is for VLC, yet its showing the icon for 7zip which is a completely different instance of the script and .png in another folder. Same script version 3.9.2, also PowerShell 5.1, Windows 11.

Icon Not Showing

rodw-wilkins avatar Feb 20 '23 13:02 rodw-wilkins

I am also seeing this exact issue with 3.9.2

cfreeman21 avatar Feb 28 '23 00:02 cfreeman21

In addition to the color issue, I also noticed that it is not possible to modify the Toast Notification header, is there any way to edit this?

I am 3.9.2 version

Screenshot at Feb 28 04-55-58

deilsoncso avatar Feb 28 '23 07:02 deilsoncso

In addition to the color issue, I also noticed that it is not possible to modify the Toast Notification header, is there any way to edit this?

I am 3.9.2 version

Screenshot at Feb 28 04-55-58

Hi deilsoncso, if you want it as a "hardcoded" string? Hardcoded is very simple: AppDeployToolkitMain.ps1, search for function Show-BalloonTip and inside this function change $toastAppID = $appDeployToolkitName to $toastAppID = "Your String here"

GubbelVogel avatar Feb 28 '23 11:02 GubbelVogel

In addition to the color issue, I also noticed that it is not possible to modify the Toast Notification header, is there any way to edit this?

I am 3.9.2 version

Screenshot at Feb 28 04-55-58

You can see my reply on a similar question here. https://github.com/PSAppDeployToolkit/PSAppDeployToolkit/issues/778#issuecomment-1444980954

In my case I edit the $appDeployToolkitName itself in AppDeployToolkitMain.ps1. Not sure which is the preferred method, might depend on your needs.

rodw-wilkins avatar Feb 28 '23 13:02 rodw-wilkins

In addition to the color issue, I also noticed that it is not possible to modify the Toast Notification header, is there any way to edit this? I am 3.9.2 version Screenshot at Feb 28 04-55-58

Hi deilsoncso, if you want it as a "hardcoded" string? Hardcoded is very simple: AppDeployToolkitMain.ps1, search for function Show-BalloonTip and inside this function change $toastAppID = $appDeployToolkitName to $toastAppID = "Your String here"

@GubbelVogel It worked, but I had to change it in "Variables" for it to work, but when running this new version through the Software Center, Toast does not appear, could it be something about permission?

deilsoncso avatar Feb 28 '23 16:02 deilsoncso

In addition to the color issue, I also noticed that it is not possible to modify the Toast Notification header, is there any way to edit this? I am 3.9.2 version Screenshot at Feb 28 04-55-58

You can see my reply on a similar question here. #778 (comment)

In my case I edit the $appDeployToolkitName itself in AppDeployToolkitMain.ps1. Not sure which is the preferred method, might depend on your needs.

Yes I did that and it worked, however when run with Software Center Toast does not appear.

deilsoncso avatar Feb 28 '23 16:02 deilsoncso

In addition to the color issue, I also noticed that it is not possible to modify the Toast Notification header, is there any way to edit this? I am 3.9.2 version Screenshot at Feb 28 04-55-58

Hi deilsoncso, if you want it as a "hardcoded" string? Hardcoded is very simple: AppDeployToolkitMain.ps1, search for function Show-BalloonTip and inside this function change $toastAppID = $appDeployToolkitName to $toastAppID = "Your String here"

@GubbelVogel It worked, but I had to change it in "Variables" for it to work, but when running this new version through the Software Center, Toast does not appear, could it be something about permission?

Hi, at me it's working with SoftwareCenter (MECM). Do you have set it up in MECM as Hidden installation? Or the other possibility is, that the Parameter $DeployMode at Deploy-Application.ps1 is set to 'Silent'?

At Deploy-Application.ps1 script, before Pre-Installation is running, you "call" the function Show-InstallationProgress? (This function calls automatically the function Show-BalloonTip)

GubbelVogel avatar Mar 01 '23 09:03 GubbelVogel

I am using a custom icon that is transparent the same size as the original and its working fine on W11 22H2 with any them dark or light.

From my end it seems to sometimes work but most times it does not. Does the toolkit have explicit image size and transparency requirements for the .png? I can preview my icons just fine outside of the toolkit but they don't always show when used for the toast notification. Sometimes it's just blank.

rodw-wilkins avatar Mar 02 '23 12:03 rodw-wilkins

I think these issues are caused by a windows caching issue, I have been playing around with new icons and now my icons will not display in the very top left of the toast notification. Copy the same script to a clean device it displays fine.

I remember playing around with the toast notification from [MVP]](https://twitter.com/mwbengtsson) and saw a similar thing. If you change the name displayed in the toast notification then its treated as a new application and the icon appears again. (or the correct icon appears) change the name on line 106 [String]$appDeployToolkitName = 'test123' and see if your icon is back to normal. Will run a proc mon and see if I can see where it caches it

ASDF-PS avatar Mar 02 '23 14:03 ASDF-PS

I think these issues are caused by a windows caching issue, I have been playing around with new icons and now my icons will not display in the very top left of the toast notification. Copy the same script to a clean device it displays fine.

I remember playing around with the toast notification from [MVP]](https://twitter.com/mwbengtsson) and saw a similar thing. If you change the name displayed in the toast notification then its treated as a new application and the icon appears again. (or the correct icon appears) change the name on line 106 [String]$appDeployToolkitName = 'test123' and see if your icon is back to normal. Will run a proc mon and see if I can see where it caches it

Thanks let me know if you find anything. I would prefer not to have to change the toolkit name for every instance of the script to ensure it loads the icon unless there is no alternative....

rodw-wilkins avatar Mar 02 '23 15:03 rodw-wilkins

Can't find it, You can reproduce the missing icon fairly easily. On a working package just rename the root package folder with something like an _ at the start, the icon will then not be present in the toast popup

ASDF-PS avatar Mar 06 '23 11:03 ASDF-PS

Can't find it, You can reproduce the missing icon fairly easily. On a working package just rename the root package folder with something like an _ at the start, the icon will then not be present in the toast popup

Thanks. However this only illustrates that it can't access the file because the expected path to it has changed, but doesn't explain why a file that is present still doesn't show/load correctly each time.

rodw-wilkins avatar Mar 06 '23 13:03 rodw-wilkins

I can't reproduce the image colour issue on Windows 11 23H2 and 24H2 targets, and as discussed above, changing toast notification names etc treats it like a new application.

Our v4 public preview is due out soon, where all this code has undergone significant refactoring. If there's still further issues there (beyond known/expected shortcomings of toast notifications), please re-open this issue or create a new one.

mjr4077au avatar Oct 14 '24 11:10 mjr4077au