I've cfexecuted the pskill utility from sysinternals to kill any excel.exe processes, which has worked pretty well. -jim
http://www.sysinternals.com/Utilities/PsKill.html On 3/7/06, Mingo Hagen <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm trying to get a COM-called-instance of Excel to quit... so far no > luck. It just stays there in my task manager laughing at me, also in the > task manager when I try to end-task it, it doesn't and returns an error > 'Unable to Terminate Process, Access is denied'. > > I use the following code: > <cfscript> > myExcel = createObject( "COM", "Excel.application" ); > myExcel.Quit(); > myExcel = ''; > </cfscript> > > I've tried it with and without saving and closing workbooks. > Now, I did stumble upon a possible solution on some google-found page > which mentions using the GarbageCollector in VisualStudio but I'm not > sure that is a possibility here since we're talking coldfusion 5 (don't > ask why i'm not using cfmx+, it's not an option, the customer doesn't > want it). > > They use this code: > Private Sub StartandStopExcel() > Dim mseExcel As Excel.Application > mseExcel = New Excel.Application > mseExcel.Quit() > mseExcel = Nothing > GC.Collect() > End Sub > > Does anyone know of a way to get rid of excel (or a way to contact the > garbagecollector from CF5), my current solution is to just use one excel > instance and keep reusing that (using the application scope) But the > coldfusion seems to crash on this method now and again. > > Thanks, > Mingo > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234485 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54