mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
better errors
This commit is contained in:
parent
9fcede47f7
commit
66ba876a65
1 changed files with 8 additions and 2 deletions
|
|
@ -86,9 +86,15 @@ func (wn *windowsNotifier) Startup(ctx context.Context, options application.Serv
|
|||
wn.exePath = exe
|
||||
|
||||
// Create the registry key for the toast activator
|
||||
key, _, _ := registry.CreateKey(registry.CURRENT_USER,
|
||||
key, _, err := registry.CreateKey(registry.CURRENT_USER,
|
||||
`Software\Classes\CLSID\`+wn.appGUID+`\LocalServer32`, registry.ALL_ACCESS)
|
||||
key.SetStringValue("", fmt.Sprintf("\"%s\" %%1", wn.exePath))
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create CLSID key: %w", err)
|
||||
}
|
||||
|
||||
if err := key.SetStringValue("", fmt.Sprintf("\"%s\" %%1", wn.exePath)); err != nil {
|
||||
return fmt.Errorf("failed to set CLSID server path: %w", err)
|
||||
}
|
||||
key.Close()
|
||||
|
||||
toast.SetAppData(toast.AppData{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue