OzgrGvnc Posted June 28, 2010 Share Posted June 28, 2010 Selamlar. AMS ile hosts dosyasının içine kayıt girme şansımız varmı? Eğer yoksa hosts dosyasının Salt okunur özelliğini kaldırıp yerine yeni hosts kopyalıyan bir komut mevcutmudur? File copy komutu sanırım işe yaramıyor. Sebebi hosts dosyasının uzantısı olmaması olabilirmi? Yardımlarınızı bekliyorum. AIO bitti fakat yasaklı siteler için bir eklenti daha ekleyip yayınlamak istiyorum. Link to comment Share on other sites More sharing options...
MostWanted Posted June 28, 2010 Share Posted June 28, 2010 attrib = File.GetAttributes( _SystemFolder.."\\driver\\etc\\host" ); attrib.ReadOnly = false; File.SetAttributes( _SystemFolder.."\\driver\\etc\\host", attrib );[/CODE] Ondan sonra File.Copy ile üstüne yazdırırsın Link to comment Share on other sites More sharing options...
OzgrGvnc Posted June 28, 2010 Author Share Posted June 28, 2010 Şimdi şöyle bir hata verdi. Ek olarak filecopy komutu girmediğim halde butonun onclick evresinde sadece verdiğin kodlar varken. FileCopy komutunun başına ne yazmalıyım ki sistem hangi sürücüde olursa olsun system32\drivers\etc klasörünü bulsun. Katılımsız yaparken %systemroot% yada %systemdirectory% yazıyorduk... Sen _SystemFolder eklemişsin. FileCopy komutum nasıl olmalı onuda anlatırsan çok sevinirim. Saygılar. Link to comment Share on other sites More sharing options...
MostWanted Posted June 28, 2010 Share Posted June 28, 2010 %Systemroot% 'un ams'ci _SystemFolder dır.Bu arada sorununa gelince Sana verdiğim kodları bakmadan yazdım haliyle küçük bişey (s harfleri) gözümden kaçmış buyur.. attrib = File.GetAttributes( _SystemFolder.."\\drivers\\etc\\hosts" ); attrib.ReadOnly = false; File.SetAttributes( _SystemFolder.."\\drivers\\etc\\hosts", attrib );[/CODE] Edit:File.Copy komutuna gelince onu Aio Dersleri koleksiyondaki File.Copy ile progress kullanma dersiyle yapabilirsin..Bu arada dediğin sistem yolunu üstte kullandığım yolu kullanacaksın.. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.