Jump to content

Multiple Setup Installs with autoit coding


 Share

Recommended Posts

Hello my name is Chris and I am tring to create a cd or dvd which contains multiple .exe files that i would like to have auto run when the cd is inserted and my brother who is more familiar with autoit created something for me that just about works the only problem is when the cd is installed and the autorun.inf file starts the autoit,exe file it runs like it is supposed to then it skips over some of the installs and was hoping someone could help with this.

The code my brother created looks like this

RunWait ("1.exe")
sleep(3000)
RunWait ("2.exe")
sleep(3000)
RunWait ("3.exe")
sleep(3000)
RunWait ("4.exe")
sleep(3000)
RunWait ("5.exe")
sleep(3000)
RunWait ("6.exe")
sleep(3000)
RunWait ("7.exe")
sleep(3000)
RunWait ("8.exe")
sleep(3000)
RunWait ("9.exe")
sleep(3000)
RunWait ("10/11/11.exe")
sleep(3000)
RunWait ("10/12/12.exe")

Can anyone help me figure out why it is skipping over some them like 6-7-8 for example get skipped and we can not figure out why

Thanks in advance clo312

Link to comment
Share on other sites

  • Replies 40
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I'm not sure why you're sleeping for 3 seconds in between each exe, because RunWait won't continue the script until the program being exectuted ends. Also, your last 2 runwait have illegal file names, Unless you're running file 11.exe which is in the folders 10 and 11, you can't use forward slashes in a file name.

Without know what 1-5.exe are doing or what 6-8.exe does there's absolutely no way to tell why they don't run.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

I dont know why he put sleep 3000 in the code, but i can tell you what i am trying to do is install

1)utorrent.exe(represented by the 1 in current code)

2)Adobe Flash Player(represented by the 2 in the current code)

3)Adobe Reader

4)aio_install(printer software from site)

5)FireFox

6)glary utilities(may or may not have the space)

7)Gome Player(GOMENSETUP.exe)

8)Java

9)Print Projects

10 is a folder with another folders inside

Winrar----->winrar32bit---------->winrar.exe

          ----->winrar64bit---------->winrar.exe

