AP KAY SYSTEM MEIN EROR A SAKTA SAY JO KO AP KI RAM MEIN AUR HARD DISK YA KESI HARDWARE , CARD WAGHERIA MEIN LIKAN WO BAD MEIN CLEAR KYA JA SAKTA HAY
YE EAK SECRIPT HAY
' CreateProcess.vbs
'
' Usage (using notepad as an example):
' cscript CreateProcess.vbs "notepad"
set args = WScript.Arguments
num = args.Count
if num = 0 then
Wscript.StdOut.Writeline "Usage: [CScript|WScript] CreateProcess.vbs
arguments"
WScript.Quit 1
end if
Dim sComputer 'computer name
Dim sCmdLine 'command line of the process
Dim sCurDir 'working directory of the process
Dim oProcess 'object representing the Win32_Process class
Dim oMethod 'object representing the Create method
Dim oInPar 'object representing input parameters of the method
Dim oOutPar 'object representing output parameters of the method
sComputer = "."
sCmdLine = ""
For i = 0 to num - 1
sCmdLine = sCmdLine & WScript.Arguments(i) & " "
Next
Wscript.StdOut.Writeline "sCmdLine = " & sCmdLine
'Set our current directory to where we executed the script
Set objShell = CreateObject("WScript.Shell")
sCurDir = objShell.CurrentDirectory
sCurDir = sCurDir
Wscript.StdOut.Writeline "sCurDir = " & sCurDir
Set oProcess = GetObject("winmgmts://" & sComputer & _
"/root/cimv2:Win32_Process")
Set oMethod = oProcess.Methods_("Create")
Set oInPar = oMethod.inParameters.SpawnInstance_()
oInPar.CommandLine = sCmdLine
oInPar.CurrentDirectory = sCurDir
Set oOutPar = oProcess.ExecMethod_("Create", oInPar)
If oOutPar.ReturnValue = 0 Then
WScript.Echo "Create process method completed successfully"
WScript.Echo "New Process ID is " & oOutPar.ProcessId
Else
WScript.Echo "Create process method failed"
End If
MFA site not allowed, ITDunya team
Bookmarks