WolfmanTR_ Posted March 23, 2013 Share Posted March 23, 2013 arkadaşlar bir proje üzerindeçalışıyorum.şimdi bir dosya oluşturuyorum (chrome_ydk) bu dosyaya nasıl chrome ico su atayabilirim ? Quote Link to comment Share on other sites More sharing options...
MostWanted Posted March 23, 2013 Share Posted March 23, 2013 (edited) Func RegCreateExt ($Ext, $Name, $Description, $Icon) If $Ext = "" Then $Ext = "*" EndIf If $Name = "" Then $Name = $ext $Description = "" EndIf If StringLeft ($Ext, 1) <> "." and StringLeft ($Ext, 1) <> "*" Then $Ext = "." & $Ext EndIf $icon = StringSplit ($icon, ",") If $Icon[0] > 2 Then Return SetError (1) Else $Icon[0] = StringStripWS (FileGetShortName ($Icon[1]) & "," & $Icon[2], 8) EndIf RegRead ("HKCR\" & $Ext, "") If Not @Error Then Return SetError (2); Extension already Exists Else RegRead ("HKCR\" & $Name, "") If Not @Error Then Return SetError (3); Name already Exists Else RegWrite ("HKCR\" & $Name, "", "REG_SZ", $Description) RegWrite ("HKCR\" & $Ext, "", "REG_SZ", $Name) RegWrite ("HKCR\" & $Name & "\DefaultIcon", "", "REG_SZ", $Icon[0]) EndIf EndIf EndFunc ; ==> RegCreateExt Zamanında bu fonksiyonu kullanmıştım.Parametre olarak ; $Ext : oluşturacağın uzantıyı giriyorsun $Name: Video Dosyası vs. $Description : explorer da gözükeceği adı. $Icon : o ikonun yolu ama sonunda ,0 yazmalısın. (.ico koy işler karışmasın.Exeden de alabiliyor fakat dediğim gibi karışmasın.) İstersen bu fonksiyonu aldığım örnek aşağıda.Kolay gelsin. http://rapidshare.com/files/2903106112/FileTypeCreator.au3 Edited March 23, 2013 by MostWanted Quote Link to comment Share on other sites More sharing options...
WolfmanTR_ Posted March 23, 2013 Author Share Posted March 23, 2013 @MostWanted birşey belirtmeyi unuttum.ben dosyayı Autoplay ile oluşturuyorum.sadece sistemde bulunan o dosyaya ico göstermesini sağlayacağım. Quote Link to comment Share on other sites More sharing options...
abdullahTR Posted March 23, 2013 Share Posted March 23, 2013 autoplayle yapıyon autoit bölümüne konu acıyorsun :D Quote Link to comment Share on other sites More sharing options...
WolfmanTR_ Posted March 23, 2013 Author Share Posted March 23, 2013 autoplayle yapıyon autoit bölümüne konu acıyorsun :D ico atamak için autoit kullanacağım da oyüzden bu bölüme açtım. Quote Link to comment Share on other sites More sharing options...
WolfmanTR_ Posted March 24, 2013 Author Share Posted March 24, 2013 @MostWanted birşey belirtmeyi unuttum.ben dosyayı Autoplay ile oluşturuyorum.sadece sistemde bulunan o dosyaya ico göstermesini sağlayacağım. Quote Link to comment Share on other sites More sharing options...
reyiz Posted March 24, 2013 Share Posted March 24, 2013 Yani sistemde bulunan chrome.exe'nin .ico dosyasını AutoIt ile kaydedip Autoplay Media Studio'ya göstermek istiyorsunuz? Quote Link to comment Share on other sites More sharing options...
WolfmanTR_ Posted March 24, 2013 Author Share Posted March 24, 2013 Yani sistemde bulunan chrome.exe'nin .ico dosyasını AutoIt ile kaydedip Autoplay Media Studio'ya göstermek istiyorsunuz? hayır, şimdi ben autoplay ile bir program yazdırm beliki görmüşsünüzdür tarayıcı yedekle diye.Tarayıcı yedekleyince ".chrome_ydk" adında bir dosya oluşturoyor. o .chrome_ydk dosyasına chrome ico sunu entegre etmek istiyorum. Quote Link to comment Share on other sites More sharing options...
reyiz Posted March 24, 2013 Share Posted March 24, 2013 (edited) Dosya .exe dosyası olmadığı için gömdüğünüz icon gözükmeyecektir. Fakat kayıt defterini kullanarak bunu yapabilirsiniz. Bu kaydı Autoplay Media Studio ile de yapabilirsiniz. Umarım dediğinizi doğru anlamışımdır. Ayrıca chrome yolunda değişken kullanmalısınız, ya da icon'u çıkarttırıp bu şekilde gösterebilirsiniz. RegWrite('HKEY_CLASSES_ROOT\.chrome_ydk\DefaultIcon',"","REG_SZ",'"C:\Program Files\Google\Chrome\Application\chrome.exe"') Edited March 24, 2013 by reyiz Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted March 24, 2013 Editor Share Posted March 24, 2013 Tamam mostwanted ın verdiği örnek işini görecektir. Quote Link to comment Share on other sites More sharing options...
reyiz Posted March 24, 2013 Share Posted March 24, 2013 Icon önbelleğinden dolayı değişiklik gözükmüyor. İlk önce bu kaydı kayıt defterine girdirip daha sonra dosyayı oluştutturursanız değişiklik gözükecektir ve farklı bilgisayarlarda çalışacaktır. Sizde gözükmesi için CCleaner ile icon önbelleğini temizledikten sonra oturumu kapatıp açmalısınız. Quote Link to comment Share on other sites More sharing options...
reyiz Posted March 24, 2013 Share Posted March 24, 2013 Bir şey daha eklemek istiyorum. Eğer yeni bir proje üzerinde çalışmıyor iseniz .chrome_ydk dosyası başkalarında da ikonu değişmemiş şekilde gözükecektir. Bunu aşağıda verdiğim programı AIO açıldığında çalıştıttırırsanız sorun ortadan kalkacaktır: https://www.box.com/s/u87ipakqj8emit44ode3 Quote Link to comment Share on other sites More sharing options...
WolfmanTR_ Posted June 7, 2015 Author Share Posted June 7, 2015 (edited) ana iletiyi düzenleyemediğim için tekrar yazıyorum. Geliştirdiğim bir ürün olan (browser backup) ı zaman içerisinde daha stabil hale getirmeye çalışacağım. Kendi oluşturduğum yedek dosyalarını sisteme tanıtmam lazım, icon atayabildim ancak Dosya türü ve explorer da ki uzantıyı kaldıramadım.(.chrome_ydk vs vs..) @MostWanted 'ın verdiği script aklıma geldi ve işe girişeyim dedim. birkaç işlem yaptım çalıştırdım ancak hatalar olduğundan dolayı script çalışmadı(yanlış düzenlemeler yapmış olabilirim.)Vede icon u nasıl tanıtacağımı anlayamadım. MostWanted ın düzenlediğim script i : #RequireAdmin Func RegCreateExt ($Ext, $Name, $Description, $Icon) If $Ext = "" Then $Ext = ".chrome_ydk" EndIf If $Name = "" Then $Name = "Browser Backup - Chrome Backup File" $Description = "Browser Backup - Chrome Backup File" EndIf If StringLeft ($Ext, 1) <> "." and StringLeft ($Ext, 1) <> "*" Then $Ext = "." & $Ext EndIf $icon = StringSplit ($icon, ",") If $Icon[0] > 2 Then Return SetError (1) Else $Icon[0] = StringStripWS (FileGetShortName ($Icon[1]) & "," & $Icon[2], 8) EndIf RegRead ("HKCR\" & $Ext, "") If Not @Error Then Return SetError (2); Extension already Exists Else RegRead ("HKCR\" & $Name, "") If Not @Error Then Return SetError (3); Name already Exists Else RegWrite ("HKCR\" & $Name, "", "REG_SZ", $Description) RegWrite ("HKCR\" & $Ext, "", "REG_SZ", $Name) RegWrite ("HKCR\" & $Name & "\DefaultIcon", "", "REG_SZ", $Icon[0]) EndIf EndIf EndFunc ; ==> RegCreateExt kendim icon u tanıtma şeklim #RequireAdmin IF FILEEXISTS ( @WINDOWSDIR & "\BBIcon.exe" ) THEN SLEEP ( 1000 ) ELSE FILEINSTALL ( "BBIcon.exe" , @WINDOWSDIR & "\BBIcon.exe" , 1 ) REGWRITE ( "HKEY_CLASSES_ROOT\.chrome_ydk\DefaultIcon" , "" , "REG_SZ" , "C:\Windows\BBIcon.exe" ) REGWRITE ( "HKEY_CLASSES_ROOT\.firefox_ydk\DefaultIcon" , "" , "REG_SZ" , "C:\Windows\BBIcon.exe") REGWRITE ( "HKEY_CLASSES_ROOT\.yandex_ydk\DefaultIcon" , "" , "REG_SZ" , "C:\Windows\BBIcon.exe" ) REGWRITE ( "HKEY_CLASSES_ROOT\.opera_ydk\DefaultIcon" , "" , "REG_SZ" , "C:\Windows\BBIcon.exe" ) REGWRITE ( "HKEY_CLASSES_ROOT\.dragon_ydk\DefaultIcon" , "" , "REG_SZ" , "C:\Windows\BBIcon.exe" ) REGWRITE ( "HKEY_CLASSES_ROOT\.safari_ydk\DefaultIcon" , "" , "REG_SZ" , "C:\Windows\BBIcon.exe" ) RUN ( "iconcache" ) ENDIF Edited June 7, 2015 by WolfmanTR_ Quote Link to comment Share on other sites More sharing options...
MostWanted Posted June 9, 2015 Share Posted June 9, 2015 İkon atayabildiğine göre kodda bir sorun olmasa gerek (ki senin kodun da tek başına yeterli). Uzantı gizleme ilgili biraz araştırma yaptım fakat bir sonuca ulaşamadım, ama kendi uzantılarının programınla ilişkili olmasını istiyorsan aşağıdaki kodu deneyebilirsin; FileExtAssoc("chrome_ydk", 'bilmem_ne.exe') func FileExtAssoc($sExt, $sApplication) RunWait(@COMSPEC & " /c ASSOC ." & $sExt & "=ExTest", "", @SW_HIDE) RunWait(@COMSPEC & " /c FTYPE ExTest=" & $sApplication , "", @SW_HIDE) EndFunc Quote Link to comment Share on other sites More sharing options...
WolfmanTR_ Posted June 10, 2015 Author Share Posted June 10, 2015 (edited) İkon atayabildiğine göre kodda bir sorun olmasa gerek (ki senin kodun da tek başına yeterli). Uzantı gizleme ilgili biraz araştırma yaptım fakat bir sonuca ulaşamadım, ama kendi uzantılarının programınla ilişkili olmasını istiyorsan aşağıdaki kodu deneyebilirsin; FileExtAssoc("chrome_ydk", 'bilmem_ne.exe') func FileExtAssoc($sExt, $sApplication) RunWait(@COMSPEC & " /c ASSOC ." & $sExt & "=ExTest", "", @SW_HIDE) RunWait(@COMSPEC & " /c FTYPE ExTest=" & $sApplication , "", @SW_HIDE) EndFunc sisteme chrome_ydk i tanıtmam gerekiyormuş. bilmem_ne.exe yi direk bilmem_ne.exe mi ? yoksa %programfiles%\AAA\bilmem_ne.exe şeklinde mi yazmalıyım ? edit; program asıl AMS de yazıldığı ,sadece regedit girdileri autoit idi.Artık regedit girdilerinide AMS de yapma kararı aldım ve başarı ile sonuçlandı.İcon ve Dosya türü(açıklama) ekleyebiliyorum.İlişkilendirme ve uzantı silme işlemine uğraşıcam autoplay ile girdiğim reg.: result = Registry.DoesKeyExist(HKEY_CLASSES_ROOT, ".chrome_ydk"); if result == false then Dialog.Message("","not fount"); Registry.CreateKey(HKEY_CLASSES_ROOT, ".chrome_ydk"); Registry.CreateKey(HKEY_CLASSES_ROOT, ".chrome_ydk\\DefaultIcon"); Registry.CreateKey(HKEY_CLASSES_ROOT, ".chrome_ydk\\ShellEx"); Registry.SetValue(HKEY_CLASSES_ROOT, ".chrome_ydk", "", "Chrome Backup File", REG_SZ); Registry.SetValue(HKEY_CLASSES_ROOT, ".chrome_ydk\\DefaultIcon", "", "C:\\Windows\\BBIcon.exe", REG_SZ); Dialog.Message("","reg added!"); else result = Dialog.Message("Notice", "ok!", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); Application.Sleep(100); end Edited June 10, 2015 by WolfmanTR_ Quote Link to comment Share on other sites More sharing options...
MostWanted Posted June 16, 2015 Share Posted June 16, 2015 İlişkilendirmeyi üstte gösterdiğim gibi yapabilirsin. Bunu ams ile de yapabilirsin. Sonuç olarak üstte gösterdiğim kodda Command Line belli bir komutla çalıtırılarak işlem gerçekleştiriliyor. bilmem_ne.exe yerine de tam yolu yazman gerekiyor. 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.