Jump to content

Recommended Posts

just stumbled upon and I had the same idea some time ago but no time to implement. Well done!

I had planned to make it more modular ( place an "install.cfg" file ) in every folder that has an installable program inside.

The script will then search for all of these "install.cfg" files and list them

This makes your installers library more flexible for changes in  folder hirarchy

best regards

Blues

My UDF: [topic='156155']_shellExecuteHidden[/topic]

Link to post
Share on other sites
  • 2 weeks later...
  • Replies 65
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Software Installer Version: 2.0 It's been been a long year, but I finally got some time to rework this project. I re-wrote everything from scratch because the old version was getting too com

Its a nice piece of code and a usefull tool Many Thanks

It's more than likely the forum software ate the backslashes when the script was posted or edited. Unfortunately it's a too common experience, so you'll have to reinsert them where they belong.

Posted Images

Looks great and something that I was thinking of writing myself also, (albeit with a lot less skill). One thing that I was going to try and include, that I would like to add to my version of this tool, would be the ability to check if the software is already installed. This would also act as a verification that the software is installed. Currently I have a script to do all the installs but all the installers are hard coded, but I have found that some of the items are not getting installed correctly. It has worked for me thus far, but I want to take it to the next level. If anyone could help point me in the right direction to get this implements that would be greatly appreciated. what I was thinking is that the line of the application to be installed be displayed in a different colour ( GREEN ) if the application is already installed. not too worried about different versions as I will only be running this on new builds that need a clean install of these apps.

Cheers

Jeff

Link to post
Share on other sites

:) it seems we think excactly about the same problems

My idea was to place a small config file in the folder of each installer ( as i mentioned ) and in this file there is hardcoded the normed install path of the application.

This has 2 advantages:

- you can maintain a collection of links to your programs that wont break on your next OS reinstall

- you can check that path for size to see if its allready installed and mark the line as green

Checking whether a programm is  installed or not is very difficult with any other method because it requires individual registry checks for each program which is  to much effort

regards

Blues

My UDF: [topic='156155']_shellExecuteHidden[/topic]

Link to post
Share on other sites
  • 7 months later...

Hi,

LOVE this script just what I need.

Wonder if you could help thou, i have removed the last tab as was not needed for me. Added the suggested line 86 that was posted here. but when I hit install a box flashes up and then goes, with no software installed.

Just trialing with 7Zip at mo as dont wanna edit it all and nothing works.

Thanks

Link to post
Share on other sites
  • 4 weeks later...

I know this is kinda late to response but i am trying to modify this to my own small project. i read the post of clo312 who had the same project but couldn't find what i want. I saw that i have everything that i need for my project in this topic but i can't really understand everything.

i want to make a CD with 15 program's, that automaticly installs itself.

now did i see that i need the runwait command, and the switch to automaticly install itself without human interaction.

i dont want a checkbox or anything so that interface can be gone.

now are my questions:

1. How do i know which programs need which switch, so if i need Install or /S.

2. how do i implement this in my progam, i guess i dont need the config file if i just put everything in the command, the command to run and install for 1 program is now:

 

#RequireAdmin
 
RunWait("Teamviewer.exe" & " " & S)
 
Exit
 
greets Rowesca 
Link to post
Share on other sites

 

1. How do i know which programs need which switch, so if i need Install or /S.

Go to the manufacturers website and research or use this program to help but it doesn't find them all

http://www.portablefreeware.com/?id=2520

Link to post
Share on other sites

Go to the manufacturers website and research or use this program to help but it doesn't find them all

http://www.portablefreeware.com/?id=2520

If it doesnt find him, does this mean it can't be automaticly installed with a silent switch, is there than another solution for or is this the only way?

and do you know how to implement this switch in the program?

thanks anyway for this info! cant believe i didnt think of that myself to search for such a finder!

Link to post
Share on other sites

if a manufacturer or developer doesn't include switches then it cant be done unless you automate the buttons.

It has to be there in the original item

Also try commandline "name of program /?" can find them sometimes if its a windows item

In this installer this is the part that matters so just convert what you need from it to single use or make a function of it