(the actual .exe name may vary but that is the idea of 10

Can you help me to write this code as I have got to get this all on cd or dvd

Also I will be adding a autorun.inf file to the cd which will autorun the autoit.exe, which in turn runs this code to install the software listed above.

Thanks in advance

clo312

Link to comment
Share on other sites

Hi yogi I have looked at that and dont understand what vollatran is. Also I am pretty dumb when it comes to this I am nto experianced enough to know hoe to convert that to my situation can you help. that is why i stated my brother created the auto it file that almost works but he is out of ideas as well. Can you help please and explain it for an idiot as myself

thanks in advance

clo312

Link to comment
Share on other sites

The instructions are in the vollatran post. If you can't understand it then there is no point in me explain it again for I wrote them for an average person to understand it. All I can tell you is to read it and to try it. If you don't understand AutoIt then take the tutorial and look for AutoIt 123 in the examples section of the forum. 

Link to comment
Share on other sites

Hello everyone I am new to coding and need some help to write a code that will autoinstall about 10 application sequentially and will wait to do the next install till the previous install is completed? my brother did what he knew how in autoit and it almost works but has a few problems in it and he is all out of ideas as  well. I am tring to get this done so i can put all these apps on a cd or dvd so i can then reinstall my operating system to a 64 bit system. This is for me personally I am not by any means an IT tech and just want to create this project for my own needs, just again i am new to coding and dont know what the coding means or what it does so i need somebody who can help walk me through completing my project. I can show you what my brother has don and that is

RunWait ("1 .exe")

sleep(3000)

Runwait ("2.exe")

sleep(3000)

RunWait ("3.exe")

sleep(3000)

RunWait ("4 .exe")

sleep(3000)

Runwait ("5.exe")

sleep(3000)

RunWait ("6.exe")

sleep(3000)

RunWait ("7 .exe")

sleep(3000)

Runwait ("8.exe")

sleep(3000)

RunWait ("9.exe")

sleep(3000)

RunWait ("10/11/11.exe")     (This is 32 bit software)

sleep(3000)

RunWait ("10/12/12.exe")     (This is 64 bit software)

 

This code works and then will skip like 5-6-7 and run 9 then skip the last 2 anybody help please I am getting desperate and been tring to find help for 3 days now to no avail

The programs I am installing are:

FireFox

Adobe Reader

Adobe Flash Player

GOM Player

Glary Utilities

Java

All in One Printer Software

Print Projects

Utorrent

WinRAR 32 Bit

WinRAR 64 Bit     (would like it to detect an install the right one or at the very least ask the user which one to install.

any help would be much apprecoated and again i  dont know anything so youll have to spell it out for me

Thanks in advance

clo312

Link to comment
Share on other sites

  • Moderators

clo312,

I have merged your threads - how about sticking to one at a time. And please do not post questions in the "Examples" section. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

I gave the answer already and it spells it out for you. Are you even trying to use it? It is easy to use. Just compile the script and configure the ini files. If you do not understand this, then why should we waste our time here? You have stated you don't know much at all yet you expect us to take you step by step through this and explain every concept to you. Come on....you need to do some trying on your end. I don't think you are that stupid. I think you are not trying.

 

The point here is you need to learn to fish, not for us to just give you a fish.

Edited by YogiBear
Link to comment
Share on other sites

Hello everyone I am new to coding and need some help to write a code that will autoinstall about 10 application sequentially and will wait to do the next install till the previous install is completed? my brother did what he knew how in autoit and it almost works but has a few problems in it and he is all out of ideas as  well. I am tring to get this done so i can put all these apps on a cd or dvd so i can then reinstall my operating system to a 64 bit system. This is for me personally I am not by any means an IT tech and just want to create this project for my own needs, just again i am new to coding and dont know what the coding means or what it does so i need somebody who can help walk me through completing my project. I can show you what my brother has don and that is

RunWait ("1 .exe")

sleep(3000)

Runwait ("2.exe")

sleep(3000)

RunWait ("3.exe")

sleep(3000)

RunWait ("4 .exe")

sleep(3000)

Runwait ("5.exe")

sleep(3000)

RunWait ("6.exe")

sleep(3000)

RunWait ("7 .exe")

sleep(3000)

Runwait ("8.exe")

sleep(3000)

RunWait ("9.exe")

sleep(3000)

RunWait ("10/11/11.exe")     (This is 32 bit software)

sleep(3000)

RunWait ("10/12/12.exe")     (This is 64 bit software)

 

This code works and then will skip like 5-6-7 and run 9 then skip the last 2 anybody help please I am getting desperate and been tring to find help for 3 days now to no avail

The programs I am installing are:

FireFox

Adobe Reader

Adobe Flash Player

GOM Player

Glary Utilities

Java

All in One Printer Software

Print Projects

Utorrent

WinRAR 32 Bit

WinRAR 64 Bit     (would like it to detect an install the right one or at the very least ask the user which one to install.

any help would be much apprecoated and again i  dont know anything so youll have to spell it out for me

Thanks in advance

clo312

Link to comment
Share on other sites

  • Moderators

clo312,

Post this question again, amywhere in the forum but especially in "Examples", and you will be sanctioned. :naughty:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Hi thank you mvp for you response. to answer you question i have been trying to google this and learn what i can, i just dont understand what it is all saying, I have looked at your vollatran project and just dont understand it and how i can make it work for me. I did not even know what it was ans thought maybe it was a program so i even googled it all to get to the same place. I am not very knowledgeable when it comes to coding and dont understand what the codes make the computer do. if i had that much of a knowledge might be able to go somewhere. I have like i mentioned asked my brother to help me and he has done what he knows how to do as shown above and he is going to school for game designing and has not learned this yet or something cause he created the above coding and does not know why it dont work. so to answer your resonse i am here on my end trying to fish and just dont know where else to go. if you were here you would see I have been trying to figure this out. Heck I even installed AutorunCD hoping to get what I needed done but to know avail there. I can get the menu with buttons and the links but then when i make the project the buttons are 3/4 of the way done. sorry to all if offendede anybody or did something wrong on here, first time even using forums. Like I said i am tring here and getting desperate as I cant find any answers I understand so that i can then make it my own.

Thanks in advance

clo312

Link to comment
Share on other sites

BrewMan,

I'm not sure why you're sleeping for 3 seconds in between each exe, because RunWait won't continue the script until the program being exectuted ends. Also, your last 2 runwait have illegal file names, Unless you're running file 11.exe which is in the folders 10 and 11, you can't use forward slashes in a file name.

Without know what 1-5.exe are doing or what 6-8.exe does there's absolutely no way to tell why they don't run.

talked to my brother and he said with out the sleep(3000) it would just start all the installs at once. that is what he told me. the 6-8 that skips are just not looking at those files i guess. what happens when we run it like it was written it will ask for 1) install then either i install or dont, now on all of these while i am testing i dont want to go ahead with any installs as they are all already installed, so when i tell it no then autoit code will then bring up 2) and do the same thing and then choose no and 3) and so on till about the 4) or the 5) then after that the whole thing just quits

