>I have one question. What is the difference in running wscript rather than cscript when doing this? Any problem with using wscript or does it need to be cscript?
The differences mainly manifest themselves in the interactive with user.
[1] For both hosts _without_ options //b in place.
[1.1] wscript.echo
[1.1.1] On cscript, it will just display the message on the console and the execute goes on without the need of user to acknowledge whereas
[1.1.2] On wscript, user acknowledement is required.
[1.2] msgbox and inputbox functions
On both hosts, user acknowledgement is required.
[2] For both hosts _with_ options //b in place, ie, cscript.exe //b or wscript.exe //b, all display and interactive aspects of the script will be suppressed. The will be no difference execution-wise.
For a scheduled job or job executed on the server, it is a design pre-requisit to not to script in any interactive lines. For a transplant of a script which are conceived to use non-interactive adverse to be executed on the server or as a scheduled job, it would be advisable to use //b switch. If not, the second best is just to use cscript and pray that there is no msgbox/inputbox type in there without physically revising the script.
Does this answer your concern?