edmoncu Posted December 14, 2004 Share Posted December 14, 2004 great scripts... up to now, im stuck at issuing CMD to launch a fileexist command, as well as installing entire apps on a subdirectory. great tips! will have to redo my scripts to use pure autoit commands. Link to comment Share on other sites More sharing options...
Nologic Posted December 14, 2004 Share Posted December 14, 2004 Well here is a simple script that can install a number of different types of installers. It could be expanded to cover more tho with out much editing.So if you don't care where the files end up (default install path) and what your start menu looks like...well you can install a mess of app's and hot fixes with this puppy. Now I may have things named wrongly...but the exercise works...hehe or should at least. Create folders as named in the script that use the listed switchs...place the compiled script out side of these folders and then execute it...it should install the contents of each folder with out a hitch.Func _BInstall( $i1 , $i2 ) $search = FileFindFirstFile ( @ScriptDir & $i1 & "*.exe" ) If $search <> -1 Then While 1 $i = FileFindNextFile ( $search ) If @error Then ExitLoop $PID = Run ( @ScriptDir & $i1 & $i & $i2 ) ProcessWaitClose( $PID ) Wend FileClose ( $search ) EndIfEndFunc_BInstall( "\Type 1\" , " /Q /O /N /Z" )_BInstall( "\Type 2\" , " /Q:A /R:N" )_BInstall( "\Type 3\" , " /passive /norestart /quiet" )_BInstall( "\Type 4\" , " /q /n /z" )_BInstall( "\Inno\" , " /VERYSILENT /SP- /NOCANCEL /NORESTART" )_BInstall( "\Wise\" , " /s" )_BInstall( "\Nullsoft\" , " /S" )Exit Link to comment Share on other sites More sharing options...
Astalavista Posted December 15, 2004 Author Share Posted December 15, 2004 nologic so now i can do thisFunc _Install( $i1 , $i2 )If FileExists ( @ScriptDir & "\" & $i1 ) Then $PID = Run ( @ScriptDir & "\" & $i1 ) ProcessWaitClose( $PID ) Sleep ( 500 ) If $i2 <> "" Then ProcessWaitClose( $i2 )EndIfEndFunc_Install( "winampini.exe" , "" )_Install( "winampini2.exe", "" ); Merge Reg FileRun ( "REGEDIT /S " & FileGetShortName ( @ScriptDir & "\winamp.reg" ) , "" )EndIfEndFunc Link to comment Share on other sites More sharing options...
Nologic Posted December 15, 2004 Share Posted December 15, 2004 The last two lines -EndIfEndFuncare not needed. Link to comment Share on other sites More sharing options...
Astalavista Posted December 16, 2004 Author Share Posted December 16, 2004 nologicwould it be possible to modify the script that u gave me to ...1. Install SFX (silent installer)wait till it finishesthen 2. Instal SFX (silent installer 2)wait till it finishes3. Install Reg keyi notice sometimes it is too fast that my second sfx is already running with the first sfx finishing. Link to comment Share on other sites More sharing options...
Nologic Posted December 16, 2004 Share Posted December 16, 2004 hmm your above posted code should do that as is...maybe increase the sleep time for the secondary proccess to spawn...if there is one.Func _Install( $i1 , $i2 )If FileExists ( @ScriptDir & "\" & $i1 ) Then$PID = Run ( @ScriptDir & "\" & $i1 )ProcessWaitClose( $PID )Sleep ( 1000 )If $i2 <> "" Then ProcessWaitClose( $i2 )EndIfEndFunc_Install( "ATI_Driver.exe" , "Setup1.exe" )_Install( "ATI_Panel.exe", "Setup2.exe" ); Merge Reg FileRun ( "REGEDIT /S " & FileGetShortName ( @ScriptDir & "\ATI.reg" ) , "" )Now what I'm wondering is if your taking into account if there is a secondary process being spawned or not.In the above example I incressed the sleep time to 1 second...then the first file is lets say a SFX file...it extracts a file called Setup1.exe and and executes it via the comments section of the SFX file....since this is a secondary process being spawned its added to the same line of code to make sure that every thing dealing with the sfx file goes off with out a hitch prior to starting another sfx file...which its self spawns yet another process.Just putting -_Install( "ATI_Driver.exe" , "" )Will not account for Setup1.exe being ran after ATI_Driver.exe is done extracting it....so in this case one would end up with both Setup1.exe running while ATI_Pannel.exe is also starting up...so make sure your accounting for the secondary process if there is one.The AutoIt script knows nothing more than what you tell it. Now if thats not the case then I'm kind of stumped...because it should wait till a named process is actually complete before moving on to the next. Link to comment Share on other sites More sharing options...
Astalavista Posted December 16, 2004 Author Share Posted December 16, 2004 that did it.... thanksyahooo!!!! off to continue my wpii made a sfx _ autoit installer for the trial version of ulead gif animatorthanks to U Link to comment Share on other sites More sharing options...
Nologic Posted December 16, 2004 Share Posted December 16, 2004 Your welcome Link to comment Share on other sites More sharing options...
Astalavista Posted December 17, 2004 Author Share Posted December 17, 2004 nologic / mhzthe script does not work on this commandmsiexec /i "isscript.msi" /qnmsiexec /i "CuteFTP 6 Professional.msi" issetupdriven=1 allusers=1 installlevel=1 reboot=reallysuppress /qn Link to comment Share on other sites More sharing options...
Nologic Posted December 17, 2004 Share Posted December 17, 2004 Try this -Func _Install2( $i1 , $i2 ) If FileExists ( $i1 ) Then Run ( "msiexec /i " & $i1 ) ProcessWaitClose( $i1 ) Sleep ( 1000 ) If $i2 <> "" Then ProcessWaitClose( $i2 ) EndIfEndFunc_Install2( "isscript.msi /qn", "" )_Install2( "CuteFTP 6 Professional.msi issetupdriven=1 allusers=1 installlevel=1 reboot=reallysuppress /qn", "" )Try the revision Link to comment Share on other sites More sharing options...
Astalavista Posted December 17, 2004 Author Share Posted December 17, 2004 sorry i needsmsiexec /i Link to comment Share on other sites More sharing options...
Astalavista Posted December 18, 2004 Author Share Posted December 18, 2004 also did not workattached is the fileshttp://ezshare.de/files-en/194717/Cuteftpsetup.rar.htmlI tried your latest build but nothing happen 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