Jump to content

Software Installer


Mehmet
 Share

Recommended Posts

Software Installer katılımsız AIO yapımı+Kodlar

[img]http://i.imgur.com/QvaTJ.png[/img]

Katılımsız aıo ve program için yazılmıştır yapmanız gerekenler
script dosyanızın yanında Software diye bir klasör açmak ve birde Config.ini dosyası açmak

[CODE][program ismi.exe]
parametre=/S
Açıklama=Sistem Temizleyici
kategori=2[/CODE]

Config.ini Örnek içeriği

[CODE][Any Video Converter.exe]
Switch=/verysilent
Desc=Video Format Dönüştürücü
Category=1

[Faststone Capture.exe]
Switch=/S
Desc=Ekran yakalama programı
Category=1

[VLC Media Player.exe]
Switch=/S
Desc=Ücretsiz Medya Oynatıcı
Category=1

[CCleaner.exe]
Switch=/S
Desc=Sistem Temizleyici
Category=2

[FolderSize.exe]
Switch=/verysilent
Desc=Disk Alanı Analiz Programı
Category=2

[Adobe Flash (for IE).exe]
Switch=-install
Desc=Animasyonlu web içeriği görüntüleme
Category=3

[Filezilla.exe]
Switch=/S
Desc=Ücretsiz FTP Programı
Category=3

[Firefox.exe]
Switch=-ms
Desc=Popüler İnternet Tarayıcısı
Category=3

[Opera.msi]
Switch=/qn
Desc=İyi bir internet tarayıcısı
Category=3

[Revolt race.exe]
Switch=/verysilent
Desc=Mini araba yarışı
Category=4

[Hyperspace invader.exe]
Switch=/verysilent
Desc=Uçak Oyunu
Category=4

[7zip.exe]
Switch=/S
Desc=Dosya Sıkıştırma Programı
Category=5

[WeatherMate.msi]
Switch=/qn
Desc=Masaüstü meteoroloji(Hava Durumu)
Category=5

[Avast Antivirus.exe]
Switch=/VERYSILENT /NORESTART /SP-
Desc=Güçlü ücretsiz antivirüs
Category=5

[Adobe Reader.exe]
Desc=Ücretsiz bir PDF görüntüleyici
switch=-ai
Category=6

[Kompozer.exe]
Switch=/verysilent
Desc=HTML Düzenleme Programı
Category=6


[/CODE]

Software klasörüne Config.ini dosyasında yazılan programın adı aynı olma şartıyla parametre desteği olan programlarınızı atmanız yeterlidir.

Software Installer.au3

[spoiler][CODE]#include <GUIConstants.au3>
#include <GuiListView.au3>
#include <Array.au3>
#include <File.au3>

Global $iniFile = @ScriptDir & "\Config.ini"
Global $scriptDir = @ScriptDir

; Main GUI
$Form1 = GUICreate("Software Installer", 633, 451)

$Tab1 = GUICtrlCreateTab(16, 8, 601, 377)
$TabSheet1 = GUICtrlCreateTabItem("Audio/Video/Photo")
$ListView1 = GUICtrlCreateListView("Software Name|Description", 24, 40, 582, 334)
_GUICtrlListView_SetExtendedListViewStyle($ListView1, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES))
GUICtrlSendMsg(-1, 0x101E, 0, 200)
GUICtrlSendMsg(-1, 0x101E, 1, 375)
$TabSheet2 = GUICtrlCreateTabItem("Bilgisayar Bakımı")
$ListView2 = GUICtrlCreateListView("Software Name|Description", 24, 40, 578, 334)
_GUICtrlListView_SetExtendedListViewStyle($ListView2, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES))
GUICtrlSendMsg(-1, 0x101E, 0, 200)
GUICtrlSendMsg(-1, 0x101E, 1, 375)
$TabSheet3 = GUICtrlCreateTabItem("Internet")
$ListView3 = GUICtrlCreateListView("Software Name|Description", 24, 40, 578, 334)
_GUICtrlListView_SetExtendedListViewStyle($ListView3, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES))
GUICtrlSendMsg(-1, 0x101E, 0, 200)
GUICtrlSendMsg(-1, 0x101E, 1, 375)
$TabSheet4 = GUICtrlCreateTabItem("Oyun")
$ListView4 = GUICtrlCreateListView("Software Name|Description", 24, 40, 578, 334)
_GUICtrlListView_SetExtendedListViewStyle($ListView4, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES))
GUICtrlSendMsg(-1, 0x101E, 0, 200)
GUICtrlSendMsg(-1, 0x101E, 1, 375)
$TabSheet5 = GUICtrlCreateTabItem("Çeşitli")
$ListView5 = GUICtrlCreateListView("Software Name|Description", 24, 40, 578, 334)
_GUICtrlListView_SetExtendedListViewStyle($ListView5, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES))
GUICtrlSendMsg(-1, 0x101E, 0, 200)
GUICtrlSendMsg(-1, 0x101E, 1, 375)
$TabSheet6 = GUICtrlCreateTabItem("Ücretsiz")
$ListView6 = GUICtrlCreateListView("Software Name|Description", 24, 40, 578, 334)
_GUICtrlListView_SetExtendedListViewStyle($ListView6, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_GRIDLINES))
GUICtrlSendMsg(-1, 0x101E, 0, 200)
GUICtrlSendMsg(-1, 0x101E, 1, 375)
GUICtrlCreateTabItem("") ; This ends the tab item creation
$Button1 = GUICtrlCreateButton("Seçilen Yazılımı Yükle", 398, 395, 219, 25, 0)
$MenuItem1 = GUICtrlCreateMenu("Dosya")
$MenuItem2 = GUICtrlCreateMenuItem("Unselect All", $MenuItem1)
$MenuItem3 = GUICtrlCreateMenuItem("Çıkış", $MenuItem1)
$MenuItem4 = GUICtrlCreateMenu("Yardım")
$MenuItem5 = GUICtrlCreateMenuItem("Yardım Konular", $MenuItem4)
$MenuItem6 = GUICtrlCreateMenuItem("Hakkında", $MenuItem4)
_Populate()
GUISetState(@SW_SHOW)

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_InstallSelectedSoftware()
Case $MenuItem2
_UnselectAll()
Case $MenuItem3
Exit
Case $MenuItem5
_HelpTopics()
Case $MenuItem6
_AboutProject()
EndSwitch
WEnd

