Search 

Disconnect File Share Active Connections by VBScript Wrapper 

on error resume next

dim args
dim computer
dim str

Set args = WScript.Arguments
if WScript.Arguments.count = 2 then
computer = args(0)
str = args(1)

Set objConnection = GetObject("WinNT://" & computer & "/LanmanServer")
Set colResources = objConnection.Resources

If Err.Number <> 0 Then
Err.Clear
On Error GoTo 0
Wscript.Echo "Please check your parameters"
Wscript.Quit
End If


For Each objResource in colResources
'wscript.echo objResource.name
'wscript.echo objResource.user
'wscript.echo objResource.path
if not isempty(objResource.path) then
if instr(lcase(objResource.path), lcase(str)) > 0 then
Set objShell = CreateObject("WScript.Shell")
wscript.echo "Disconnecting: " & objResource.path & " (" & objResource.user &")"
objShell.Run "rcmd \\" & computer & " net file " & objResource.Name & " /close", 0, true
'colResources.Remove(objResource.Name)
If Err.Number <> 0 Then
Err.Clear
On Error GoTo 0
'Wscript.Echo "Warning: Script is not running locally. This message can be ignored."
End If
end if
end if
Next
wscript.echo ""
wscript.echo "Script closefile completed successfully."
else
wscript.echo "---------------------------------------------------------------"
wscript.echo "This script will close the active conenctions from the share."
wscript.echo ""
wscript.echo "Usage: cscript closefile [server] [path string]"
wscript.echo "e.g. cscript closefile . c:\share\documents"
wscript.echo ""
wscript.echo "---------------------------------------------------------------"
end if




[ add comment ] [ 0 trackbacks ] permalink
Sigma 70-300mm DG non-APO Zoom with Macro Lens 

Bought 2 Sigma lens from eBay 2 weeks ago. One is 28-70mm 2.8-4 DG D and Sigma 70-300mm DG non-APO Zoom Macro. The results of the 70-300mm can be seen at the Reb Bull Air Race gallery.

Today, I am testing the macro function of the lens. I wasn't really understand the different between a macro and a zoom and enlarged shots. Well, I do know.. haha..


[ add comment ] [ 0 trackbacks ] permalink
Redbull Air Race Australia 2006 

This weekend the Perth sky will be very busy. Its the season where the bulls around the world will come and race. They all wear red clothes, they are strong, they are fast and they are on the sky.

hehe.. its a "formula one" on the sky events sponsored by Redbull actually. Visit http://www.redbullairrace.com/ and http://www.westernaustralia.com/redbullairrace/ for more information.




Its an event, and I am not working this weekend, so of course I will be there to do my usual things. kekeke... Saturday is the semi final and qualiting rounds, so I believe there will be more chance to take good shots then Sunday, the final. I was basically took the shots from the North of the Swan River today. Tomorrow I will be at the South of the river, which can see the flying action closer.




Visit my gallery (Final) to check out some of the shots, most of them are exposure adjusted. Pictures were taken using my new Sigma 70-300 DC Macro Non APO lens. Oh, and also, from the shot above, I think its time to clean my CCD sensor liau. :P



[ add comment ] [ 0 trackbacks ] permalink

<<First <Back | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | Next> Last>>