LifeSux Posted September 17, 2011 Share Posted September 17, 2011 Scriptin windowsun her açılışında otomatik çalışmasını nasıl sağlayabilirim? Quote Link to comment Share on other sites More sharing options...
blue_life Posted September 17, 2011 Share Posted September 17, 2011 Bilgisayar başlangıcında çalıştırmak istediğin programın konumu [b]HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run[/b] anahtarı altına girebilirsiniz. Kısa bir örnek vermem gerekirse; [codebox]_Blue_Add_Startup(@WindowsDir & "\notepad.exe","Notepad") Func _Blue_Add_Startup($RegValue,$RegValueName = "") Local $Target_Key = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" If @OSArch <> "X86" Then $Target_Key = "HKLM64\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" RegWrite($Target_Key, $RegValueName, "REG_SZ", $RegValue) EndFunc[/codebox] Eğer yapacağın autoit çalışmasının ismi sabit deyilse [b]@AutoItExe[/b] pramaetresini kullanabilirsin. Yani yukarıdaki örnekte notepad.exe konumu yerine @AutoItExe yazacaksın. Neyse kolay gelsin... Quote Link to comment Share on other sites More sharing options...
LifeSux Posted September 17, 2011 Author Share Posted September 17, 2011 (edited) [b]Yaptığım klasik tek bir .exe dosyası. ben bunu şu şekilde programın üst kısmına koydum. 1 kere açıldıktan sonra her windows açılışında çalışıcak değil mi artık ? Yani deneme.exe dosyanın adı. acaba deneme.exe mi yazmalıydım ? her 2 şekildede çalışır mı acaba ? [/b] [code]_Blue_Add_Startup(@WindowsDir & "\@AutoItExe ","AutoIt") Func _Blue_Add_Startup($RegValue,$RegValueName = "") Local $Target_Key = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" If @OSArch <> "X86" Then $Target_Key = "HKLM64\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" RegWrite($Target_Key, $RegValueName, "REG_SZ", $RegValue) EndFunc[/code] Edited September 17, 2011 by LifeSux Quote Link to comment Share on other sites More sharing options...
SimpsoN_Bart Posted September 17, 2011 Share Posted September 17, 2011 [font="Georgia"]Yanlış anlamadıysam, evet çalışır. Şunu da belirtelim @AutoItExe macro'dur. Yani Autoit uygulamasının tam yolu ve dosya adıyla aynı işlevi görür.[/font] Quote Link to comment Share on other sites More sharing options...
LifeSux Posted September 17, 2011 Author Share Posted September 17, 2011 (edited) 1 sn tam anlayamadım. Şimdi benim yaptığım scriptin ismi deneme.exe bana tam koyucağım kodu verebilir misiniz ? Ayrıca bunu sadece kendi bilgisayarımda kullanmayacağım. Farklı bilgisayarlardada çalışsın yani. Edited September 17, 2011 by LifeSux Quote Link to comment Share on other sites More sharing options...
blue_life Posted September 17, 2011 Share Posted September 17, 2011 @LifeSux Gerekli bilgilendirmeyi yaptık aslında! Yani senin sadece ilgili satırı kendine göre düzelmen lazım. Hadi senin için bir örnek yapalım; [codebox]_Blue_Add_Startup(@AutoItExe,"AutoIt") MsgBox(64,"Yuppi","Hey sen, bak ben çalıştım ") ;Kodların buradan devam... ; vs. vs. Func _Blue_Add_Startup($RegValue,$RegValueName = "") Local $Target_Key = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" If @OSArch <> "X86" Then $Target_Key = "HKLM64\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" RegWrite($Target_Key, $RegValueName, "REG_SZ", $RegValue) EndFunc[/codebox] Quote Link to comment Share on other sites More sharing options...
LifeSux Posted September 22, 2011 Author Share Posted September 22, 2011 [quote name='blue_life' date='17 September 2011 - 17:21 ' timestamp='1316272894' post='1081219'] @LifeSux Gerekli bilgilendirmeyi yaptık aslında! Yani senin sadece ilgili satırı kendine göre düzelmen lazım. Hadi senin için bir örnek yapalım; [codebox]_Blue_Add_Startup(@AutoItExe,"AutoIt") MsgBox(64,"Yuppi","Hey sen, bak ben çalıştım ") ;Kodların buradan devam... ; vs. vs. Func _Blue_Add_Startup($RegValue,$RegValueName = "") Local $Target_Key = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" If @OSArch <> "X86" Then $Target_Key = "HKLM64\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" RegWrite($Target_Key, $RegValueName, "REG_SZ", $RegValue) EndFunc[/codebox] [/quote] Programın scriptinin en üst kısmına verdiğin kodun aynısını yapıstırdım. Exe ye dönüstürüp run script dediğimde msg box geldi. sonra bilgisayarı yeniden başlattım ancak msgbox gelmedi. ve program çalışmadı... Quote Link to comment Share on other sites More sharing options...
noeldede Posted September 22, 2011 Share Posted September 22, 2011 Kardeş yazdığın dosyanın uzattısını bat yap sonra c:\ kullanıcılar all user proğramlar başlagıcın içerisine at en sağlam olanı budur hem kodun bozulmaz hem her halukarda çalışır hangı kullanıcı açarsa açsın aynı şekılde çalışır sade sende çalışmasını istiyorsan kendı kullanıcına uygula sorun yaşarsan yardımcı ola bılırımm. Quote Link to comment Share on other sites More sharing options...
blue_life Posted September 24, 2011 Share Posted September 24, 2011 @LifeSux Kodlaırnı paylaşabilrisen nerde hata olduğunu söyleyebilirim. Normalde çalışması lazım! Kodlarda bir sorun görünmüyor! Ama sistemin Vista, W7 vs. ise ilgili programı yönetici olarak çalıştırman lazım. Yani; [codebox] #RequireAdmin _Blue_Add_Startup(@AutoItExe,"AutoIt") MsgBox(64,"Yuppi","Hey sen, bak ben çalıştım ") ;Kodların buradan devam... ; vs. vs. Func _Blue_Add_Startup($RegValue,$RegValueName = "") Local $Target_Key = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" If @OSArch <> "X86" Then $Target_Key = "HKLM64\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" RegWrite($Target_Key, $RegValueName, "REG_SZ", $RegValue) EndFunc[/codebox] Quote Link to comment Share on other sites More sharing options...
LifeSux Posted September 24, 2011 Author Share Posted September 24, 2011 Teşekkürler blue Ama mesela bu seferde çalışsın mı diye soruyor başlangıçta. Ama msn gibi diğer programlar hemen açılıyor sormadan. Güvenlik duvarı ile ilgili bir şey mi bu ? Quote Link to comment Share on other sites More sharing options...
blue_life Posted September 24, 2011 Share Posted September 24, 2011 Anlamadım! Scriptin içinde bu şekilde mesaj mı mevcut! Ayrıca sen derledikten sonra bunu denemelisin. Yoksa normal autoit.exe çalşır ve senden script seçmeni ister. 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.