Func _Populate()
; Find all files in the Software folder and populate the tabs with the installers.
$f = FileFindFirstFile("Software/*.*")
Dim $array[1]
$i = 0
Do
$s = FileFindNextFile($f)
If Not @error Then
$array[$i] = $s
$i += 1
ReDim $array[$i + 1]
EndIf
Until @error
ReDim $array[$i]

For $i = 1 To UBound($array) Step 1
$category = IniRead($iniFile, $array[$i - 1], "Category", "5")
$desc = IniRead($iniFile, $array[$i - 1], "Desc", "")
If $category = 1 Then
GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView1)
ElseIf $category = 2 Then
GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView2)
ElseIf $category = 3 Then
GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView3)
ElseIf $category = 4 Then
GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView4)
ElseIf $category = 6 Then
GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView6)
Else
GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView5)
EndIf
Next
EndFunc ;==>_Populate

Func _InstallSelectedSoftware()
Dim $sArray[1]

; Find which items were selected by user on all six tabs
$count = _GUICtrlListView_GetItemCount($ListView1)
$aCount = 0
For $i = 1 To $count Step 1
If _GUICtrlListView_GetItemChecked($ListView1, $i - 1) = True Then
$sArray[$aCount] = _GUICtrlListView_GetItemText($ListView1, $i - 1)
ReDim $sArray[UBound($sArray) + 1]
$aCount += 1
EndIf
Next

$count = _GUICtrlListView_GetItemCount($ListView2)
For $i = 1 To $count Step 1
If _GUICtrlListView_GetItemChecked($ListView2, $i - 1) = True Then
$sArray[$aCount] = _GUICtrlListView_GetItemText($ListView2, $i - 1)
ReDim $sArray[UBound($sArray) + 1]
$aCount += 1
EndIf
Next

$count = _GUICtrlListView_GetItemCount($ListView3)
For $i = 1 To $count Step 1
If _GUICtrlListView_GetItemChecked($ListView3, $i - 1) = True Then
$sArray[$aCount] = _GUICtrlListView_GetItemText($ListView3, $i - 1)
ReDim $sArray[UBound($sArray) + 1]
$aCount += 1
EndIf
Next

$count = _GUICtrlListView_GetItemCount($ListView4)
For $i = 1 To $count Step 1
If _GUICtrlListView_GetItemChecked($ListView4, $i - 1) = True Then
$sArray[$aCount] = _GUICtrlListView_GetItemText($ListView4, $i - 1)
ReDim $sArray[UBound($sArray) + 1]
$aCount += 1
EndIf
Next

$count = _GUICtrlListView_GetItemCount($ListView5)
For $i = 1 To $count Step 1
If _GUICtrlListView_GetItemChecked($ListView5, $i - 1) = True Then
$sArray[$aCount] = _GUICtrlListView_GetItemText($ListView5, $i - 1)
ReDim $sArray[UBound($sArray) + 1]
$aCount += 1
EndIf
Next

$count = _GUICtrlListView_GetItemCount($ListView6)
For $i = 1 To $count Step 1
If _GUICtrlListView_GetItemChecked($ListView6, $i - 1) = True Then
$sArray[$aCount] = _GUICtrlListView_GetItemText($ListView6, $i - 1)
ReDim $sArray[UBound($sArray) + 1]
$aCount += 1
EndIf
Next

