Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Paging Lee Peedin....AXRecycle "checker" script Beta 1.00

2 views
Skip to first unread message

Ned Flanders

unread,
Sep 16, 2002, 3:35:26 PM9/16/02
to
This little script auto-empties the recycle bin without confirmation.
Checks (thanks again for the method Torgeir!) to see if the DLL is
registered or not, and registers it on the fly if it isn't. Only checks the
same dir that the script is in for the presence of AXrecycle.DLL; I ran out
of energy to search the whole disk 8^) The script will indicate if it
couldn't find the DLL in the current dir and abort if that's the case.

set ObjShell = createobject("wscript.shell")
On Error Resume Next
set rbobj = CreateObject("AXRecycle.Recycle")
If Err.Number <> 0 Then
' ObjShell.popup "AXRecycle.DLL is not registered.",2
Err.Clear
Set oFSO = CreateObject("Scripting.FileSystemObject")
strCurDir = left
(WScript.ScriptFullName,instrrev(WScript.ScriptFullName,"\"))
strDLLFile = strCurDir & "AXRecycle.dll"
If oFSO.FileExists(strDLLFile) Then
' ObjShell.popup "Found DLL in current dir. Auto-registering.",2
ObjShell.Run "regsvr32 /s " & strDLLFile,0,true
set rbobj = CreateObject("AXRecycle.Recycle")
' ObjShell.popup "Emptying Recycle Bin.",2
rbobj.EmptyRecycleNOC()
Else
wscript.echo "AXRecycle.DLL is not registered." & vbNewLine & _
"Could not find AXRecycle.dll to auto-register it. " & _
vbNewLine & " Aborting."
wscript.quit (2)
End if
'wscript.quit(5)
Else
' ObjShell.popup "AXRecycleBin.DLL is registered (good).",2
'Continue on
rbobj.EmptyRecycleNOC()
End If

-----------------------------------------------------------
Sometimes I'll stand on top of my apartment
balcony railing, close my eyes, tilt my head
skyward, stretch my arms out and think to myself,
"This always ends badly. Why do I keep doing this?"
-----------------------------------------------------------


Ned Flanders

unread,
Sep 16, 2002, 3:42:42 PM9/16/02
to
Oh duh I forgot to say the reason I posted in the first place:

Thanks for coding this little gem of a DLL, Lee!

Curtis
AKA "Ned"

"Ned Flanders" <ned...@hotmail.com> wrote in message
news:OV80nebXCHA.1688@tkmsftngp10...

<SNIP original post>


l...@safedatausa.com

unread,
Sep 17, 2002, 7:43:10 AM9/17/02
to
Your're quite welcome - like your script and will use it to create an
Object Rexx version.

See my post on the PrinterObject ActiveX dll

Lee

0 new messages