Sign in to follow this  
Followers 0
scriptingubernoob

Help with unattended install process

9 posts in this topic

#1 ·  Posted (edited)

Hi everyone,

As an scripting uber noob please try to go easy on me here as I know I am in over my head atm.

So here is the problem. I am trying to create an unattended installer script for Daz3d. Well

It is actually for additional plugin content for Daz3d. Now normally this would be done by running

filename.exe --mode unattended, however this is not possible. According to my research on the DAZ3D

Forums this feature has been broken for some time.

To solve this issue I have edited some of the AutoIt tutorial examples to suit my needs and have created

a way to run through the install process for a single install.

Refer to following script.

But as mentioned this will only work for one file and i need it to work for hundreds of other executeable

files located in the same folder.

I could use something similar to the old dos batch file way of

dir c:\installfiles\*.exe /b > C:\Users\Family\Desktop\Autotesting\downloaded.bat

but would prefer to use some sort of array and keep it all nice and neat in one script.

Also incase it helps I am running this on a Vista system

Thanking you in advance.

UberNoob

; This script requires full Administrative rights

#requireadmin

;MsgBox(0, "Info", "This Program Requires Administrator Privilages to Install your Daz content.")

; Run the insraller program

Run("C:\Users\Family\Desktop\dl dazinst\10185_2_ds_Fontaine_2.exe")

; Initial Setup Screen

WinWaitActive("Setup")

; Select Next

Send("{ENTER}")

; wait for next part of Setup Screen

WinWaitActive("Setup")

; Select No uninstaller

Send("{TAB 3}")

Send("{SPACE}")

Send("{TAB 2}")

Send("{ENTER}")

; wait for next part of Setup Screen

WinWaitActive("Setup")

; Select Agree to Licence

Send("{TAB 2}")

Send("{SPACE}")

Send("{TAB 3}")

Send("{ENTER}")

; wait for next part of Setup Screen

WinWaitActive("Setup")

;Finish Install 1 0f 6

Send("{ENTER}")

; wait for next part of Setup Screen

WinWaitActive("Setup")

; Finish Install 2 0f 6

Send("{ENTER}")

; wait for next part of Setup Screen

WinWaitActive("Setup")

; Finish Install 3 0f 6

Send("{ENTER}")

; wait for next part of Setup Screen

WinWaitActive("Setup")

; Finish Install 4 0f 6

Send("{ENTER}")

; wait for next part of Setup Screen

WinWaitActive("Setup")

;Finish Install 5 0f 6

Send("{ENTER}")

; wait for next part of Setup Screen

WinWaitActive("Setup")

Sleep(8000)

;Finish Install 6 0f 6

Send("{ENTER}")

; wait for next part of Setup Screen

WinWaitActive("Setup")

;Dont view Readme

Send("{TAB}")

Send("{SPACE}")

Send("{TAB}")

Send("{ENTER}")

Edited by scriptingubernoob

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

If you want a silent install, why don't you check what installer it was created with? Most have an option for silent installs

You can try /q, /s, /silent, /verysilent and a few others that you can get the switches for using Google. Just make sure that there are no toolbars or anything of that nature that would install by default because they will be installed whether or not you want them.

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

Unfortunately none of those switches will work. This was the reason for me creating the script that quickly goes through the standard install rather quickly.

The issue is getting the script to work for hundreds of exe files in the same folder.

But thanx for the quick reply and suggestion.

Share this post


Link to post
Share on other sites

Do you know what the installer type is? I have a rather complete list of switches. You could also go the switch finder route (Written in AutoIt by the way) by going to the link below but you will have to register with MSFN to get it.

http://www.msfn.org/board/topic/17940-universal-silent-switch-finder-01/


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

According to the details tab when you check on the file properties thie installer is Bitrock Installbuilder for windows.

Also I will post a complete list of switches for the file at the end of this post. However I think that i have not

explaind myself properly.

My install script works fine for 1 file this is not the issue. What i need to know how to do is to change the line of code

; Run the insraller program

Run("C:\Users\Family\Desktop\dl dazinst\10185_2_ds_Fontaine_2.exe")

so that the file name at the end of the line is a variable that is automatically generated from a list of all executeable files

in a particualar directory. This is why I thought I may need some sort of array. or the old dos code

dir c:\installfiles\*.exe /b > C:\Users\Family\Desktop\Autotesting\installlist.txt

This way I could execute hundreds of exe files one after the other automatically.

Fontaine 10185_2_ds_Fontaine_2

Usage:

--help Display the list of valid options

--version Display product information

--optionfile <optionfile> Installation option file

Default:

--mode <mode> Installation mode

Default: win32

Allowed: win32 unattended

--debugtrace <debugtrace> Debug filename

Default:

--installer-language <installer-language> Language selection

Default:

Allowed: en ca nl et fr de hu it jp pl pt_BR pt ro ru sl es zh_TW zh_CN va cy

--pathselection <pathselection>

Default:

Allowed: specify select

--chosenpath <chosenpath> Destination Directory

Default:

--prefix <prefix> Destination Directory

Default: ***unknown variable contentinstalldir***

--prefix <prefix> Destination Directory

Default: ***unknown variable contentinstalldir***

--uninstaller <uninstaller>

Default: 1

Share this post


Link to post
Share on other sites

look at _filelisttoarray

and then loop through that


,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

iamtheky Thankyou this is a step in the right direction.

I will take a look at this in more detail and give an update here later

Share this post


Link to post
Share on other sites

Funny thing... i actually tried to to the exact same.

I have done a installer for the older install files (not the bitrock) and this works fine for me.

But with the Bitrock installer i can't recognize the window with the title.

My script looks pretty much the same like yours but i have implented a loop which works fine.

The problem is now while the installing process is running you've set a sleep of 8sec. If the installer is bigger it wont work. I just did not find a way to identify when the "installing" itself is done. So if you find something post it please.

Here is the code for the older installers. There you also see how a directory read out is done and the while loop.

Cheers

SirChaos

Share this post


Link to post
Share on other sites

For an array of exe's to install you can do a StringSplit.

$file=StringSplit("exe1:exe2:exe3:etc...", ":")

Then each exe1 will be file[1], etc. file[0] contains the number of strings (exe's) in the array, so you a loop from 1 to file[0]. I do not know how many differences there is in the script for each exe but assuming your same script will work with all of them just put your script in a function and call it from the loop.

$file=StringSplit("exe1:exe2:exe3")
For $i = 1 to $file[0]
    install($file[$i])
Next

Func install($exe)
; <Your install script>
EndFunc

Need to add some error checking. You can also check out FileFindFirstFile/FileFindNextFile using "*.exe" as a file mask if you want to install all the exe's in the folder. There are too many unknowns in your situation to say what the best approach would be. Depending on circumstances ProcessWaitClose, or some of the other process management functions, may help resolve the issues SirChaos spoke of.

Share this post


Link to post
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
Sign in to follow this  
Followers 0