01adanalı Posted May 16, 2010 Share Posted May 16, 2010 İlk örnek kurulum dosyasını autoit içine gizlemek. Katılımsız kurulum dosyaınızı çaldırmak istemiyorsanız güzel bir seçennek. CODE FileInstall("C:\Documents and Settings\Administrator.PC\Desktop\emule.exe",@TempDir & "\$$.tmp") Program compile olurken C:\Documents and Settings\Administrator.PC\Desktop\emule.exe dosyasını kendi içine alır. Exe çalıştırılınca @TempDir yani sistemin geçici klasörüne "$$.tmp" ismiyle açılır. Ardından isim değiştirmemiz gerek ki dosya çalışsın. CODE FileMove ( @TempDir & "\$$.tmp",@TempDir & "\temp.exe" ,1 ) AutoIT'de dosya adlandırma fonksiyonu yok. Onun için FileMove yani dosya taşıma komutunun kaynak ve hedef klasörlerini aynı tutarak isim değiştirtiyoruz. Ve programımızı Çalıştırıyoruz. CODE RunWait(@TempDir & "\temp.exe") RunWait komutu çalıştırılan program sona ermeden autoit'in sonraki satırın işletime geçmesini engeller. Ardından dosyamızı silip pisliğimizi temizleyelim. CODE FileDelete(@TempDir & "\temp.exe") Komple vereyim üstteki kodu: CODE FileInstall("C:\Documents and Settings\Administrator.PC\Desktop\emule.exe",@TempDir & "\$$.tmp") FileMove ( @TempDir & "\$$.tmp",@TempDir & "\temp.exe" ,1 ) RunWait(@TempDir & "\temp.exe") FileDelete(@TempDir & "\temp.exe") yukarıdaki kodları kodları uyguladım bazı hata alıyorum derlerken winrar yaptım katılımsız kurlumu sag kulakçık ekranını gizlemek için bu yöntemi kullanabilrmiişim hazırladım kod penceresini derken hata alıyorum kodları caps verecem arakdaşalr bu konuda yardımcı oaliblirmsiniz benim hazılradıgım au3 FileInstall("C:\Documents and Settings\Administrator.PC\Desktop\avast.exe",@TempDir & "\$$.tmp") FileMove ( @TempDir & "\$$.tmp",@TempDir & "\temp.exe" ,1 ) RunWait(@TempDir & "\temp.exe") FileDelete(@TempDir & "\temp.exe") nasıl yapcam bunu compiler arkadaşalr Quote Link to comment Share on other sites More sharing options...
blue_life Posted May 16, 2010 Share Posted May 16, 2010 @01adanalı Yukarıdaki bilgileri nerden aldın bilmiyorum, lakin hatalı kısımlar var. Misal autoit ile çalıştırılacak bir ugulama dosyasının sonu illa exe olmak zorunda deyil. exe olmasa bile Run - Runwait komutuyla çalışacaktır. vs vs... Fileinstall komutuna gelirsek, script dosyanın yanından itibarın dosya isimini kullan. Misal dosya ismin denem.exe ve bu dosya script dosyasının yanında olsun. O zaman FileInstall("deneme.exe",@TempDir & "\deneme.exe" ,1) denemen yeterli olacaktır... Vs vs.... Al sana basit bir kod. Orda sadece avast.exe yazan yeri değiştirip farklı programlar içinde kullanabilirsin.... Kolay gelsin... Global $Program = _TempFile() FileInstall("avast.exe",$Program) RunWait($Program) FileDelete($Program) Func _TempFile($s_DirectoryName = @TempDir, $s_FileExtension = ".tmp", $s_FilePrefix = "~", $i_RandomLength = 7) Local $s_TempName If StringRight($s_DirectoryName, 1) <> "\" Then $s_DirectoryName = $s_DirectoryName & "\" Do $s_TempName = "" While StringLen($s_TempName) < $i_RandomLength $s_TempName = $s_TempName & Chr(Random(97, 122, 1)) WEnd $s_TempName = $s_DirectoryName & $s_FilePrefix & $s_TempName & $s_FileExtension Until Not FileExists($s_TempName) Return ($s_TempName) EndFunc ;==>_TempFile[/CODE] Quote Link to comment Share on other sites More sharing options...
blue_life Posted May 16, 2010 Share Posted May 16, 2010 Aslında tekrar düşündümde RunWait'ten sonra sleep ile biraz bekletmen daha doğru! Global $Program = _TempFile() FileInstall("avast.exe",$Program) RunWait($Program) Sleep(500) FileDelete($Program) Func _TempFile($s_DirectoryName = @TempDir, $s_FileExtension = ".tmp", $s_FilePrefix = "~", $i_RandomLength = 7) Local $s_TempName If StringRight($s_DirectoryName, 1) <> "\" Then $s_DirectoryName = $s_DirectoryName & "\" Do $s_TempName = "" While StringLen($s_TempName) < $i_RandomLength $s_TempName = $s_TempName & Chr(Random(97, 122, 1)) WEnd $s_TempName = $s_DirectoryName & $s_FilePrefix & $s_TempName & $s_FileExtension Until Not FileExists($s_TempName) Return ($s_TempName) EndFunc ;==>_TempFile[/CODE] Quote Link to comment Share on other sites More sharing options...
morning Posted May 16, 2010 Share Posted May 16, 2010 FileInstall("C:\Documents and Settings\Administrator.PC\Desktop\avast.exe",@TempDir & "\$$.tmp") Hatalı kısım bu. C:\documents and settings\ KULLANICI ADIN BURAYA GELECEK\Desktop\avast.exe şeklinde olmalı dosya adı. Yukarıdaki bilgileri nerden aldın bilmiyorum, lakin hatalı kısımlar var. Misal autoit ile çalıştırılacak bir ugulama dosyasının sonu illa exe olmak zorunda deyil. Hocam aldığı yerde örnek katılımsız program üzerine olduğu için exe uzantısı verilmiş. Quote Link to comment Share on other sites More sharing options...
01adanalı Posted May 16, 2010 Author Share Posted May 16, 2010 ileri düzeyde katılımsız kurulumdan aldıgın örnek ve yeni bir hata aldım blu life senin verdigin kodlarla aldıgın hata caps Quote Link to comment Share on other sites More sharing options...
morning Posted May 16, 2010 Share Posted May 16, 2010 (edited) Senin icon olarak seçtiğin dosya hatalıymış. Burda blue_life'ın kodunun bir alakası yok. icon olarak ne kullandın? Edited May 16, 2010 by morning Quote Link to comment Share on other sites More sharing options...
01adanalı Posted May 16, 2010 Author Share Posted May 16, 2010 şimdi arkadaşalr avast free 5 sürümünü winrar ile katılımsız yaptım autoit ile sag kulakçıkları kaldıracam ama az önce analttıkalrınızla benim kafam çok karıştı masasütünede sag tıkladım Yeni AutoIt v3 Script dedim edt ile kod erkanaına blue life vermişoldugu kodları yazdım yuakrıda vermiş oldugu hata ile karşılaşım arakdaşalr bu işi bana detaylı anlatabilrimisinz compile etmeyide şimdiden tşk ederim Quote Link to comment Share on other sites More sharing options...
blue_life Posted May 16, 2010 Share Posted May 16, 2010 @01adanalı 1 - Kur dosyanı masaüstüne koy! 2- Yeni Autoit v3 Script dosyası oluşturup, çift tıklatarak scite ile aç., 3 - Yukarıda verdiğim kodları içine yaz.Tabi senin kur dosyanın adını düzgün yaz. Misal adı avast.exe ise; Sadece kodları yaz ve içinde başka bir şey olmasın. Burya kadar sorunsuz yaptıktan sonra icon vs ayarlarsın... Global $Program = _TempFile() FileInstall("avast.exe",$Program) RunWait($Program) Sleep(500) FileDelete($Program) Func _TempFile($s_DirectoryName = @TempDir, $s_FileExtension = ".tmp", $s_FilePrefix = "~", $i_RandomLength = 7) Local $s_TempName If StringRight($s_DirectoryName, 1) <> "\" Then $s_DirectoryName = $s_DirectoryName & "\" Do $s_TempName = "" While StringLen($s_TempName) < $i_RandomLength $s_TempName = $s_TempName & Chr(Random(97, 122, 1)) WEnd $s_TempName = $s_DirectoryName & $s_FilePrefix & $s_TempName & $s_FileExtension Until Not FileExists($s_TempName) Return ($s_TempName) EndFunc;==>_TempFile[/CODE] Son not olarak, autoit içine almak istediğin dosya büyükse, işlem çok uzun sürebilir. Belki burda hata yapıyorsundur! Beklemeni tavsiye ederim... Kolay gelsin... Quote Link to comment Share on other sites More sharing options...
01adanalı Posted May 16, 2010 Author Share Posted May 16, 2010 rica etsem bana resimli oalrak anlatırmısın autoit içinde compile yok nerden bulaiblirim ayrdımcı olaiblirmsin Quote Link to comment Share on other sites More sharing options...
blue_life Posted May 16, 2010 Share Posted May 16, 2010 @01adanalı Bu kadar basit bir şey için ne anlatımı? Compile etmek için Scite açıkken Yukarıdaki menüde Tools -> Builde seçeneğini kullanabilirsin. Veyahut scite açıkken klevyenden F7 klevye kısayolunu kullanabilirsin. Yada ilgili au3 dosyasına sağ tıklatıp compile seçeneğini seçebilrisin.... http://www.4shared.com/file/104277155/5931bf1f/Autoit_Setup_Video.html[/CODE] Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted May 16, 2010 Share Posted May 16, 2010 evet blue_Life hocam sizin verdiğiniz şu kodu kopyaladım ve exe yerine jpeg almaya çalıştım ama eklemiyor jpeg farklı mı oluyor acaba Quote Link to comment Share on other sites More sharing options...
blue_life Posted May 16, 2010 Share Posted May 16, 2010 @Dj Demir Nasıl almıyor? Fileinstallde dosya ismini yazarken hata yapmış olabilirs. Dosyaismi.uzantısı şeklinde kullanacaksın.... Tabi yukarıdaki komutta Runwait var. Sen resim çalıştırmak istiyorsan ShellExecute vyahut ShellExecuteWait komutlarını kullanmalısın.... Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted May 16, 2010 Share Posted May 16, 2010 valla hocam hata yanlış bir şeyden kaynaklanan bir hata değil jpeg dosyasini eklemede hata diyor eklemiyor Global $Program = _TempFile() FileInstall("Gaci.jpeg",$Program) ShellExecuteWait($Program) Sleep(500) FileDelete($Program) Func _TempFile($s_DirectoryName = @TempDir, $s_FileExtension = ".tmp", $s_FilePrefix = "~", $i_RandomLength = 7) Local $s_TempName If StringRight($s_DirectoryName, 1) <> "\" Then $s_DirectoryName = $s_DirectoryName & "\" Do $s_TempName = "" While StringLen($s_TempName) < $i_RandomLength $s_TempName = $s_TempName & Chr(Random(97, 122, 1)) WEnd $s_TempName = $s_DirectoryName & $s_FilePrefix & $s_TempName & $s_FileExtension Until Not FileExists($s_TempName) Return ($s_TempName) EndFunc;==>_TempFile bu şekilde olmadı hane acemilik ya Program yazan yerleri jpgfile olarak değiştirdim yine olmadı Quote Link to comment Share on other sites More sharing options...
blue_life Posted May 16, 2010 Share Posted May 16, 2010 Global $Program = _TempFile(@TempDir, ".jpg") FileInstall("Gaci.jpg", $Program) ShellExecuteWait($Program) Sleep(500) FileDelete($Program) Func _TempFile($s_DirectoryName = @TempDir, $s_FileExtension = ".tmp", $s_FilePrefix = "~", $i_RandomLength = 7) Local $s_TempName If StringRight($s_DirectoryName, 1) <> "\" Then $s_DirectoryName = $s_DirectoryName & "\" Do $s_TempName = "" While StringLen($s_TempName) < $i_RandomLength $s_TempName = $s_TempName & Chr(Random(97, 122, 1)) WEnd $s_TempName = $s_DirectoryName & $s_FilePrefix & $s_TempName & $s_FileExtension Until Not FileExists($s_TempName) Return ($s_TempName) EndFunc ;==>_TempFile[/CODE] Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted May 16, 2010 Share Posted May 16, 2010 yine olmuyor hocam resim yanında iken run diyorum resim ve faks goruntuleyici ile açıyor ama resimi yanından aldığım zaman hata veriyor temp'e gitmeye çalışıyor ve dosyayı bulamıyor dolayısıyla hata veriyor . Quote Link to comment Share on other sites More sharing options...
peerfen Posted May 16, 2010 Share Posted May 16, 2010 (edited) Benede sorunsuz calisti programa pramenter ekliyebilirmiyiz acaba ben $parameter = ' /S ' ekledim calistiramadim Global $Program = _TempFile() FileInstall("11.msi",$Program) $parameter = ' /qn ' RunWait(@TempDir & "\" & $Program, $parameter) Sleep(500) FileDelete($Program) Func _TempFile($s_DirectoryName = @TempDir, $s_FileExtension = ".tmp", $s_FilePrefix = "~", $i_RandomLength = 7) Local $s_TempName If StringRight($s_DirectoryName, 1) <> "\" Then $s_DirectoryName = $s_DirectoryName & "\" Do $s_TempName = "" While StringLen($s_TempName) < $i_RandomLength $s_TempName = $s_TempName & Chr(Random(97, 122, 1)) WEnd $s_TempName = $s_DirectoryName & $s_FilePrefix & $s_TempName & $s_FileExtension Until Not FileExists($s_TempName) Return ($s_TempName) EndFunc;==>_TempFile[/CODE] Edited May 16, 2010 by peerfen Quote Link to comment Share on other sites More sharing options...
blue_life Posted May 16, 2010 Share Posted May 16, 2010 (edited) @peerfen Msi için shellexecute daha uygun... Global $Program = _TempFile(@TempDir,".msi")Global $Parametre = "/qn"FileInstall("11.msi",$Program);~ RunWait($Program & " " & $Parametre)ShellExecuteWait($Program,$Parametre)Sleep(500)FileDelete($Program)Func _TempFile($s_DirectoryName = @TempDir, $s_FileExtension = ".tmp", $s_FilePrefix = "~", $i_RandomLength = 7) Local $s_TempName If StringRight($s_DirectoryName, 1) <> "\" Then $s_DirectoryName = $s_DirectoryName & "\" Do $s_TempName = "" While StringLen($s_TempName) < $i_RandomLength $s_TempName = $s_TempName & Chr(Random(97, 122, 1)) WEnd $s_TempName = $s_DirectoryName & $s_FilePrefix & $s_TempName & $s_FileExtension Until Not FileExists($s_TempName) Return ($s_TempName)EndFunc;==>_TempFile[/CODEBOX] Edited October 14, 2011 by blue_life Quote Link to comment Share on other sites More sharing options...
01adanalı Posted May 16, 2010 Author Share Posted May 16, 2010 kardes videdakileri yaptım basakb ir hata aldım Quote Link to comment Share on other sites More sharing options...
peerfen Posted May 17, 2010 Share Posted May 17, 2010 kardes videdakileri yaptım basakb ir hata aldım scriptin yaninda avast.exe yoksa bu hatayi alirsin Quote Link to comment Share on other sites More sharing options...
01adanalı Posted May 17, 2010 Author Share Posted May 17, 2010 avast exe var seçtim compile ederken anlayamadım video çekecem yaptıgım artık gödnercem Quote Link to comment Share on other sites More sharing options...
djonur007 Posted May 17, 2010 Share Posted May 17, 2010 script in kodlarına hatalı girmişsindir program adını kontrol et. Quote Link to comment Share on other sites More sharing options...
01adanalı Posted May 17, 2010 Author Share Posted May 17, 2010 ben anlamadım bu sorunu arakdaşlar Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted May 19, 2010 Share Posted May 19, 2010 arkadaşa katılıyorum valla kendim denedim yapamadım sizin verdiğiniz komutları kullandım ama yine olmadı anlamadım gitti eklemiyor içine almak istediğim dosyayı Quote Link to comment Share on other sites More sharing options...
djonur007 Posted May 19, 2010 Share Posted May 19, 2010 sfx maker 3.0'ı dene... Quote Link to comment Share on other sites More sharing options...
Dj Demir Posted May 19, 2010 Share Posted May 19, 2010 (edited) insallah bana demiyorsun sfx maker'i dene die ) ben AutoIT ile uygulama yapiyorum da ondan .i.. Edited May 19, 2010 by Dj Demir Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.