Assuming you understand the security implications of doing this, the code is as simple as:
set wshell = CreateObject("WScript.Shell")
wshell.run "c:pathofile.bat"
set wshell = nothing
I just ran this on a virtual instance without giving any special permissions to IUSR_* and it ran an xcopy without error or interference.
Another issue you will face is when your BAT file throws a prompt or wants to open some kind of dialog. It's really difficult to handle output, so make sure your BAT file runs without error before looking at further issues with the script.
Whether this code works in your environment is a matter of your security settings.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…