originally we had the actual file names and renamed them to the numbers to eliminate any mistakes in the paths as some file names had spaces and underscores and we did not know if that was and issue so we renamed the filenames this way to eliminate that as a possible problem and so again I am lost, but that is a couple of the things we have tried. my brother was using my computer with remote assistance for hours to help me figure this out and he is at a loss as well. any ideas?

Thanks in advance

clo312

Link to comment
Share on other sites

RunWait will not allow them to all start at once, unless the executables you're running are written strangely or you're using #RequireAdmin in them, and if they are, you should be using it only in the main script and not the individual install scripts.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

Try modifying this it will do what you want

'?do=embed' frameborder='0' data-embedContent>>

You have added this link and told me to try to edit this to work for me, which i sincerely thank you for but can you tell me how to put that script in autoit so i can work on editing and see what i come up with, the idea of the tabs is cool and something would be nice so i really am anxious to put to use and edit it to work for me, great idea i had not even thought of just busy tring to get somoething to work at the moment, again if you can tell me how to put that in autoit i might have a solid base to start editing from.

Thanks in advance

clo312

Link to comment
Share on other sites

RunWait will not allow them to all start at once, unless the executables you're running are written strangely or you're using #RequireAdmin in them, and if they are, you should be using it only in the main script and not the individual install scripts.

thank you for your response and i dont think the .exe's are written strangely and dont know what #RequireAdmin means but the script i am using is posted somewhere near the top for you to see. all the filenames are for example firefox.exe, straight from a download. Just instead of just running them i am saving them to add to a cd and then i can do all my installs without searching the web

Link to comment
Share on other sites

#RequireAdmin initiates a prompt from the OS if your script is not admin and restarts the script as admin if you confirm it to.

You can do it all with AutoIt without needing external programs like AutorunCD and such. You are going to need to learn how to use AutoIt though.

Here is a debug version of your code and perhaps it may help to point out what the issue is. Perhaps can be regarded as a fishing net to find the problem. You may see MsgBoxes with information in them about possible issues.

#RequireAdmin

; this script is expected to be in same directory as the Autorun.inf file in the root of the CD
If Not FileExists('Autorun.inf') Then
    MsgBox(0x30, @ScriptName, 'WorkingDir is ' & @WorkingDir & @CRLF & 'Autorun.inf does not exist' & @CRLF & 'Will now exit')
    Exit 1
EndIf

; RunWait replaced with _RunWait to allow error checking
_RunWait ("1.exe")
_RunWait ("2.exe")
_RunWait ("3.exe")
_RunWait ("4.exe")
_RunWait ("5.exe")
_RunWait ("6.exe")
_RunWait ("7.exe")
_RunWait ("8.exe")
_RunWait ("9.exe")
If @OSType = 'X86' Then
    _RunWait ("10/11/11.exe"); 32bit
Else
    _RunWait ("10/12/12.exe"); 64bit
EndIf

Exit

; do not alter this code below unless you understand the risk
Func _RunWait($program)
    Local $exitcode, $msg
    ; file string validation
    If StringLeft($program, 1) = '"' And StringRight($program, 1) = '"' Then
        $program = StringTrimLeft($program, 1)
        $program = StringTrimRight($program, 1)
    EndIf
    If Not FileExists($program) Then $msg &= $program & ' does not exist' & @CRLF
    If $msg Then
        MsgBox(0x30, @ScriptName, 'WorkingDir is ' & @WorkingDir & @CRLF & $msg)
        Return 0
    EndIf
    ; process execution
    $exitcode = RunWait('"' & $program & '"')
    If @error Then $msg &= $program & ' exited with error ' & @error & @CRLF
    If $exitcode <> 0 Then $msg &= $program & ' exited with exitcode ' & $exitcode & @CRLF
    Sleep(3000)
    If $msg Then
        MsgBox(0x30, @ScriptName, 'WorkingDir is ' & @WorkingDir & @CRLF & $msg)
        Return 0
    EndIf
EndFunc

This script is not intended for normal use so do not consider that this code is for your final script. So give it a test and see what happens. :)

Link to comment
Share on other sites

but can you tell me how to put that script in autoit so i can work on editing and see what i come up with, the idea of the tabs is cool and something would be nice so i really am anxious to put to use and edit it to work for me, great idea i had not even thought of just busy tring to get somoething to work at the moment, again if you can tell me how to put that in autoit i might have a solid base to start editing from.

Thanks in advance

clo312

 

Unless im misunderstanding you to be able to edit that script i showed you

You click the popup button just above the code then copy everything in the new window, then open a new blank script (right click etc) and paste the contents of the popup into that.

Then you can work on it as you please.

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...