Jump to content

Downloading, saving, and installing a program


Recommended Posts

Hey guys,

im trying to create a silent installer for LogMeIn. The direct link to the installer is https://secure.logmein.com/logmein.msi.

Once downloaded, i would like AutoIt to run the program in the following Windows Run Command style:

"g:\LogMeIn.msi/quiet USERPASSWORD=password1 USERVERIFYPWD=password1 USEREMAIL=user@email.com USERWEBPASSWORD=password1 LicenseType=1"

Could anyone help me? ive been Googling all day trying to figure this out.

Link to comment
Share on other sites

InetGet("<url here>", "G:\LogMeIn.msi", 2, 0)
Run('msiexec.exe /i "g:\LogMeIn.msi" /quiet USERPASSWORD=password1 USERVERIFYPWD=password1 USEREMAIL=user@email.com USERWEBPASSWORD=password1 LicenseType=1')

Try if this works...

Edited by MKISH

----------------------------------------

:bye: Hey there, was I helpful?

----------------------------------------

My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1

Link to comment
Share on other sites

That returns the following:

Windows ® Installer. V 5.0.7601.17514

msiexec /Option <Required Parameter> [Optional Parameter]

Install Options

</package | /i> <Product.msi>

Installs or configures a product

/a <Product.msi>

Administrative install - Installs a product on the network

/j<u|m> <Product.msi> [/t <Transform List>] [/g <Language ID>]

Advertises a product - m to all users, u to current user

</uninstall | /x> <Product.msi | ProductCode>

Uninstalls the product

Display Options

/quiet

Quiet mode, no user interaction

/passive

Unattended mode - progress bar only

/q[n|b|r|f]

Sets user interface level

n - No UI

b - Basic UI

r - Reduced UI

f - Full UI (default)

/help

Help information

Restart Options

/norestart

Do not restart after the installation is complete

/promptrestart

Prompts the user for restart if necessary

/forcerestart

Always restart the computer after installation

Logging Options

/l[i|w|e|a|r|u|c|m|o|p|v|x|+|!|*] <LogFile>

i - Status messages

w - Nonfatal warnings

e - All error messages

a - Start up of actions

r - Action-specific records

u - User requests

c - Initial UI parameters

m - Out-of-memory or fatal exit information

o - Out-of-disk-space messages

p - Terminal properties

v - Verbose output

x - Extra debugging information

+ - Append to existing log file

! - Flush each line to the log

* - Log all information, except for v and x options

/log <LogFile>

Equivalent of /l* <LogFile>

Update Options

/update <Update1.msp>[;Update2.msp]

Applies update(s)

/uninstall <PatchCodeGuid>[;Update2.msp] /package <Product.msi | ProductCode>

Remove update(s) for a product

Repair Options

/f[p|e|c|m|s|o|d|a|u|v] <Product.msi | ProductCode>

Repairs a product

p - only if file is missing

o - if file is missing or an older version is installed (default)

e - if file is missing or an equal or older version is installed

d - if file is missing or a different version is installed

c - if file is missing or checksum does not match the calculated value

a - forces all files to be reinstalled

u - all required user-specific registry entries (default)

m - all required computer-specific registry entries (default)

s - all existing shortcuts (default)

v - runs from source and recaches local package

Setting Public Properties

[PROPERTY=PropertyValue]

Consult the Windows ® Installer SDK for additional documentation on the

command line syntax.

Copyright © Microsoft Corporation. All rights reserved.

Portions of this software are based in part on the work of the Independent JPEG Group.

Link to comment
Share on other sites

too bad i cant edit my last post. Looks like the program still isnt working. It installs LMI silently, but it isnt putting in the account information the way it should be. I tried my run command again in Windows and it installed properly - so i know it works.

Also, being the n00b that i am, could you explain your code?

Edited by techiemoore
Link to comment
Share on other sites

In this instance you may have to use Orca MSI database editor to edit the msi file to implant the necessary info

Dont ask me how ive never used it, if you google it you will find lots of discussion

download is here

but having to edit the file each time may not be the way to go

edit

from what i read make a copy of the origanal file and use save as otherwise it changes the msi

Edited by Chimaera
Link to comment
Share on other sites

Yeah, i edited the file already - thats why i need to host it somewhere. but regardless i just tested the script on the local file and it didnt install right - said it didnt have the username and password. yet when i run the altered msi manually, it installs fine.

Link to comment
Share on other sites

Try it with ShellExecute instead of Run(ing) msiexec and see if that works.

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

Basically the same way as with Run except you use ShellExecute instead.

ShellExecute("g:logmein1.msi ", '/quiet USERPASSWORD=password1 USERVERIFYPWD=password1 USEREMAIL=user@email.com USERWEBPASSWORD=password1 LicenseType=1')

The second parameter of ShellExecute is where the parameters for the program/file you're running would go.

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

Thanks for that helpful responce, BrewManNH.

However, i think i might need to use somekind of "wait" command to tell it to wait until the file is finished downloading. Right now, my script reads as the following:

InetGet("http://www.fileden.com/files/2012/6/1/3310995/TEST%20-%20LMISelfInstaller.jpg", "c:LogMeIn.msi", 2, 0)

ShellExecute("c:LogMeIn.msi", '/quiet USERPASSWORD=pass USERVERIFYPWD=pass USEREMAIL=email@email.com USERWEBPASSWORD=pass LicenseType=1')

The file is originally a jpg because fileden doesn't allow the upload of MSI's. I would assume that the "c:LogMeIn.msi", 2, 0 tells AutoIt to "save as"?

Link to comment
Share on other sites

The ",0" at the end of InetGet tells it to wait until it's finished downloading.

EDIT:Please do yourself, and us, a favor, read the help file for the commands you're going to use.

Edited by BrewManNH

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'm sorry - i read that last night before posting here. i really cant figure it out. i wish there were more tutorials so i could learn.

When i run the script as is, i get an error stating that the file could not be found.

i will read it again now.

Edited by techiemoore
Link to comment
Share on other sites

  • 1 month later...

Just wanted to let you know i finally got it working. The problem must have been my attempt to convert the file from a jpg to an msi.

My code now reads:

InetGet("http://k005.kiwi6.com/hotlink/esuudu1c86/LogMeIn.msi", "c:LogMeIn.msi", 2, 0)

ShellExecute("c:LogMeIn.msi", '/quiet USERPASSWORD=password USERVERIFYPWD=password USEREMAIL=email@gmail.com USERWEBPASSWORD=password LicenseType=free')

Now if i could just get it to put a little status message or something to let the client know that the program is installing....

Edited by techiemoore
Link to comment
Share on other sites

This "c:LogMeIn.msi" does not always equal "c:LogMeIn.msi", you forgot the backslash after the C: in the InetGet function. Also, if you're on Windows Vista or 7 you may have trouble writing a file to the root of the C: drive, better to save it to the temp folder (use @Temp & "LogMeIn.msi" instead of "C:LogMeIn.msi")

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

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