Jump to content

Bilgisayar Açıldığında Scriptin Çalışması


LifeSux
 Share

Recommended Posts

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...

Link to comment
Share on other sites

[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 by LifeSux
Link to comment
Share on other sites

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 by LifeSux
Link to comment
Share on other sites

@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]

Link to comment
Share on other sites

[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ı...

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

@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]

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...