Jump to content

Need Script to install a Zip once it's extracted


Recommended Posts

I am trying to complete a script that will allow me to extract the contents of a Zip file into the users local temp folder under app data (that way anyone can install and it doesn't depend on rights on the root of C or program files/folder) AND then run the exe from there to install...

Link to comment
Share on other sites

  • Moderators

rileyg,

And the problem you are having is what exactly? :oops:

We will not write the script for you, but if you post what you have and explain what is not working correctly we will certainly try and help you fix it. :bye:

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

Thanks for your replies... I've used a autoit format that's worked in the past for plain .exe but because this is an .MSI, it pulls the file from the server, creates the directory but that's as far as it gets.

Here is what I have (and yes, ALL the associated files are in the same folder as the .exe I'm creating)

ToolTip("Installing.......", 0,0, "Please Wait...", 1)

Sleep(10000)

$installdir = @TempDir & "\Unity"

$installer = $installdir & "\ViewMail.msi"

DirCreate($installdir)

Sleep(15000)

FileInstall("ViewMail.MSI", $installer)

RunAs("admin-user", "domain", "password", 4, $installer & " -install", "", @SW_HIDE)

Sleep(10000)

AutoItSetOption("WinWaitDelay", 1000)

WinWaitActive("Preparing to Install", "Click Next to install.")

Send("!n")

Sleep(5000)

WinWaitActive("Click Next to Continue.")

Send("!n")

Sleep(5000)

WinWaitActive("Click Next to Finish.")

Send("!n")

Sleep(5000)

ToolTip("Install complete....." , 0,0, "Have a great day...", 1)

Sleep(9000)

Link to comment
Share on other sites

Just a quick comment about your initial title

Need Script to install a Zip once it's extracted

and problem description

I am trying to complete a script that will allow me to extract the contents of a Zip file

. An MSI file and a ZIP file are two completely different animals.

Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Link to comment
Share on other sites

I don't see

I can extract the files, just need to run an .msi file with 2 "NEXTS" and one Finish command.... the msi resides in the same local folder the zip file was dumped in.

You keep expanding your requirements. First it's a ZIP file, then it's an MSI file. Now it's BOTH! You might get more help if you explained exactly what you're trying to do, in detail. What are your inputs? What are your outputs? What intermediate steps are there? Pretty much everything that can be done manually in Windows can be automated in AutoIt given the proper instructions.

Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Link to comment
Share on other sites

Didn't realize I was confusing the topic.... okay. I have a CiscoUnity exe file which uses Winzip to extract it since there are 1757 files in it (450mb).

The script herein will pull it from the network folder, unzip the contents but where it stops is running the .MSI file which is the actual setup file.

I just need for someone to look at the script I posted and tell me if they see anything wrong with it or is there a better way of doing it. I cannot extract

the .msi since it requires several hundred dll's and other files to run/install as well..... thanks for your help in advance....

Link to comment
Share on other sites

  • Moderators

I use this for all of my MSI installs, for what it is worth:

ShellExecuteWait("msiexec.exe", '/i "' & @ScriptDir & '<name of MSI>" /qn')

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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...