VBscript: use DOS commands

April 26, 2010 at 00:29:13
Specs: Windows 7
Is it possible for VBscript to use a DOS command ie "shutdown /s" or do you have to figure out the equivalent in VBscript ?

Pie tastes better on a Monday

See More: VBscript: use DOS commands

Report •

April 26, 2010 at 01:27:04
a couple of ways i know - i'm really dumb tho:
set x=wscript.createobject("wscript.shell")
x.run ("thiscmd.exe")
another way:
set n=x.exec("thiscmd.exe")
(i'm not sure why two methods, or the differences, but i AM
pretty sure there's two diff. ways...)

Report •
Related Solutions

Ask Question