Jump to content

Autoit De Ini Dosyasından Program Çalıştırma


sar02
 Share

Recommended Posts

help dosyasından
[CODE]
Example()
Func Example()
; Write the value of 'AutoIt' to the key 'Title' and in the section labelled 'General'.
IniWrite(@ScriptDir & "\Example.ini", "General", "Title", "AutoIt")
; Read the INI file for the value of 'Title' in the section labelled 'General'.
Local $sRead = IniRead(@ScriptDir & "\Example.ini", "General", "Title", "Default Value")
; Display the value returned by IniRead.
MsgBox(4096, "", "The value of 'Title' in the section labelled 'General' is: " & $sRead)
; Delete the key labelled 'Title'.
IniDelete(@ScriptDir & "\Example.ini", "General", "Title")
; Read the INI file for the value of 'Title' in the section labelled 'General'.
$sRead = IniRead(@ScriptDir & "\Example.ini", "General", "Title", "Default Value")
; Display the value returned by IniRead. Since there is no key stored the value will be the 'Default Value' passed to IniRead.
MsgBox(4096, "", "The value of 'Title' in the section labelled 'General' is: " & $sRead)
; Delete the INI file.
FileDelete(@ScriptDir & "\Example.ini")
EndFunc ;==>Example

[/CODE]
[CODE]
Local $var = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion", "ProgramFilesDir")
MsgBox(4096, "Program files are in:", $var)
[/CODE]

[CODE]
RegWrite("HKEY_CURRENT_USER\Software\Test", "TestKey", "REG_SZ", "Hello this is a test")
; Write the REG_MULTI_SZ value of "line1" and "line2"
RegWrite("HKEY_CURRENT_USER\Software\Test", "TestKey1", "REG_MULTI_SZ", "line1" & @LF & "line2")
; Write the REG_MULTI_SZ value of "line1"
RegWrite("HKEY_CURRENT_USER\Software\Test", "TestKey2", "REG_MULTI_SZ", "line1")
; always add and extra null string
RegWrite("HKEY_CURRENT_USER\Software\Test", "TestKey3", "REG_MULTI_SZ", "line1" & @LF & "line2" & @LF)
RegWrite("HKEY_CURRENT_USER\Software\Test", "TestKey4", "REG_MULTI_SZ", "line1" & @LF & @LF & "line2" & @LF)
; empty REG_MULTI_SZ
RegWrite("HKEY_CURRENT_USER\Software\Test", "TestKey5", "REG_MULTI_SZ", "")
; create just the key
RegWrite("HKEY_CURRENT_USER\Software\Test1")
[/CODE]

Link to comment
Share on other sites

Bu Kodlar içinde iniread,iniwrite,inidelete gibi karışık farklı işlevler var. Yapmak istediğim işi daha açık şekilde şöyle ifade edeyim:
ben öyle bir kod yazmalıyım ki: kod katılımsız olan setup.exe ve yama.exe yi settings.ini den çalıştıracak ve settings.ini dosyası olacak içinde şunlar yazacak ve daha sonra ini dosyasında değişiklik yapılarak yeni programlar da eklenebilecek (3=program.exe gibi) Yani instaltips.exe gibi olacak ama ekranda yazı belirmeyecek

[KURULUM]
1=setup.exe
2=yama.exe

buna göre bir kod yazılabilir mi?

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