; Begin installing selected software
ProgressOn("Software Installer", "Installing", "", -1, -1, 16)
For $i = 1 To UBound($sArray) - 1 Step 1
$fileName = $sArray[$i - 1]
$switch = IniRead($iniFile, $fileName, "Switch", "")
Local $szDrive, $szDir, $szFName, $szExt
$extension = StringRight($fileName, 3)
If $extension = "msi" Then
Run("msiexec /i " & '"' & $scriptDir & "\Software\" & $fileName & '" ' & $switch) ; For MSI type installers
Else
RunWait('"' & $scriptDir & "\Software\" & $fileName & '"' & " " & $switch) ; For EXE installers
EndIf
ProgressSet($i / (UBound($sArray) - 1) * 100, Round($i / (UBound($sArray) - 1) * 100, 0) & "%", "Installing " & $i & " of " & UBound($sArray) - 1)
Next
ProgressOff()
EndFunc ;==>_InstallSelectedSoftware

Func _UnselectAll()
$count = _GUICtrlListView_GetItemCount($ListView1)
For $i = 1 To $count Step 1
_GUICtrlListView_SetItemChecked($ListView1, $i, False)
Next

$count = _GUICtrlListView_GetItemCount($ListView2)
For $i = 1 To $count Step 1
_GUICtrlListView_SetItemChecked($ListView2, $i, False)
Next

$count = _GUICtrlListView_GetItemCount($ListView3)
For $i = 1 To $count Step 1
_GUICtrlListView_SetItemChecked($ListView3, $i, False)
Next

$count = _GUICtrlListView_GetItemCount($ListView4)
For $i = 1 To $count Step 1
_GUICtrlListView_SetItemChecked($ListView4, $i, False)
Next

$count = _GUICtrlListView_GetItemCount($ListView5)
For $i = 1 To $count Step 1
_GUICtrlListView_SetItemChecked($ListView5, $i, False)
Next

$count = _GUICtrlListView_GetItemCount($ListView6)
For $i = 1 To $count Step 1
_GUICtrlListView_SetItemChecked($ListView6, $i, False)
Next
EndFunc ;==>_UnselectAll

Func _HelpTopics()
$Form2 = GUICreate("Help Topics", 633, 447)
$Label1 = GUICtrlCreateLabel("", 8, 16, 612, 425)
GUICtrlSetData(-1, "Bu program sessiz parametre ile program kurmak için geliştirilmiştir. Örnek: " & @CRLF & @CRLF & "[7zip.exe]" & @CRLF & "Switch=/S" & @CRLF & "Desc=A zip file utility" & @CRLF & "Category=5" & @CRLF & @CRLF & "The name of the file is the first line in the brackets. The line with Switch= is the section for the unattended switch. The Desc= is the description for the program. The Category= is the tab you want the program to show up on the interface." & @CRLF & @CRLF & "Here are some common switches for various installers:" & @CRLF & @CRLF & "/silent used for Inno Setup installers" & @CRLF & "/verysilent used for Inno Setup installers" & @CRLF & "/S used for Nullsoft (aka NSIS) installers" & @CRLF & "/s used for Wise installers" & @CRLF & "-s used for Ghost installers" & @CRLF & "-ms used for Mozilla installers" & @CRLF & "/quiet used for Microsoft installers" & @CRLF & "/qb used for Microsoft installers" & @CRLF & "/qn used for Microsoft installers" & @CRLF & "/passive used for Microsoft installers" & @CRLF & "/Q used for Microsoft installers" & @CRLF & @CRLF & "Note: Some installers are case sensitive (Ghost and Nullsoft for sure).")
GUISetState(@SW_SHOW)

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
GUIDelete($Form2)
ExitLoop
EndSwitch
WEnd
EndFunc ;==>_HelpTopics

Func _AboutProject()
$Form3 = GUICreate("About", 413, 196)
$Label1a = GUICtrlCreateLabel("", 24, 64, 364, 113)
$Label2a = GUICtrlCreateLabel("TNCTR Software Installer 1.0", 24, 8, 375, 41)
GUICtrlSetFont(-1, 10, 800, 2, "MS Sans Serif")
GUICtrlSetColor(-1, 0x000080)
GUISetState(@SW_SHOW)
$aboutData = "Abberration tarafından geliştirilmiştir|Türkçe Düzenleme TNCTR MeHMeTBeN"
$sData = StringSplit($aboutData, "|", 2)
$string = ""
For $i = 1 To UBound($sData) Step 1
$string = $string & @CRLF & $sData[$i - 1] & @CRLF
GUICtrlSetData($Label1a, $string)
Sleep(1000)
Next

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
GUIDelete($Form3)
ExitLoop
EndSwitch
WEnd
EndFunc ;==>_AboutProject[/CODE][/spoiler]


Tümü:

:download1:

1.4 MB

[CODE]http://www.mediafire.com/?6y18y8b01aytwev[/CODE]

[b]Not:Alıntıdır..[/b] Edited by MeHMeTBeN
Link to comment
Share on other sites

  • 10 ay sonra...

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