If $extension = "msi" Then
            RunWait("msiexec /i " & '"' & $scriptDir & "\software\" & $fileName & '" ' & $switch) ; For MSI type installers
        Else
            RunWait('"' & $scriptDir & "\software\" & $fileName & '"' & " " & $switch) ; For EXE installers
        EndIf
Link to post
Share on other sites
  • 6 months later...
Hello everyone.
I'm not a programmer, but I'm learning a lot from this forum I frequent a time.
I need help.
I will use this great code in my work.
But would like the script efetuasse the search in the subfolders as well.
Some installers we keep in sub-folders for better organization.
 
It's possible?
 
Sorry my bad English.
 
:)
Link to post
Share on other sites
  • 11 months later...
  • 1 month later...

Is there a way i can get this to work when a program requires supplemental files?  For example.  I have an office 2007 enterprise installer, but in the directory with the setup.exe it has a folder for each program in the package.  I can't just take the .exe out of that as it requires those folders to install.  I could just put the entire contents of that into the Software folder, but then it would list all of those folders in the program as available to install.  Is there a way to get the program to only list files with an extension of either exe or msi?

Capture.PNG

Link to post
Share on other sites
  • 3 years later...
On 11/6/2013 at 7:19 PM, marshal said:

Great script!!!

How could I set another variable on the ini file and set the checkbox according what it reads?

i.e. Config.ini

[7zip.exe]
Switch=/S
Desc=7 Zip Utility
Category=1
Default=False

[Filezilla.exe]
Switch=/S
Desc=FTP Utility
Category=1
Default=True

And I would like the script to put a checkbox when it populates the software according the "Default" variable. I've tried this but it does not seem to work:

For $i = 1 To UBound($array) Step 1
        $category = IniRead($iniFile, $array[$i - 1], "Category", "5")
        $desc = IniRead($iniFile, $array[$i - 1], "Desc", "")
        $Checked = IniRead($iniFile,$array[$i - 1],"Default", "")
        If $category = 1 Then
            GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView1)
        _GUICtrlListView_SetItemChecked($ListView1, $array ,$Checked) ;does not work, however if I put a MsgBox it throws $Checked for each item

I would like this too, so I tried this and seems to work:

The trick is to find the 0-based index out of the dynamic listview. This is accomplished by first search the item via _GUICtrlListView_FindText (search for the text eg. "7-zip.exe" in the list and return the 0-based index). The _GUICtrlListView_SetItemChecked changes the state of the checkbox, but really needs the 0-based index.

For $i = 1 To UBound($array) Step 1
        $category = IniRead($iniFile, $array[$i - 1], "Category", "5")
        $desc = IniRead($iniFile, $array[$i - 1], "Desc", "")
        $checked = IniRead($iniFile,$array[$i - 1],"Default", "")
        If $category = 1 Then
            GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView1)
            if $checked = "True" Then
               $iI = _GUICtrlListView_FindText($ListView1, $array[$i - 1])  ;Get 0-based index of current created control
               _GUICtrlListView_SetItemChecked($ListView1, $iI, True)       ;Set checked radiobox of last found control
            EndIf
        ElseIf $category = 2 Then
            GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView2)
            if $checked = "True" Then
               $iI = _GUICtrlListView_FindText($ListView2, $array[$i - 1])  ;Get 0-based index of current created control
               _GUICtrlListView_SetItemChecked($ListView2, $iI, True)       ;Set checked radiobox of last found control
            EndIf
        ElseIf $category = 3 Then
            GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView3)
            if $checked = "True" Then
               $iI = _GUICtrlListView_FindText($ListView3, $array[$i - 1])  ;Get 0-based index of current created control
               _GUICtrlListView_SetItemChecked($ListView3, $iI, True)       ;Set checked radiobox of last found control
            EndIf
        ElseIf $category = 4 Then
            GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView4)
            if $checked = "True" Then
               $iI = _GUICtrlListView_FindText($ListView4, $array[$i - 1])  ;Get 0-based index of current created control
               _GUICtrlListView_SetItemChecked($ListView4, $iI, True)       ;Set checked radiobox of last found control
            EndIf
        ElseIf $category = 6 Then
            GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView6)
            if $checked = "True" Then
               $iI = _GUICtrlListView_FindText($ListView6, $array[$i - 1])  ;Get 0-based index of current created control
               _GUICtrlListView_SetItemChecked($ListView6, $iI, True)       ;Set checked radiobox of last found control
            EndIf
        Else
            GUICtrlCreateListViewItem($array[$i - 1] & "|" & $desc, $ListView5)
            if $checked = "True" Then
               $iI = _GUICtrlListView_FindText($ListView5, $array[$i - 1])  ;Get 0-based index of current created control
               _GUICtrlListView_SetItemChecked($ListView5, $iI, True)       ;Set checked radiobox of last found control
            EndIf

        EndIf
     Next

 

Edited by Riekeltkeuter
Link to post
Share on other sites

Hi, everyone!

Version 1.2 is now posted with some cool new features. The first post contains a link to the full package but you also have the option to just download the script and a couple supplemental files. Hope you like it! Comments/questions are welcome.

Link here:

Special thanks to bundyal for alerting me to some issues with the previous version and a couple new ideas, which improved this version.

Link to post
Share on other sites
  • 2 months later...
  • abberration changed the title to Software Installer

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Iraj
      Greetings!
      I am trying to pass parameters using Send () function as below
      $sFilePath = @ScriptDir & "\config.ini" Local $hFileOpen = FileOpen($sFilePath, $FO_READ) Local $sURLUsername = FileReadLine($hFileOpen, 1) Local $sURLPassword = FileReadLine($hFileOpen, 2) Local $sAutomation = FileReadLine($hFileOpen, 3) Run("chrome facebook.com") Sleep(5000) Send($sAutomation) FileClose($hFileOpen) The config.ini file contains below lines
      abcd wxyz $sURLUsername{TAB}$sURLPassword{ENTER} While running,  I am getting $sURLUsername & $sURLPassword in the username & password field instead of abcd & wxyz as provided.
      Refer image below:

       
      Where am I going wrong? Any suggestions or assistance will be grateful. 
    • By Jemboy
      Recently I was working on a script with icons using GuiCtrkCreatIcon.
      I decided to change the sub folder name of the icons to a more meaning name, however made a typo.

      I tested the .exe on my test computer and it worked flawlessly (because both icon folder where on my test computer) 😁
      But after I installed the script on the intended computers , I got chaos!😵
      Zooming into the problem, I discovered, that because the icons could not be found, the ControlID were returned with a value of 0
      and thus played havoc within the GuiGetMsg() switch/case statement.
      I have been able to reproduce this  (see example)
      #include <GUIConstantsEx.au3> ;============================================================================================================ ; PLEASE, do not save this example in the example folder: C:\Program Files (x86)\AutoIt3\Examples\Helpfile ;============================================================================================================ Example() Func Example() GUICreate(" My GUI Icons", 250, 250) $Icon1 = GUICtrlCreateIcon("shell32.dll", 10, 20, 20) $Icon2 = GUICtrlCreateIcon(@ScriptDir & '\Extras\horse.ani', -1, 20, 40, 32, 32) $Icon3 = GUICtrlCreateIcon("shell32.dll", 7, 20, 75, 32, 32) GUISetState(@SW_SHOW) ;$Icon2 = -1 ; ==> When this line is uncommented the script "works", so -1 could be a potential fix. ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $Icon2 Beep (500,500) EndSwitch WEnd GUIDelete() EndFunc ;==>Example If you save the above script outside the Autoit example folder and run it, it will keep beeping because GuiCtrlCreatIcon did not find horse.ani and return $Icon2=0.
      At the moment GUICtrlCreateIcon () only returns the conntrolID on success and 0 on failure.
      I would like to propose a return of -1 on failure, so a existing and working script won't go awry when the icon can not be found.
       
    • By rcmaehl
      A UDF to connect and control Five9 on the Local Network via it's provided HTTP API
       
      THIS UDF IS STILL IN TESTING
       
      Current Features:
      Agent Ready
      * Contains most functions needed to control Agent Status  
      PLANNED Features:
      Heavyweight
      * Control most Five9 API functions
      * Full Control over own Status as well as Supervisor functionality
        Helpful Premade Examples Files
      * Examples for almost every function
      * Premade CUI and GUI clients
        Ready for all users, beginner and up
      * Detailed Error Reporting to help pin-point problems
      * Thorough parameter checking to prevent accidental script crashes  
      Support:
      Support for this UDF can be obtained in my Discord Server
    • By rcmaehl
      A UDF to connect and control Cisco Finesse on the Local Network via it's provided HTTP API
       
      Current Features:
      Heavyweight
      * Large feature set, containing most Finesse Desktop API functions  
      PLANNED Features:
      Heavyweight
      * Control over own Status as well as Supervisor functionality
        Helpful Premade Examples Files
      * Examples for almost every function
      * Premade CUI and GUI clients 
        Ready for all users, beginner and up
      * Detailed Error Reporting to help pin-point problems
      * Thorough parameter checking to prevent accidental script crashes  
      Support:
      Support for this UDF can be obtained in my Discord Server
    • By WindIt
      Hi, 
      I have a set of excel docs 1& 2
      1) In Excel 1 i have a fixed column called dimensionId that contains list of dimensionid's with in between empty cells.
      Here, For each dimesionId, i need to check corresponding columns of L,M,N ,O(senior, mid, junior, student) & check If they contain letter Y (Open excel 2) and if empty ignore,check next.
      I need to loop through the entire column of dimensionId one by one, please help me proceed with the logic.
      2) If letter Y exists, open excel 2 and check if same dimesionId exists in column A.
      New to autoit excel automation, Help me with logic to execute this.
      #include <Excel.au3>
      Global $oExcel = _Excel_Open()
      Global $oWorkbook = _Excel_BookOpen($oExcel, "D:\yta\Trial concept dimensions list.xlsx")
      Local $read1 = _Excel_RangeRead ($oWorkbook,Default,"C3")
      MsgBox(0,"",$read1)
      Attached exce 1 doc.
       
       
      exl1.xlsx exl2.xlsx
×
×
  • Create New...