urie Posted March 24, 2010 Share Posted March 24, 2010 (edited) I am trying to install Thunderbird Setup 3.0.3.exe with basic silent install original code without switches added $search = FileFindFirstFile ( @ScriptDir & "\Thunderbird Setup 3*.exe" ); Search distribution i added -ms -ira Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) $ID = ""; Custom installation path example: $ID = "D:\Program Files\" $search = FileFindFirstFile ( @ScriptDir & "\Thunderbird Setup 3*.exe -ms -ira" ); Search distribution $SF = FileFindNextFile ( $search ) If $search = 1 Then ; Run installer If Not $ID = "" Then $D = "INSTALLDIR=" & Chr ( 34 ) & $ID & Chr ( 34 ) & " " Run ( @ScriptDir & "\" & $SF ) Else MsgBox ( 0x40010, @ScriptName, "Thunderbird Setup 3 not found", 3 ) Exit EndIf EXIT Now it can't find thunderbird exe try ing to get script so don't need to rename thunderbird exe everytime it is updated to newer version. thanks Edited March 24, 2010 by urie Link to comment Share on other sites More sharing options...
MHz Posted March 24, 2010 Share Posted March 24, 2010 Add the switches to the RunWait function rather then the FileFindFirstFile function. Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) $ID = ""; Custom installation path example: $ID = "D:\Program Files\" $search = FileFindFirstFile ( @ScriptDir & "\Thunderbird Setup 3*.exe" ); Search distribution $SF = FileFindNextFile ( $search ) If $search <> -1 Then ; Run installer If Not $ID = "" Then $D = 'INSTALLDIR="' & $ID & '" ' RunWait ( '"' & @ScriptDir & "\" & $SF & '" -ms -ira') Else MsgBox ( 0x40010, @ScriptName, "Thunderbird Setup 3 not found", 3 ) Exit 1 EndIf EXIT Link to comment Share on other sites More sharing options...
urie Posted March 24, 2010 Author Share Posted March 24, 2010 Add the switches to the RunWait function rather then the FileFindFirstFile function. Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) $ID = ""; Custom installation path example: $ID = "D:\Program Files\" $search = FileFindFirstFile ( @ScriptDir & "\Thunderbird Setup 3*.exe" ); Search distribution $SF = FileFindNextFile ( $search ) If $search <> -1 Then ; Run installer If Not $ID = "" Then $D = 'INSTALLDIR="' & $ID & '" ' RunWait ( '"' & @ScriptDir & "\" & $SF & '" -ms -ira') Else MsgBox ( 0x40010, @ScriptName, "Thunderbird Setup 3 not found", 3 ) Exit 1 EndIf EXIT Thanks MHz, just tested working great, other question if this was say and innosetup installer could RunWait ( '"' & @ScriptDir & "\" & $SF & '" -ms -ira') be changed to RunWait ( '"' & @ScriptDir & "\" & $SF & '" /SILENT /SP- /NORESTART' That is just a general question i,e for different installers. Link to comment Share on other sites More sharing options...
MHz Posted March 25, 2010 Share Posted March 25, 2010 Yes, you can. You are correct with the modification for another installer. Link to comment Share on other sites More sharing options...
urie Posted March 25, 2010 Author Share Posted March 25, 2010 Thanks again. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now