Click to See Complete Forum and Search --> : vbscript not executing thru intranet


dragnlo
June 7th, 2001, 03:51 PM
I have the w2k boxes connected on a LAN. I have a vbscript set up as an "at" job. The script maps a driove to the 2 other machines and gets a file. It then disconnects the mapped drives and merges the files it has. My problem is:
1. I can be on the box set the script to run from a command line and it works.
2. I set it up to run as an "at" job whatch it it runs.

I set it up to run at 3:45 AM and it doesnt run. I have looked thru the event viewers and no errors.
I have laso set up the trusts on all 3 boxes.

Any suggestions???

Thanks for nay help.

DG


CODE:

'Build all needed paths
generic_remote_source_path="zzz:\inetsrv\perl\translog\" & filename
generic_destination_path="D:\translog\zzz\" & filename
merged_path="D:\translog\merged_logs\" & filename

'Map drives to remote web servers.
Set ws = WScript.CreateObject("WScript.Shell")



B_map_ret = ws.Run("net use p: \\xxx.xxx.xxx.xx1\c$ !!pwd! /USER:???",0,"True")
' WScript.Echo B_map_ret

Q_map_ret = ws.Run("net use q: \\xxx.xxx.xxx.xx2\c$ !!pwd! /USER:???",0,"True")
' WScript.Echo Q_map_ret


'Copy files to relative local directory
Set fs = CreateObject("Scripting.FileSystemObject")

'Copy B
this_source_path=Replace(generic_remote_source_path,"zzz","p")
this_destination_path=Replace(generic_destination_path,"zzz","B")
' WScript.Echo "from:" & this_source_path & VbCrLf
' WScript.Echo "to:" & this_destination_path & VbCrLf
fs.CopyFile this_source_path,this_destination_path

'Copy Q
this_source_path=Replace(generic_remote_source_path,"zzz","q")
this_destination_path=Replace(generic_destination_path,"zzz","Q")
' WScript.Echo "from:" & this_source_path & VbCrLf
' WScript.Echo "to:" & this_destination_path & VbCrLf
' WScript.Echo this_source_path & " " & this_destination_path
fs.CopyFile this_source_path,this_destination_path



'Diconnect mapped drives
'B
B_unmap_ret = ws.Run("net use p: /DELETE",0,"True")
'Q
Q_unmap_ret = ws.Run("net use q: /DELETE",0,"True")



'Merge files

WScript.Echo "Merge for " & filename & " complete." & VbCrLf

' response = DisplayConsolePrompt("press any key:")
Set fs = nothing
Set ws = Nothing