Comments (6)
Update: BurntToast is working fine when invoked by an ooRexx program:
AppLogo = 'C:\Users\Fran\Documents\WindowsPowerShell\Modules\BurntToast\Images\MinistryScheduler.png'
BurntToast = "PowerShell New-BurntToastNotification"
BurntToastDebug = 'PowerShell Set-PSDebug -Trace 1; New-BurntToastNotification'
-- One string of white text on the first line, one string of regular text on second line, and image.
BurntToastDebug "-text 'Ministry Scheduler', 'Don''t forget to check for conflicts' -applogo" AppLogo
from burnttoast.
Same program as I reported working on Jun 25: (Windows 10 Pro Version 1703, BurntToast 0.6.1)
DEBUG: 1+ Set-PSDebug -Trace 1; >>>> New-BurntToastNotification -text 'Ministry Scheduler', 'Don''t forget to check
for conflicts' -applogo C:\Users\Fran\Documents\WindowsPowerShell\Modules\BurntToast\Images\MinistrySchedulerPro.ico
Security warning
Run only scripts that you trust. While scripts from the internet can be useful, this script can potentially harm your
computer. If you trust this script, use the Unblock-File cmdlet to allow the script to run without this warning
message. Do you want to run C:\Users\Fran\Documents\WindowsPowerShell\Modules\BurntToast\BurntToast.psm1?
[D] Do not run [R] Run once [S] Suspend [?] Help (default is "D"): R
DEBUG: 19+ if ( & >>>> { Set-StrictMode -Version 1; $.PSMessageDetails } )
{
DEBUG: 19+ if ( & { >>>> Set-StrictMode -Version 1; $.PSMessageDetails } )
{
DEBUG: 19+ if ( & { Set-StrictMode -Version 1; >>>> $.PSMessageDetails } )
{
DEBUG: 1+ & >>>> { Set-StrictMode -Version 1; $this.Exception.InnerException.PSMessageDetails }
DEBUG: 1+ & { >>>> Set-StrictMode -Version 1; $this.Exception.InnerException.PSMessageDetails }
DEBUG: 1+ & { Set-StrictMode -Version 1; >>>> $this.Exception.InnerException.PSMessageDetails }
DEBUG: 1+ & { Set-StrictMode -Version 1; $this.Exception.InnerException.PSMessageDetails >>>> }
DEBUG: 19+ if ( & { Set-StrictMode -Version 1; $.PSMessageDetails >>>> } )
{
DEBUG: 26+ $errorCategoryMsg = & >>>> { Set-StrictMode -Version 1;
$.ErrorCategory_Message }
DEBUG: 26+ $errorCategoryMsg = & { >>>> Set-StrictMode -Version 1;
$.ErrorCategory_Message }
DEBUG: 26+ $errorCategoryMsg = & { Set-StrictMode -Version 1; >>>>
$.ErrorCategory_Message }
DEBUG: 26+ $errorCategoryMsg = & { Set-StrictMode -Version 1;
$.ErrorCategory_Message >>>> }
DEBUG: 42+
}
DEBUG: 42+ $originInfo = & { >>>> Set-StrictMode -Version 1; $.OriginInfo
}
DEBUG: 42+
}
DEBUG: 42+ $originInfo = & { Set-StrictMode -Version 1; $.OriginInfo >>>>
}
Unable to find type [Microsoft.Toolkit.Uwp.Notifications.IToastButton].
At C:\Users\Fran\Documents\WindowsPowerShell\Modules\BurntToast\Public\New-BurntToastNotification.ps1:149 char:9
-
[Microsoft.Toolkit.Uwp.Notifications.IToastButton[]] $Button,
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: (Microsoft.Toolk...ns.IToastButton:TypeName) [], RuntimeException
- FullyQualifiedErrorId : TypeNotFound
from burnttoast.
Update: On a Windows 10 Pro Version 1607 that never had BurntToast installed I invoked Command Prompt (Admin) then PowerShell and did a PowerShell Gallery Install of BurntToast. All went well. Here is a transcript of the whole session:
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\WINDOWS\system32>powershell
Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.
PS C:\WINDOWS\system32> Install-Module -Name BurntToast
NuGet provider is required to continue
PowerShellGet requires NuGet provider version '2.8.5.201' or newer to interact with NuGet-based repositories. The NuGet
provider must be available in 'C:\Program Files\PackageManagement\ProviderAssemblies' or
'C:\Users\Fran\AppData\Local\PackageManagement\ProviderAssemblies'. You can also install the NuGet provider by running
'Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force'. Do you want PowerShellGet to install and import
the NuGet provider now?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y
Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
'PSGallery'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): A
PS C:\WINDOWS\system32> New-BurntToastNotification
New-BurntToastNotification : The 'New-BurntToastNotification' command was found in the module 'BurntToast', but the
module could not be loaded. For more information, run 'Import-Module BurntToast'.
At line:1 char:1
- New-BurntToastNotification
-
+ CategoryInfo : ObjectNotFound: (New-BurntToastNotification:String) [], CommandNotFoundException + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule
PS C:\WINDOWS\system32> Import-Module BurntToast
Import-Module : File C:\Program Files\WindowsPowerShell\Modules\BurntToast\0.6.0\BurntToast.psm1 cannot be loaded
because running scripts is disabled on this system. For more information, see about_Execution_Policies at
http://go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
- Import-Module BurntToast
-
+ CategoryInfo : SecurityError: (:) [Import-Module], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess,Microsoft.PowerShell.Commands.ImportModuleCommand
PS C:\WINDOWS\system32> set-executionpolicy remotesigned
PS C:\WINDOWS\system32> Import-Module BurntToast
PS C:\WINDOWS\system32> New-BurntToastNotification
WARNING: The AppId BurntToast is not present in the registry, please run New-BTAppId to avoid inconsistent Toast
behaviour.
PS C:\WINDOWS\system32> New-BTAppID BurnetToast
PS C:\WINDOWS\system32> New-BurntToastNotification
WARNING: The AppId BurntToast is not present in the registry, please run New-BTAppId to avoid inconsistent Toast
behaviour.
PS C:\WINDOWS\system32> New-BTAppID BurntToast
PS C:\WINDOWS\system32> New-BurntToastNotification
PS C:\WINDOWS\system32> New-BurntToastNotification -Text "Don't forget to smile!", 'Your script ran successfully, celebrate!' -AppLogo C:\smile.jpg
PS C:\WINDOWS\system32> New-BurntToastNotification -Text 'WAKE UP!' -Sound 'Alarm2' -SnoozeAndDismiss
PS C:\WINDOWS\system32>
from burnttoast.
Resolved: I think I have found the reason for my problems with BurntToast.
The PowerShell Gallery Install put BurntToast in
C:\Program Files\WindowsPowerShell\Modules
The manual install instructions say to unzip and copy to:
C:\Users[user]\Documents\WindowsPowerShell\Modules
In trying to resolve my problems I think I used BOTH install procedures.
I deleted the
C:\Users[user]\Documents\WindowsPowerShell
And then used the PowerShell Gallery Install. I did a few tests and BurntToast seems to be working well.
Note that the Smile example has -AppLogo C:\smile.jpg
This .jpg does not exist in Images folder.
from burnttoast.
I wonder if the manual install was suffering from the same issue as #21, where the DLLs were being blocked by Windows?
My understanding is that if the module is downloaded via the gallery then they aren't blocked.
If you do want the module to be located in your user profile when installing from the gallery you can do so with the Scope parameter:
Install-Module -Name BurntToast -Scope CurrentUser
from burnttoast.
I've added a note about unblocking the zip file to the README, in case that was the issue here. Preference should be to download from the Gallery (which avoids the blocking issue).
from burnttoast.
Related Issues (20)
- Toast History access and Toast removal failures on PowerShell 7.1 HOT 3
- No alert sound on multiple machines, except on the first I installed to. HOT 3
- BurntToast -AppLogo does not accept valid UNC paths to WSL locations HOT 2
- Missing documentation on the ActivatedAction parameter on Submit-BTNotification function HOT 1
- empty AppLogo as default value HOT 6
- Doc: how to enable notifications HOT 2
- Typo in Example05? HOT 1
- Toast History access failure on PowerShell 7.2.1 HOT 2
- Provide a feature to read the content of currently displayed Toast Notifications HOT 4
- [Bug]: MethodInvocationException: Exception calling "Show" with "1" argument(s): "Access is denied. HOT 1
- [Bug]: Update-BTNotification not doing its job even when verbose shows no error. HOT 5
- Replace/Remove Shipped DLLs
- Allow variable names to be displayed in the toast notification HOT 1
- character limit notification text HOT 1
- New-BurntToastNotification Button Overflow Menu HOT 1
- icon and heroImage with http-URL HOT 1
- [Bug]: Basic test script does not work HOT 5
- [Bug]: Can't set button label with New-BTButton with Update-BTNotification HOT 2
- warn not to use Windows Store PowerShell
- Easy way to register Notification App (Name and Icon)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from burnttoast.