How to show a popup without a browser

2019-03-30 11:39发布

I need an "alert" type feature to troubleshoot an error. I am not using a browser and using javascript as windows administaration purposes. So is their a way to view a varibales value if I am not using a browser?

7条回答
看我几分像从前
2楼-- · 2019-03-30 12:28

A summary of the differences between WScript.Echo and WshShell.Popup:

  • Windows scripts (vbs, js, wsf etc.) can be run under one of two hosts: cscript.exe (command-line), and wscript.exe (graphical). Under cscript, WScript.Echo will produce a line of text in the console window. WshShell.Popup will always produce a message window, even under cscript.
  • WshShell.Popup lets you specify the buttons, title and icon type, like the VB/VBS MessageBox function. It also lets you specify how long the message should remain open.
  • WScript.Echo lets you pass multiple string arguments to output, and will print them separated with spaces.
查看更多
登录 后发表回答