johncher Posted June 21, 2010 Share Posted June 21, 2010 Bu hizmetleri autoit te çalıştırmak ve durdurmak için nasıl bir kod kullanabilirim şimdiden teşekkürler Link to comment Share on other sites More sharing options...
blue_life Posted June 22, 2010 Share Posted June 22, 2010 @johncher Kısaca net.exe ile yapabilirsin. Tabi farklı yöntemlerde vardır. Şimdi senin için hazırladığım basit bir örnek. Bir servisi başlatmak için; _Net_Start("Görüntü adı","Start") Durdurmak için; _Net_Start("Görüntü adı","Stop") _Net_Start("Telefon","Start") MsgBox(64,"","Telefon servisi başladı!") _Net_Start("Telefon","Stop") MsgBox(64,"","Telefo servisi durduruldu!") Func _Net_Start($ServiceName = "",$Net_Param = "start",$Wait = 1) If $ServiceName = "" Then Return SetError(1) If $Wait = 1 Then If Not RunWait("net.exe " & $Net_Param & " " & $ServiceName,@WindowsDir & "\System32",@SW_HIDE) _ Then Return SetError(1) Else If Not Run("net.exe start " & $ServiceName,@WindowsDir & "\System32",@SW_HIDE) _ Then Return SetError(1) EndIf EndFunc[/CODE] Işe yaramaz ise farklı örnekler verebilirim... Neyse kolay gelsin. Link to comment Share on other sites More sharing options...
johncher Posted June 24, 2010 Author Share Posted June 24, 2010 @johncher Kısaca net.exe ile yapabilirsin. Tabi farklı yöntemlerde vardır. Şimdi senin için hazırladığım basit bir örnek. Bir servisi başlatmak için; _Net_Start("Görüntü adı","Start") Durdurmak için; _Net_Start("Görüntü adı","Stop") _Net_Start("Telefon","Start") MsgBox(64,"","Telefon servisi başladı!") _Net_Start("Telefon","Stop") MsgBox(64,"","Telefo servisi durduruldu!") Func _Net_Start($ServiceName = "",$Net_Param = "start",$Wait = 1) If $ServiceName = "" Then Return SetError(1) If $Wait = 1 Then If Not RunWait("net.exe " & $Net_Param & " " & $ServiceName,@WindowsDir & "\System32",@SW_HIDE) _ Then Return SetError(1) Else If Not Run("net.exe start " & $ServiceName,@WindowsDir & "\System32",@SW_HIDE) _ Then Return SetError(1) EndIf EndFunc[/CODE] Işe yaramaz ise farklı örnekler verebilirim... Neyse kolay gelsin. hocam bu işimi görmedi Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.