windows上任务完成后发个通知
- 在cmd脚本里面添加如下命令:
REM timeout 6000 /NOBREAK
set CMD=robocopy z:work\xxx\ %USERPROFILE%\Desktop\ aaa.img bbb.img /v /z /it /im /is
CALL %CMD%
echo.
start powershell -NoProfile -NonInteractive -WindowStyle Hidden -Command [Reflection.Assembly]::LoadWithPartialName("""System.Windows.Forms""");$obj=New-Object Windows.Forms.NotifyIcon;$obj.Icon = [drawing.icon]::ExtractAssociatedIcon($PSHOME + """\powershell.exe""");$obj.Visible = $True;$obj.ShowBalloonTip(100000, """%~nx0 done""","""To execute command fastboot reboot""",2)>nul
pause
exit/b
- 弹出通知框
start msg %USERNAME% what's happening