CredTask.vbs:
On Error Resume Next
strComputer = "." 'local computer
strUserName = "Domain\User" 'user name
strPassword = "Password" 'user password
strCommandLine="calc.exe"
Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objServices = objSWbemLocator.ConnectServer(strComputer, "root\CIMV2", strUserName, strPassword, Null, Null, 0)
If Err.Number <> 0 Then
WScript.Echo Err.Number & ": " & Err.Description
WScript.Quit
End If
Set objClass = objServices.Get("Win32_Process")
Res = objClass.Create(strCommandLine, Null, Null, PID)
If Res <> 0 Then
WScript.Echo "Error ru application code: " & Res
End If
Decodificador de roteiro on-line GreyMagic