techguy86

Software Installer

2 posts in this topic

Trying to perform a nearly silent install of Splashtop Business. (www.splashtop.com) Need to embed an executable into AutoIt and add command line parameters upon execution.

Here are my thoughts/ideas, but it won't run.

Quote

#Include "RemoteConnect3102.exe"
ShellExecute ( "RemoteConnect3102.exe" , "prevercheck" & " /s" & " /i" & " dcode=uniquecode,confirm_d=0,hidewindow=1" )

 

 


My Programs:Dissolve (Updated 5-30-06)Credit Card Validator (Not created as of yet)Master Lock Combination Cracker (Updated 7-08-07)Go Siteseeing:My Website: - Click HereCyberZeroCool's Website - Click Here

Share this post


Link to post
Share on other sites



Separated your post into a new topic in support.

To "include" a binary file you need to use Fileinstall(). Check the helpfile for details and example.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Similar Content

    • abberration
      Software Installer
      By abberration
      I created a software installer for myself a few years ago. I decided to re-do the code to make tabs with categories. Here's how it works: you put all your software in a folder called Software. You configure an ini file with silent switches, software descriptions and which tab you want it to show up in. Then check the boxes for the software you want to install, click the button and it will install your selections silently.

      Screenshot:



      I am attaching the .au3 file and my own Config.ini file. It should be a good template for you to use. If you want to use the Config.ini file, just rename your installer to match the ini headers. Example: if you download Adobe Reader, the installer may be named something like: AdbeRdr1000_en_US.exe. Rename it to simply Adobe Reader.exe. It makes it easier to read in the list of software.

      Software Installer.au3:

      #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("Computer Maintenance") $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("Games") $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("Miscellaneous") $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("Productivity") $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("Install Selected Software", 398, 395, 219, 25, 0) $MenuItem1 = GUICtrlCreateMenu("File") $MenuItem2 = GUICtrlCreateMenuItem("Unselect All", $MenuItem1) $MenuItem3 = GUICtrlCreateMenuItem("Exit", $MenuItem1) $MenuItem4 = GUICtrlCreateMenu("Help") $MenuItem5 = GUICtrlCreateMenuItem("Help Topics", $MenuItem4) $MenuItem6 = GUICtrlCreateMenuItem("About", $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 - 1, False) Next $count = _GUICtrlListView_GetItemCount($ListView2) For $i = 1 To $count Step 1 _GUICtrlListView_SetItemChecked($ListView2, $i - 1, False) Next $count = _GUICtrlListView_GetItemCount($ListView3) For $i = 1 To $count Step 1 _GUICtrlListView_SetItemChecked($ListView3, $i - 1, False) Next $count = _GUICtrlListView_GetItemCount($ListView4) For $i = 1 To $count Step 1 _GUICtrlListView_SetItemChecked($ListView4, $i - 1, False) Next $count = _GUICtrlListView_GetItemCount($ListView5) For $i = 1 To $count Step 1 _GUICtrlListView_SetItemChecked($ListView5, $i - 1, False) Next $count = _GUICtrlListView_GetItemCount($ListView6) For $i = 1 To $count Step 1 _GUICtrlListView_SetItemChecked($ListView6, $i - 1, False) Next EndFunc ;==>_UnselectAll Func _HelpTopics() $Form2 = GUICreate("Help Topics", 633, 447) $Label1 = GUICtrlCreateLabel("", 8, 16, 612, 425) GUICtrlSetData(-1, "This program uses silent switches to install software without user interaction. To use this functionality, you can edit the Config.ini file to add software and their switches. Example: " & @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("Software Installer 1.0", 24, 8, 375, 41) GUICtrlSetFont(-1, 24, 800, 2, "MS Sans Serif") GUICtrlSetColor(-1, 0x000080) GUISetState(@SW_SHOW) $aboutData = "This program was written|in a programming language called Autoit||Brought to you by abberration" $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
      Config.ini:

      [7zip.exe] Switch=/S Desc=A zip file utility Category=5 [Adobe Reader.exe] Desc=A free PDF viewer switch=-ai Category=6 [CCleaner.exe] Switch=/S Desc=Clean up junk on your computer Category=2 [Adobe Flash (for IE).exe] Switch=-install Desc=View animated web content Category=3 [Adobe Flash (non-IE).exe] Switch=-install Desc=View animated web content Category=3 [Combined Community Codec Pack.exe] Switch=/verysilent Desc=Large collection of codecs Category=1 [Defraggler.exe] Switch=/S Desc=Defrag your hard drive Category=2 [Faststone Capture.exe] Switch=/S Desc=Screen capture program Category=1 [GFI Backup.exe] Switch=/silent Desc=Scheduled backups of files & folders Category=6 [KeePass.exe] Switch=/verysilent Desc=Password management program Category=6 [Firefox.exe] Switch=-ms Desc=Fast, secure web browser Category=3 [Office 2007 Compatibility Pack.exe] Switch=/quiet Desc=Open newer Office files with older versions Category=6 [PhotoFiltre.exe] Switch=/verysilent Desc=Photo editing program Category=1 [Sunbird.exe] Switch=-ms Desc=Calendar/management program Category=6 [Thunderbird.exe] Switch=-ms Desc=Email client Category=6 [System Information for Windows.exe] Switch=/verysilent Desc=Lists all information about your computer Category=2 [TrueCrypt.exe] Switch=/verysilent Desc=A very strong encryption program Category=5 [uTorrent.exe] Switch=/PERFORMINSTALL 6 Desc=A lightweight torrent downloader Category=3 [DVD Shrink.exe] Switch=/verysilent Desc=Rip & burn DVDs Category=1 [Filezilla.exe] Switch=/S Desc=FTP client Category=3 [Exact Audio Copy.exe] Switch=/S Desc=An accurate CD ripping program Category=5 [RocketDock.exe] Switch=/verysilent Desc=Quick launcher similar to the Mac's Category=5 [Open Office.exe] Switch=/S Desc=The free version of Microsoft's Office Category=6 [File Shredder.exe] Switch=/verysilent Desc=Doesn't just delete files - it shreds them Category=5 [VLC Media Player.exe] Switch=/S Desc=Media player that comes with own codecs Category=1 [Free Audio Editor.exe] Switch=/silent Desc=Edit audio tracks Category=1 [Rainlendar.exe] Switch=/S Desc=Slick desktop calendar & reminder Category=6 [XPlorer.exe] Switch=/S Desc=Alternative to Windows' Explorer Category=5 [Any Video Converter.exe] Switch=/verysilent Desc=Converts video to different formats Category=1 [TheSage.exe] Switch=/verysilent Desc=Dictionary and Thesaurus Category=6 [BurnAware.exe] Switch=/verysilent Desc=CD/DVD/Blu-ray Disc burning software Category=5 [FolderSize.exe] Switch=/verysilent Desc=Graphically lists folders by size Category=2 [TagScanner.exe] Switch=/verysilent Desc=Edit the hidden tags in your MP3s Category=1 [Personal Video Database.exe] Switch=/verysilent Desc=Manage your movie collection Category=1 [Radio Sure.exe] Switch=/verysilent Desc=Stream music from online stations Category=1 [WeatherMate.msi] Switch=/qn Desc=Desktop weather station Category=5 [Kompozer.exe] Switch=/verysilent Desc=HTML creator/editor Category=6 [Free Download Manager.exe] Switch=/verysilent Desc=An efficient way to download files Category=3 [Miranda IM.exe] Switch=/S Desc=Instant messenger works with others IMs Category=3 [Phoner.exe] Switch=/verysilent Desc=Make VOIP calls for free Category=3 [Essential PIM.exe] Switch=/S Desc=Personal information manager Category=6 [CrystalDiskInfo.exe] Switch=/verysilent Desc=Hard drive information utility Category=2 [eMule.exe] Switch=/S Desc=P2P files sharing client Category=3 [VirtualBox.exe] Switch= Desc=Run different OSes in your computer Category=5 [Daylight Savings Time Patch (XP).exe] Switch=/quiet Desc=Patches XP for the correct DST date Category=5 [EASEUS Todo Backup.exe] Switch=/SP- /verysilent /norestart Desc=Back up your entire computer Category=6 [EASEUS Partition Manager.exe] Switch=/verysilent Desc=Create, delete or resize partitions on your hard drive Category=2 [Audacity.exe] Switch=/verysilent Desc=A sound editing program Category=1 [Family Tree Pilot.exe] Switch=/verysilent Desc=Geneology software Category=6 [FileZilla (client).exe] Switch=/S Desc=FTP client Category=3 [Free ISO Creator.exe] Switch=/sp- /verysilent Desc=Easily create ISO images Category=5 [Google Chrome.exe] Switch=/S Desc=A very fast internet browser Category=3 [Jaangle.exe] Switch=/S Desc=Media organizer Category=1 [MagicDisc.exe] Switch=/S Desc=Lets you mount image files as virtual drives Category=5 [Opera.msi] Switch=/qn Desc=A good internet browser Category=3 [RadioSure.exe] Switch=/verysilent Desc=Stream music from online stations Category=1 [Speccy.exe] Switch=/S Desc=Lists all information about your computer Category=2 [WeatherMate.msi] Switch=/qn Desc=Desktop weather station Category=5 [XMedia Recode.exe] Switch=/S Desc=Re-encode music and video Category=1 [StreamTransport.exe] Switch=/verysilent Desc=Best SWF & Flash downloader of all Category=3 [Adolix Split And Merge PDF.exe] Switch=/verysilent Desc=Very simple way to split or merge PDFs Category= [Dia.exe] Switch=/S Desc=Draw structured diagrams such as flow charts Category=6 [Everything.exe] Switch=/verysilent Desc=Super fast file searching utility Category=2 [EULAlyzer.exe] Switch=/verysilent Desc=Quickly scan EULAs for distessing statements Category=6 [Glary Utilities.exe] Switch=/verysilent Desc=Fix errors, speed up and secure your computer Category=2 [Malwarebytes Antimalware.exe] Switch=/verysilent Desc=Get rid of adware, spyware & trojans Category=5 [Pencil.exe] Switch=/verysilent Desc=Makes freehand drawing easy to do Category=6 [Avast Antivirus.exe] Switch=/VERYSILENT /NORESTART /SP- Desc=Powerful free antivirus Category=5 [streamWriter.exe] Switch=/verysilent Desc=Save online radio streams to your computer Category=6 [PhotoScape.exe] Switch=/S Desc=A fun and easy photo editing software Category=1
      Note that Category is the tab number that the software will show up on. Therefore, 1 is the first tab (left side) and 6 is the last tab (right side).

      Edit: updated code to make the Miscellaneous category be default in case the software is not listed in the ini file. Also fixed the "Unselect All" function to not be offset by one number.