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

Windows 7? #8

Open
ivanbportugal opened this issue Feb 19, 2017 · 6 comments
Open

Windows 7? #8

ivanbportugal opened this issue Feb 19, 2017 · 6 comments

Comments

@ivanbportugal
Copy link

Any chance this might be enhanced to work on Windows 7?

Unable to find type [Windows.UI.Notifications.ToastNotificationManager,Windows.UI.Notifications, ContentType=WindowsRuntime].    
At C:\Users\<user>\AppData\Local\Temp\<long-hash>.ps1:2 char:1                                       
+ [Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifi ...                                                      
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                          
    + CategoryInfo          : InvalidOperation: (Windows.UI.Noti...=WindowsRuntime:TypeName) [], RuntimeException                
    + FullyQualifiedErrorId : TypeNotFound                                                                                       
@jmshal
Copy link
Member

jmshal commented Feb 19, 2017

I'm happy to investigate getting this working with Windows 7 - however just note that the full functionality of this library is likely incompatible with some of the APIs available in Windows 7.

For instance, Windows 7 doesn't have Toast notifications, instead Balloon notifications are used - but I currently don't know how that will work, because that requires an app to add it's own tray icon. Luckily I have a spare Windows 7 license laying around, so I can do some more thorough investigating at some point.

Can't put a time-frame, or a guarantee on this - as I don't have much time right now - but it's open for anybody to pick up if they desire 😛


Edit: Also note that adding Windows 7 support will likely add support for Windows XP and Vista - but I certainly won't be going out of my way to test either of them.

@ivanbportugal
Copy link
Author

@jacobmarshall Thanks for the prompt reply. I will occasionally look into this too... Probably start by reverse engineering this Balloon Notifier

@jmshal
Copy link
Member

jmshal commented Feb 20, 2017

@jacobmarshall Thanks for the prompt reply. I will occasionally look into this too... Probably start by reverse engineering this Balloon Notifier

@ivanbportugal It looks like node-notifier uses http://www.paralint.com/projects/notifu/ to deliver notifications for Windows prior to Windows 8. But while this kind of tool would solve this issue - I'm hesitant to use external pre-compiled binaries. Especially when the same outcome could be achieved using PowerShell.

I might take a quick look tonight - depending on how quickly I can setup a Windows 7 VM, and update you in the morning as to how much effort I believe it may take. I wouldn't mind doing some major refactoring, as this tool was almost the first tool I wrote in Go, so there's probably a lot which could be improved upon.

@ivanbportugal
Copy link
Author

ivanbportugal commented Feb 20, 2017

@jacobmarshall Agreed. I'll let you know if I think of anything else 👍
Sorry for the accidental close + reopen!

@jmshal
Copy link
Member

jmshal commented Feb 20, 2017

Spent some time last night trying to install Windows 7, eventually got it working, but I ended up using Hyper-V, which I've used very little of in the past. Still need to finish setting it up (networking isn't working).

I will keep this issue updated when I know more.

@xiorcal
Copy link

xiorcal commented Jan 12, 2018

the following should work on w7 (not tested, I have no win7 available here)

[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$o = New-Object System.Windows.Forms.NotifyIcon

$o.Icon="D:\path\to\some.ico"
$o.BalloonTipIcon="Error"
$o.BalloonTipText="A file needed to complete the operation could not be found."
$o.BalloonTipTitle="File Not Found"

$o.Visible=$True
$o.ShowBalloonTip(10000)

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

3 participants