Jump to content

Nologic

Member
  • Posts

    462
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Everything posted by Nologic

  1. AutoIt script Sleep ( 15000 ) Run ( "setup.exe" ) Exit
  2. Try this - Func _Install2( $i1 , $i2 ) If FileExists ( $i1 ) Then Run ( "msiexec /i " & $i1 ) ProcessWaitClose( $i1 ) Sleep ( 1000 ) If $i2 <> "" Then ProcessWaitClose( $i2 ) EndIf EndFunc _Install2( "isscript.msi /qn", "" ) _Install2( "CuteFTP 6 Professional.msi issetupdriven=1 allusers=1 installlevel=1 reboot=reallysuppress /qn", "" ) Try the revision
  3. 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 ) EndIf EndFunc _Install( "ATI_Driver.exe" , "Setup1.exe" ) _Install( "ATI_Panel.exe", "Setup2.exe" ) ; Merge Reg File Run ( "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.
  4. switch is installer specific. If your looking to have every app in a specific folder arrangement then you'll need to use one of the below methods. AutoIt (recommended) JavaScript VisualBasic Script There are of course other scripting methods available...but those listed are free.
  5. The last two lines - EndIf EndFunc are not needed.
  6. Well going off of what you said I'd say its case sensitive. Well the attached AutoIt script should solve your problem...compile it and drop it in any folder you need to install one or more reg files....or just drop all your reg files in to a single folder and let that run through them all at once. If you where to drop it in each folder that needed a reg file executed you could just add a line at the bottom of the script or top...depending when you need the reg file entered...first or second. Run ( @ScriptDir & "\Setup.exe /silent" ) that way your only calling one file from WPI instead of two. Just an idea
  7. LOL well I guess this would be the perfect time to learn to use AutoIt
  8. This [link] should make it easier and quicker to find silent switch's
  9. 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 ) EndIf EndFunc _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
  10. Example with secondary process spawned ; Merge Reg File Run ( "REGEDIT /S " & FileGetShortName ( @ScriptDir & "\file.reg" ) , "" ) ; Basic Fuction Func _Install( $i1 , $i2 ) If FileExists ( @ScriptDir & "\" & $i1 ) Then $PID = Run ( @ScriptDir & "\" & $i1 ) ProcessWaitClose( $PID ) Sleep ( 500 ) If $i2 <> "" Then ProcessWaitClose( $i2 ) EndIf EndFunc ; Install Nero - Using Fuction _Install( "NeroReloadedSetup.exe" , "NeroSetup.exe" ) ; Install Nero Lang Pack - Using Fuction _Install( "NeroLanguagePack.exe" , "NeroLangSetup.exe" ) Although you may want to swap out "Run" for "RunWait" for the reg merge....
  11. Well MHz is the one that should get the thanks for bring it up...I just made mention of it is all. Check out the VuePrint script for lots of crazyness. It should work with or without a serial #...just be sure to set it to "" other wise it might hang the script.
  12. Maybe so...but I could see it as being no fun to repackage a lot of files, because your company had a change of heart about how they want things deployed. Me I'd suggest just acrhiving the files then setting it to extract to what ever the system drive is....then use a script to move things where ever they may need to go and delete any left overs afterwards. May not be the most direct or fastest way, but to maintain it would be little hassle...if any.
  13. hmmm Run ( "REGEDIT /S myreg.reg", "" ) Or if regedit has issues with spaces in folder names maybe - Run ( "REGEDIT /S " & FileGetShortName ( @ScriptDir & "\file.reg" ) , "" ) replacing "\file.reg" with your actual file name So I guess some thing like so - Run ( "REGEDIT /S " & FileGetShortName ( @ScriptDir & "\file.reg" ) , "" ) $search = FileFindFirstFile ( @ScriptDir & "\*.exe" ) If $search <> -1 Then While 1 $i = FileFindNextFile ( $search ) If @error Then ExitLoop $PID = Run ( @ScriptDir & "\" & $i ) ProcessWaitClose( $PID ) Wend FileClose ( $search ) EndIf Is what you would be needing for the above unless a secondary process is spawned then you would have to use the other code to deal with that.
  14. Well if your just looking for batch extraction then I'd use this - $search = FileFindFirstFile ( @ScriptDir & "\*.exe" ) If $search <> -1 Then While 1 $i = FileFindNextFile ( $search ) If @error Then ExitLoop $PID = Run ( @ScriptDir & "\" & $i ) ProcessWaitClose( $PID ) Wend FileClose ( $search ) EndIf That will run through the current folder and execute all *.exe files one after the other automatically...no need for extra code. Now as MHz suggested if a secondary process is spawned then some thing like below would be better suited to your needs - Func _Install( $i1 , $i2 ) If FileExists ( @ScriptDir & "\" & $i1 ) Then $PID = Run ( @ScriptDir & "\" & $i1 ) ProcessWaitClose( $PID ) Sleep ( 500 ) If $i2 <> "" Then ProcessWaitClose( $i2 ) EndIf EndFunc _Install( "SFX001.exe" , "" ) _Install( "SFX002.exe" , "Firefox.exe" ) _Install( "SFX003.exe" , "" ) _Install( "SFX004.exe" , "" ) _Install( "SFX005.exe" , "EmEditor.exe" ) _Install( "SFX006.exe" , "" ) _Install( "SFX007.exe" , "WinAmp.exe" ) _Install( "SFX008.exe" , "" ) Tho maybe MHz has a suggestion for better code...
  15. hmm try this then... Func _Install( $i ) If FileExists ( @ScriptDir & "\" & $i ) Then $PID = Run ( @ScriptDir & "\" & $i ) ProcessWaitClose( $PID ) EndIf EndFunc _Install( "Firefox10_Silent_EN.exe" ) _Install( "profile.exe" ) _Install( ... )
  16. Well don't take what I said wrong...I do prefer AutoIt over batch for nearly every thing...just if you had a batch file already done....it would make little since to create a AutoIt script is all. Yeah I'll be posting the correct script here in a bit...next 5-10min
  17. Well I don't think we have an actual expert amoung all of us at AutoIt...and if so they sure aren't cluing us in. I've clipped code from dang near every one thats posted in that thread. Ether some one has solved some thing I'm stuck on, or they have a cleaner way of doing things. Really half or more of my scripts should be revised to reflect more current or cleaner methods of going about stuff. drthawhizkid script is a perfect example for others to work from...only minor suggestion I might have is some thing that Mhz showed me the other day and thats making use of StringSplit. So in the above mentioned script I would replace $SN_1-$SN_4 with just $SN_1 and redo the registration bit with some minor tweaks....this doesn't improve the script any...just a different way of doing things. $SN_1 = "****-****-****-****" ; Serial Number ; Serial Number Registration $SN = StringSplit( $SN_1 , '-' ) WinWaitActive ( "Serial number registration" ) ControlSetText ( "Serial number registration" , "" , "TEdit4" , $SN[1] ) ControlSetText ( "Serial number registration" , "" , "TEdit3" , $SN[2] ) ControlSetText ( "Serial number registration" , "" , "TEdit2" , $SN[3] ) ControlSetText ( "Serial number registration" , "" , "TEdit1" , $SN[4] ) ControlClick ( "Serial number registration" , "" , "TButton2" ) Any ways in time we may have an expert and maybe then we'll get a real tutorial on how to use it for best effect. Till that point every one is just poking around in the dark trying to find the best way to do things. Well get your self knee deep into this stuff and when you got a script done up be sure to post it along with mine and drthawhizkid, and the rest of the crew. A lot more gets done faster the more every one contributes.
  18. If FileExists ( @ScriptDir & "\setup_1.exe" ) Then RunWait ( @ScriptDir & "\setup_1.exe" ) EndIf If FileExists ( @ScriptDir & "\setup_2.exe" ) Then RunWait ( @ScriptDir & "\setup_2.exe" ) EndIf ..... Really don't see where AutoIt would be better than a batch for this....well its a bit more flexable in where you place files but thats it. Any ways enjoy
  19. You should put a copy of that in the AutoIt thread.
  20. I don't know about silent but I do have a Autoit script to install it...its in the tread pinned at the top of the forum.
  21. Guys, guys, why so harsh? It was a nice gesture even if it was unneeded.
  22. Well if you can get by with automated rather than silent then AutoIt may do the trick...plus you can setup a few things with it. [link]
  23. hmmm well in AutoIt window scans are normally done with a time of 250...much shorter than what your currently using...the amount of over head brought about by using a shorter sleep time between scans shouldn't be noticed on hardware that is remotely current.
×
×
  • Create New...