什么是「;“通知发送”;windows的等价物?

什么是「;“通知发送”;windows的等价物?,windows,batch-file,push-notification,notifications,command-prompt,Windows,Batch File,Push Notification,Notifications,Command Prompt,我想为windows 8.1/windows 10中的定期通知编写一个.bat脚本。 在windows 8.1/windows 10(cmd)中是否有类似于linux中的“通知发送”的命令?Edit 由于Windows更新,此模块现已过时且无法工作。在此转换中提出了一个工作代码: 我制作了一个“模块”,您可以将其添加到.bat文件中: :notif ::Syntaxe : call :notif "Titre" "Message" set type=I

我想为windows 8.1/windows 10中的定期通知编写一个.bat脚本。 在windows 8.1/windows 10(cmd)中是否有类似于linux中的“通知发送”的命令?

Edit

由于Windows更新,此模块现已过时且无法工作。在此转换中提出了一个工作代码:


我制作了一个“模块”,您可以将其添加到.bat文件中:

:notif
::Syntaxe : call :notif "Titre" "Message"

set type=Information
set "$Titre=%~1"
Set "$Message=%~2"

::You can replace the $Icon value by Information, error, warning and none
Set "$Icon=Information"
for /f "delims=" %%a in ('powershell -c "[reflection.assembly]::loadwithpartialname('System.Windows.Forms');[reflection.assembly]::loadwithpartialname('System.Drawing');$notify = new-object system.windows.forms.notifyicon;$notify.icon = [System.Drawing.SystemIcons]::%$Icon%;$notify.visible = $true;$notify.showballoontip(10,'%$Titre%','%$Message%',[system.windows.forms.tooltipicon]::None)"') do (set $=)

goto:eof
如何使用

它非常简单,很容易在代码中实现,并根据需要使用它。您需要做的第一步是复制并粘贴可以在.bat文件顶部读取的代码

完成后,您唯一可以休息的事情就是在.bat文件中使用以下内容:

call :notif "{The title}" "{The message}"
它将在执行时显示Windows8/10通知


警告:如您所见,有一些>”。模块需要它们工作,所以不要忘记它们。

有。

Windows中有一个
net send
命令--不确定它是否仍然存在…
msg*/server:%computername%“Hello”
msg%username%“Hello”“将通知作为警报框发出。什么是我想要它作为一个通知。例如,当我们收到邮件时,右上方弹出的蓝色东西为什么不显示任何通知@卡拉马尔卡基德,我已经编辑了我的答案。由于Windows更新更改了推送通知的行为,此代码不再工作。请查看工作代码。