If you need to open a website in your default browser by using command prompt, you can use the commands below, my recommendation is using the first command with rundll32, because explorer.exe called IE instead of default browser on some computers to open given URL.
rundll32 url.dll,FileProtocolHandler www.microsoft.com
explorer http://www.microsoft.com
Wednesday, 31 March 2010
Komut satirindan varsayilan browser ile web sayfasi acmak
Eger komut satirindan bilgisayarinizda kurulu olan browserlardan varsayilan olani ile bir web sayfasi cagirma ihtiyaciniz olursa, (az once bizim oldu) asagidaki komutlardan yararlanabilirsiniz, explorer.exe ile olanda bazi bilgisayarlarda halen IE yi cagirdigini gorduk o yuzden tavsiyem rundll32 ile olandir.
rundll32 url.dll,FileProtocolHandler www.microsoft.com
explorer http://www.microsoft.com
rundll32 url.dll,FileProtocolHandler www.microsoft.com
explorer http://www.microsoft.com
Tuesday, 30 March 2010
Script ile SMB calisirlik kontrolu yapmak
Asagidaki basit script ile SMB (Server Message Block) testi yapabilirsiniz.
Dim WshNetwork : Set WshNetwork = WScript.CreateObject("WScript.Network")
computerName = WshNetwork.ComputerName
Dim objFSO : Set objFSO = CreateObject("Scripting.FileSystemObject")
Dim pipeName : pipeName = "\\" & computername & "\pipe\srvsvc"
wscript.echo pipeName
const ForAppending = 8
Dim objPipe : Set objPipe = objFSO.OpenTextFile(pipeName, ForAppending, True)
If Err.Number = 0 Then
wscript.echo "SMB ok"
else
wscript.echo "SMB failed"
End If
objPipe.WriteLine("SMB tested.")
objPipe.Close
Dim WshNetwork : Set WshNetwork = WScript.CreateObject("WScript.Network")
computerName = WshNetwork.ComputerName
Dim objFSO : Set objFSO = CreateObject("Scripting.FileSystemObject")
Dim pipeName : pipeName = "\\" & computername & "\pipe\srvsvc"
wscript.echo pipeName
const ForAppending = 8
Dim objPipe : Set objPipe = objFSO.OpenTextFile(pipeName, ForAppending, True)
If Err.Number = 0 Then
wscript.echo "SMB ok"
else
wscript.echo "SMB failed"
End If
objPipe.WriteLine("SMB tested.")
objPipe.Close
Friday, 5 March 2010
Script ile WINS sunucusu bilgilerini ag kartinda ayarlama
Bilgisayarinizin ag ayarlariniza WINS sunucusu veya sunuculari eklemek istiyorsaniz asagidaki scripti kullanarak bunu rahatca yapabilirsiniz. strPrimaryServer ve strSecondaryServer degiskenlerini WINS sunucunuzun veya sunucularin IP adres bilgileri ile guncelleyiniz, sadece bir adet sunucunuz var ise strSecondaryServer server degiskenini ve SetWINSServer dan strSecondaryServer i kaldirabilirsiniz.
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colNetCards = objWMIService.ExecQuery _ ("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True")
For Each objNetCard in colNetCards
strPrimaryServer = "192.168.1.100" strSecondaryServer = "192.168.1.200" objNetCard.SetWINSServer strPrimaryServer, strSecondaryServer
Next
Script ile WINS sunucusu bilgilerini ag kartinda ayarlama
Bilgisayarinizin ag ayarlariniza WINS sunucusu veya sunuculari eklemek istiyorsaniz asagidaki scripti kullanarak bunu rahatca yapabilirsiniz. strPrimaryServer ve strSecondaryServer degiskenlerini WINS sunucunuzun veya sunucularin IP adres bilgileri ile guncelleyiniz, sadece bir adet sunucunuz var ise strSecondaryServer server degiskenini ve SetWINSServer dan strSecondaryServer i kaldirabilirsiniz.
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colNetCards = objWMIService.ExecQuery _
("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True")
For Each objNetCard in colNetCards
strPrimaryServer = "192.168.1.100"
strSecondaryServer = "192.168.1.200"
objNetCard.SetWINSServer strPrimaryServer, strSecondaryServer
Next
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colNetCards = objWMIService.ExecQuery _
("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True")
For Each objNetCard in colNetCards
strPrimaryServer = "192.168.1.100"
strSecondaryServer = "192.168.1.200"
objNetCard.SetWINSServer strPrimaryServer, strSecondaryServer
Next
Subscribe to:
Posts (Atom)