Ok so here's teh deal i am totally new to scripting but managed to
create a script in which a prograame called pslist(a tool to log
process data) runs from a locotion on the drive and also checks a file.
This script works fine but only on local system and for local
processes.
I included in the script an input box for user to input the ip address
of the remote machine.
But i dunno how to use this Input data within my script to run pslist
with the remote machine switch.
The code is below, Please any help would be really great.
Option Explicit
Dim objFSO,Input
Dim objShell,strSysDrive
Set objShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
strSysDrive = objShell.ExpandEnvironmentStrings("%SYSTEMDRIVE%")
If objFSO.FileExists (strSysDrive & "\testfolder\ps.txt") Then
Wscript.Echo "Change the name of PSLIST log files before running
another test"
Wscript.Quit
Else
Input = InputBox("Enter the IP Address or the name of the remote
server")
objShell.Run "%comspec% /T:2E /k %systemdrive%\testfolder\pslist.exe
pslist -s \\ "
objShell.Run "%comspec% /T:2E /k %systemdrive%\testfolder\pslist.exe
pslist -s >>%systemdrive%\RMQCA\ps.txt"
End If
Input = InputBox("Enter the IP Address or the name of the remote
server")--->> this is what will give the user to fill in the ip
address.
objShell.Run "%comspec% /T:2E /k %systemdrive%\testfolder\pslist.exe
pslist -s \\ --->> this is where i need that ipaddress to be so that i
can run pslist like :
pslist -s \\ipaddress
I hope i explained what i am after. Thank you all once again