Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot run script with taskschedular when no local logon
Message
 
To
All
General information
Forum:
Windows
Category:
Administration & Security
Title:
Cannot run script with taskschedular when no local logon
Miscellaneous
Thread ID:
00809200
Message ID:
00809200
Views:
65
Hi there,

I've got a weird problem.
My DLL cannot be instantiated when there is nobody logged on localy to the machine.

For testing purpose I have made a simple DLL with Visual FoxPro 7.

DEFINE CLASS cmini as custom olepublic

PROCEDURE init()
NODEFAULT
ENDPROC
ENDDEFINE


Also a (bit less simple) Visual Basic Script file.

Sub WriteToLog(tcMessage)

Dim lcLogFile

On Error Resume Next
lcLogFile = "c:\temp\error.log"
Set loFile = goFSO.OpenTextFile(lcLogFile , 8, True)
loFile.WriteLine(tcMessage)
loFile.Close
On Error Goto 0

Set loFile = Nothing
End Sub

Set goFSO = WScript.CreateObject("Scripting.FileSystemObject")
writetolog("createobject" & vbcrlf)

on error resume next
set loff = WScript.CreateObject("mini.cmini")
writetolog("err.description:" & err.description & vbcrlf)
writetolog("err.number :" & err.Number & vbcrlf)
on error goto 0

set goFSO = nothing


When running on the system when I'm logged on the logfile shows

createobject
err.description:
err.number :0


When running from the taskschedular and nobody logged on localy the logfile shows

createobject
err.description:Could not create object named "mini.cmini".
err.number :0


So the FileSystemObject can be created, but the fox dll cann't.
I am running the task with my own account.
The DLL is running in COM+ also with my own account.


I think I've tried everything...but there must be something (probably very small) to fix this weird problem.
It's win2k btw
Next
Reply
Map
View

Click here to load this message in the networking platform