Jump to content

Running a *.MSI setup file


Recommended Posts

I want to run a setup file and use the following code to run the file.

Run("setup.msi")
i also try
run("setup.msi","")
N.B. Both script and msi setup file are in same directory[folder]

and then i save the script and run it. but nothing happens whats wrong with my code? did it run an msi file.? if not then how can i run the setup file. any alternatives.?

Any idea what's wrong with my code ??? looking 4 help

Link to comment
Share on other sites

Only a few file extensions are usually \\\"runable\\\" - these are .exe, .bat, .com, .pif. Other file types like .txt and .msi are actually executed with another program. When you double click on a \\\"myfile.msi\\\" file what actually happens in the background is that \\\"msiexec.exe myfile.msi\\\" is executed. So to run a .msi file from AutoIt you would do:

RunWait(\\\"msiexec myfile.msi\\\")

Or, run the command \\\"start\\\" which will automatically work out how to execute the file for you:

RunWait(@COMSPEC & \\\" /c Start myfile.msi\\\")

Or, use the ShellExecuteWait function which will automatically work out how to execute the file for you:

ShellExecuteWait(\\\"myfile.msi\\\")

Note : Please avoid \\ because i dont know why it comes with every post while i uses commas.

Edited by Jos07

Always Keep Your Sig Small... Like me :D

Link to comment
Share on other sites

no hope i was to unable to run it any one else please i need to run this.

your first runwait statement. all possible way that i supposed i checked.

1 . > RunWait(,\"msiexec myfile.msi,\")

2 . > RunWait(\,"msiexec myfile.msi\,")

non of the above code works.

Link to comment
Share on other sites

In order to avoid any error use the full path for your msi file.

RunWait("msiexec the_full_name_including_path_of_your_msi_file")

or as Jos07 suggested:

ShellExecuteWait("myfile.msi")

(use also the full file name)

Edited by enaiman

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Link to comment
Share on other sites

In order to avoid any error use the full path for your msi file.

RunWait("msiexec the_full_name_including_path_of_your_msi_file")

or as Jos07 suggested:

ShellExecuteWait("myfile.msi")

(use also the full file name)

If the msi file and the executed script are in the same folder, you could use this:

ShellExecuteWait(@ScriptDir & "\myfile.msi")
;myfile.msi contains a backslash because @ScriptDir does not have one
[center]It's a question of mind over matter, if I don't mind, it doesn't matter.[/center]
Link to comment
Share on other sites

I use this normally

RunWait('msiexec /options for install/patch "path to MSI" /options for quiet install /log ' & $WorkDir & '\MSI LOG.txt PROPERTIES')

to install

RunWait('msiexec /i \\server\directory\setup.msi /qb /log ' & $WorkDir & '\log.txt REINSTALL=All REINSTALLMODE=vomus')

to patch an admin install

RunWait('msiexec /p \\server\share\ArcGISAdminInstall\Service_packs\SP5\ArcGISDesktop92sp5.msp /a \\server\share\ArcGISAdminInstall\Setup.msi /qb /Log \\server\share\ArcGISAdminInstall\Service_packs\SP5\arcview.sp5.txt')

Link to comment
Share on other sites

  • 7 months later...
  • 1 year later...
  • 10 months later...

I am trying to recreate a LanDesk script with AutoIt and I am having difficulties getting it to work any assistance would be great.

the original script went:

"msiexec", para="/i \\servername\RPAA\myfile.msi /qb /Lv* "C:\RP_install.log" PATHINI="\\server\RPAA\Config.ini""

I think using the ShellExecute is the way to go but I can't get the syntax correct.

Edited by TuxBird
Link to comment
Share on other sites

Hello TuxBird,

take a look at the helpfile under Contents => Language Reference => Datatypes. Look at the "Strings" paragraph.

As far as I can see fro your example you've got a quote-problem.

Regards,

Hannes

:)

Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]
Link to comment
Share on other sites

...

"msiexec", para="/i \\servername\RPAA\myfile.msi /qb /Lv* "C:\RP_install.log" PATHINI="\\server\RPAA\Config.ini""
...

Welcome TuxBird,

The "para= ..." property does not look correct to me. The property value i.e. "/i", looks like the switches you should be passing direct to msiexec instead.

Try this for Run().

Run('msiexec /i "\\server\RPAA\myfile.msi" /qb /lv* "C:\RP_install.log" "PATHINI=\\server\RPAA\Config.ini"')

or perhaps try this with ShellExecute().

ShellExecute('"\\server\RPAA\myfile.msi"', '/qb /lv* "C:\RP_install.log" "PATHINI=\\server\RPAA\Config.ini"')

Take note of how the single quotes wrap around the whole of the string parameters so the double quotes within are valid to be passed. Use the workingdir parameter if required. :)

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