我需要在Windows 7中使用自定义文本在命令提示符下创建通知气球消息。我搜索了Google并找到了shell32。
最佳答案
这可以在Powershell中完成:
将图标(.ico
文件)扔到c:\temp
目录中,或将其指向其他位置。
[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)
做一些工作
将您要说的内容放在此处以完成流程
$objBalloon.BalloonTipTitle = "End Title"
$objBalloon.BalloonTipText = "End Message"
$objBalloon.Visible = $True
$objBalloon.ShowBalloonTip(10000)
关于windows-7 - 调用从cmd在Windows 7中通知气球消息吗?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/6319884/