Information générale
Catégorie:
Administration & Sécurité
Titre:
Cannot run script with taskschedular when no local logon
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement