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 comment
Share on other sites

  • 2 weeks later...

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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
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 comment
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
 Share

×
×
  • Create New...