Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


vbscript help ...remote processes/timings

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,1428
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> vbscript help ...remote processes/timings
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 vbscript help ...remote processes/timings - 10/5/2004 5:45:07 AM   
  malbulger

 

Posts: 3
Score: 0
Joined: 10/5/2004
From:
Status: offline
Hi,

I am really struggling with this complicated script!

the requirements are to write a vbscript which checks the current system time on server A, if it is before a certain time then kick off a batch file which executes a process on server B. If it is after a certain time then it is to check existing running processes on a server B, if it finds an instance of "something.exe" already runing then wait for X mins and try again until it is able to execute the batch job.

help!
 
 
Post #: 1
 
 Re: vbscript help ...remote processes/timings - 10/5/2004 7:28:14 AM   
  LCoughdrop

 

Posts: 48
Score: 0
Joined: 8/23/2004
From:
Status: offline
I am not sure if I know enough to be able to help you, but I think anyone who does help is going to probably ask what you have so far :) What specifically do you need help with, or are you just confused about how to go about it?

-- LC

(in reply to malbulger)
 
 
Post #: 2
 
 Re: vbscript help ...remote processes/timings - 10/5/2004 7:59:34 AM   
  malbulger

 

Posts: 3
Score: 0
Joined: 10/5/2004
From:
Status: offline
confused how to go about it is the word! .... very new to vb!

i can check the local systemtime using :

Dim CurrentTime

CurrentTime = Time()

Wscript.echo CurrentTime

but how i compare that with the cut off time in vb i have no idea



i thought about using sysinternals pslist to check te remote machine ....

something like :


ProcessName = "process1"
PsList = "C:\PsTools\PsList.exe"
Set oShell = CreateObject("WScript.Shell")

obj = oShell.Run(PsList & " " & ProcessName, 0, True)

If obj = 0 Then
WScript.Echo ProcessName & " is running"
Else
WScript.Echo sProcessName & " is not running"
End If


that is about as far as i have got atm

(in reply to malbulger)
 
 
Post #: 3
 
 Re: vbscript help ...remote processes/timings - 10/5/2004 9:43:36 AM   
  malbulger

 

Posts: 3
Score: 0
Joined: 10/5/2004
From:
Status: offline
ok, i think i have got a little further but am stuck now!



code :


startTime = Now
If DatePart ("h", startTime,) > 07 then
ProcessName = " blah blah "
PsList = "C:\PsTools\PsList.exe"
Set oShell = CreateObject("WScript.Shell")
obj = oShell.Run(PsList & " " & ProcessName, 0, True)
If obj = 0 Then

Sleep(300)

loop somehow ??


Else

Cscript ------call batch job



End If

(in reply to malbulger)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> vbscript help ...remote processes/timings Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts