Pages

Tuesday, 18 October 2011

Execute a standard DOS command.

' =============================================================
' Sub : ExecuteDosCommand
' desc : Run a single-line DOS command
' params : Command to run
' returns : void
' =============================================================
Sub ExecuteDosCommand(strCommand)

Dim objShell 

' create the shell object
Set objShell = CreateObject("WSCript.shell"

' run the command
objShell.run strCommand

' destroy the object
Set objShell = Nothing 

End Sub 'ExecuteDosCommand

0 comments:

Post a Comment