调用通知气球消息在Windows 7从cmd? [英] call notify balloon message in windows 7 from cmd?
本文介绍了调用通知气球消息在Windows 7从cmd?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在命令提示符下用自定义文本在Windows 7中创建通知气球消息。我已搜索Google并找到了shell32。
I need to create a notification balloon message in Windows 7 from the Command prompt with custom text. I have searched Google and found shell32.
推荐答案
这可以在 Powershell :
抛出一个图标( 。 c。\\ 文件)中。
throw an icon (.ico
file) in a c:\temp
directory or point that somewhere else.
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$objBalloon = New-Object System.Windows.Forms.NotifyIcon
$objBalloon.Icon = "C:\temp\Folder.ico"
# You can use the value Info, Warning, Error
$objBalloon.BalloonTipIcon = "Info"
# Put what you want to say here for the Start of the process
$objBalloon.BalloonTipTitle = "Begin Title"
$objBalloon.BalloonTipText = "Begin Message"
$objBalloon.Visible = $True
$objBalloon.ShowBalloonTip(10000)
做一些工作
在这里填写你想说的完成过程
Do some work
Put what you want to say here for the completion of the process
$objBalloon.BalloonTipTitle = "End Title"
$objBalloon.BalloonTipText = "End Message"
$objBalloon.Visible = $True
$objBalloon.ShowBalloonTip(10000)
这篇关于调用通知气球消息在Windows 7从cmd?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文