55 lines
1 KiB
Plaintext
55 lines
1 KiB
Plaintext
'
|
|
' Test IConfigureYourServer::ExecuteWizard
|
|
'
|
|
|
|
option explicit
|
|
|
|
|
|
|
|
// this is a Visual Basic Script "Template", used in conjunction with the
|
|
// MS Visual C++ Preprocessor to overcome some of the source management
|
|
// limitations of VBScript. Not perfect, but better than a stick in the eye.
|
|
//
|
|
// use cl /EP foo.vbt > foo.vbs to expand the template
|
|
|
|
const SCRIPT_FILENAME = "test-ExecuteWizard.vbs"
|
|
const SCRIPT_SOURCE_NAME = __FILE__
|
|
const SCRIPT_DATE = __DATE__
|
|
const SCRIPT_TIME = __TIME__
|
|
|
|
|
|
// this is all our common code.
|
|
|
|
#include "common.vbi"
|
|
|
|
|
|
|
|
Main
|
|
wscript.quit(0)
|
|
|
|
|
|
sub Main
|
|
On Error Resume Next
|
|
|
|
Dim srvwiz
|
|
Set srvwiz = CreateObject("ServerAdmin.ConfigureYourServer")
|
|
|
|
|
|
Dim services(4)
|
|
services(0) = "DNS"
|
|
services(1) = "DHCP"
|
|
services(2) = "RRAS"
|
|
services(3) = "AddPrinter"
|
|
services(4) = "AddPrinterDriver"
|
|
|
|
Dim i
|
|
Dim j
|
|
For i = 0 to Ubound(services)
|
|
Err.Clear
|
|
j = srvWiz.ExecuteWizard(services(i))
|
|
If Err.Number then DumpErrAndQuit
|
|
|
|
Echo j
|
|
Next
|
|
End sub
|