I have a simple VBScript that calls up MS Excel, and runs an Excel macro to format some data. This script, as listed below, runs fine if I start it manually or scheduled it to run when I am logged on as a regular user (i.e. without Admin priviledge). If I leave the machine on, but without logging on, the Windows Scheduler will show the script started but never end. I think it fails to start MS Excel. The only work around, and I have tried this it works, is to schedule the script to run under an id/password with Admin privilege.
Is this a security related issue? How can I workaround this other than running the script with Admin privilege?
—
Teddy
**** VBScript in question ****
Shared_Folder = “C:\RMM\Reports”
‘ Create Log File if it doesn’t already exist
LogFilePath = Shared_FOlder & “\Mid-Week LogFile.txt”
Set oFSO = CreateObject(“Scripting.FileSystemObject”)
SET oLogFile = oFSO.CreateTextFile(LogFilePath, True)
oLogFile.WriteLine(LogLine)
oLogFile.WriteLine(“Log File Initially Created : ” &Date &” – ” &Time)
oLogFile.WriteLine(LogLine)
Dim ObjAccess
Dim ObjExcel
‘
‘ Open Excel to update all traffic reports
‘
oLogFile.WriteLine(“MS Excel Started: ” &Date &” – ” &Time)
Set ObjExcel = CreateObject(“EXCEL.APPLICATION”)
ObjExcel.DisplayAlerts=TRUE
ObjExcel.Visible=TRUE
ObjExcel.Run (“‘C:\RMM\REPORTS\Update All Reports.xls’!Update_Traffic_Reports”)
ObjExcel.Quit
Set ObjExcel = Nothing
oLogFile.WriteLine(“MS Excel Finished: ” &Date &” – ” &Time)