hi,
i have a rather complex problem. we have to run a script that updates
a software via Microsoft SMS and I want to log the success/failure of
the script on a remote machine. i tried to write it into the remot
machines event log as well as filesystem but the main problem is:
everything that SMS executes on the client runs in system context.
even when i give permissions for "Everyone" on the remote machine that
is ment to collect the logs, the system on the client is not allowed
to connect to the share on the remote machine.
logfile = "c:\scripts\log\bla.log"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile (logfile, ForAppending, True)
Sub WriteTime
objTextFile.WriteLine("[" & Day(Now) & "." & Month(Now) & "." &
Year(Now) & " " & Hour(Now) & ":" & Minute(Now) & ":" & Second(Now) &
"]")
End Sub
using a UNC name as logfile works well, if the script runs with a real
user. can i tell vbs to establish the connection with a specific
useraccount? this way i could create a stripped down user on the
remote machine which the vbs on the client then uses to connect to the
share with a real username.