Friday, May 6, 2011

'CODE FOR EXECUTION OF COMMAND PROMPT STATEMENTS

'CODE FOR EXECUTION OF COMMAND PROMPT STATEMENTS

Set oshell = createObject("wscript.shell")

oshell.run "cmd /k Net start > c:\services.txt"               'Creates a text file in C:\
oshell.run "cmd /k dir > c:\Dir.txt"                                    'Creates a text file in C:\

Set oshell=nothing

No comments:

Post a Comment