Загрузка данных



Dim StdOut : Set StdOut = CreateObject("Scripting.FileSystemObject").GetStandardStream(1)

Dim strArgs, strCmd, strEngine, i, objDebug, wshShell

Set wshShell = CreateObject( "WScript.Shell" )

strEngine = UCase( Right( WScript.FullName, 12 ) )

If strEngine <> "\CSCRIPT.EXE" Then
	' Recreate the list of command line arguments
	strArgs = ""
	If WScript.Arguments.Count > 0 Then
		For i = 0 To WScript.Arguments.Count - 1
			strArgs = strArgs & " " & WScript.Arguments(i)
		Next
	End If

	' Create the complete command line to rerun this script in CSCRIPT
	strCmd = "CSCRIPT.EXE """ & WScript.ScriptFullName

	' Rerun the script in CSCRIPT
	Set objDebug = wshShell.Exec( strCmd )

	' Wait until the script exits
	Do While objDebug.Status = 0
		WScript.Sleep 100
	Loop

	' Exit with CSCRIPT's return code
	WScript.Quit objDebug.ExitCode
End If


Set oLocator = CreateObject("WbemScripting.SWbemLocator")
Set oServices = oLocator.ConnectServer( , "root\ccm\invagt")
wscript.sleep 3000

Set objShell = CreateObject("Wscript.Shell")
objShell.Run "control smscfgrc", 1, True
wscript.sleep 3000

Set cpApplet = CreateObject("CPAPPLET.CPAppletMgr")
Set actions = cpApplet.GetClientActions
For Each action In actions
action.PerformAction
Stdout.WriteLine action.Name
Next
Stdout.WriteLine "-----------------------------------"
Stdout.WriteLine "Actions was run at: " & Now()
Stdout.WriteLine "-----------------------------------"

Dim objResult
Set objShell = WScript.CreateObject("WScript.Shell")  
Stdout.WriteLine ""
Stdout.WriteLine "(Close the window for exit)"
Stdout.Writeline ""
Stdout.Write "Progress to repeat:    "

Do While True
	For i = 1 To 100 Step 1
		objResult = objShell.sendkeys("{numlock}{numlock}")
		If 9 < i Then
			Stdout.Write Chr(8)
		End If
		Stdout.Write Chr(8) & Chr(8)
		Stdout.Write i & "%"
		Wscript.Sleep (60000)


	Next
	For Each action In actions
		action.PerformAction
		Stdout.WriteLine action.Name
	Next
	Stdout.WriteLine "-----------------------------------"
	Stdout.WriteLine "Actions was run at: " & Now()
	Stdout.WriteLine "-----------------------------------"

Loop