Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clicking the button can launch a specific application. #243

Open
Qu-Ling opened this issue Jan 18, 2025 · 0 comments
Open

Clicking the button can launch a specific application. #243

Qu-Ling opened this issue Jan 18, 2025 · 0 comments
Assignees

Comments

@Qu-Ling
Copy link

Qu-Ling commented Jan 18, 2025

Cause

I started using BurntToast just a few days ago, and I’m a beginner with PowerShell.
I want to create a Toast notification with a custom button that launches an application or a link when clicked:

$button = New-BTButton -Content "start" -Arguments "C:\Users\quling\Documents\StarRail.exe.lnk" 

New-BurntToastNotification -Text "Start" -Button $button

After running the script, I found that it didn’t work. However, when I replaced "C:\Users\quling\Documents\StarRail.exe.lnk" with "https://www.bing.com", it worked and opened the link successfully.

After checking the documentation, I thought the issue might be related to the -ActivationType parameter. So, I modified the script as follows:

$button = New-BTButton -Content "start" -Arguments "C:\Users\quling\Documents\StarRail.exe.lnk" -ActivationType Foreground 

New-BurntToastNotification -Text "Start" -Button $button

But it still doesn't work; the button behaves just like New-BTButton -Dismiss. What should I do?

@Qu-Ling Qu-Ling changed the title [Feature Request Summary]Clicking the button can launch a specific application. Clicking the button can launch a specific application. Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants