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]

Share this post


Link to post
Share on other sites

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

Share this post


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]

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Guest

Good tool

 

Common thing that autoit coders forget is to disable a GUI when the GUI is not responding..

I find that in many cases

Share this post


Link to post
Share on other sites

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 

Share this post


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

Share this post


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!

Share this post


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

Share this post


Link to post
Share on other sites
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.
 
:)

Share this post


Link to post
Share on other sites

I removed the tabs and got it to just 1 ListView item. However, If i switch the description and the software name section with each other, the code doesn't seem to work. Any help?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Posted (edited)
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

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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By techguy86
      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.
       
×
×
  • Create New...