Jump to content

Auto install for Adobe Reader 11.0.0.2


 Share

Recommended Posts

ShellExecute ( "msiexec.exe", '/i "\\server\path\Adobe\Adobe Reader 11.0.0.2\AcroRead.msi TRANSFORMS=acroread.msp" /qn' )

Sleep ( 15000 )

ShellExecute ( "msiexec.exe", '/i "\\server\path\Adobe\Adobe Reader 11.0.0.2\AdbeRdrUpd11001.mst" /qb /norestart /qn' )

Sleep (10000)

ShellExecute ( "msiexec.exe", '/i "\\server\path\Adobe\Adobe Reader 11.0.0.2\AdbeRdrSecUpd11002.msp" /qb /norestart /qn' )

The above script, no matter what it seems that I try to do, will not work. First of all, I am by no means anywhere a pro at AutoIT. I've recently started using it and trying to learn it, but seem to be failing. I've googled and looked at the forums here, but haven't seen anyone posting anything for Reader 11.0.0.2.

So, this is the order of events that I've tried:

1) The above script, I've tried various things, with no success. The only way the first line ShellExecute ( "msiexec.exe", '/i "\\server\path\Adobe\Adobe Reader 11.0.0.2\AcroRead.msi TRANSFORMS=acroread.msp" /qn' ) would work, was if I took out the TRANSFORM=acroread.mst. But, the 2 updates wouldn't install (actually, I don't think the updates installed no matter what).

Now, I've created a .bat file with the same commands as above and it works (even the updates will install). But I didn't want to use a batch file because I'm distributing Reader XI to over 500 computers and didn't want to interrupt what the users where doing with a command prompt and then getting all those calls.

2) As stated earlier, I can get the initial file to install (without TRANSFORMS), but the updates don't seem to execute. So if I load up Reader after installs, it shows on the splash screen "Reader 11.0.0".

3) Is the "Sleep" command even necessary?

All of the computers (at this moment) that I'm trying to install the new Acrobat Reader on, are Windows XP. The computer that I'm creating the AutoIT file from is Windows 7 x64 (I know that doesn't make a difference, but I'm just trying to think of all the information someone would ask, so they can assist with this).

The whole reason I need the TRANSFORMS statement is because I used the Adobe Customization XI utility. I've removed the EULA, some shortcuts, silent install, etc....

Any suggestions?

Thanks for any help.

Link to comment
Share on other sites

Some suggestion

1) Don't use Sleep, you can use ShellExecuteWait

2) Instead of ShellExecute, try RunWait ( if work in a .bat work also here )

RunWait(@ComSpec & " /c " & 'msiexec.exe /i "\\server\path\Adobe\Adobe Reader 11.0.0.2\AcroRead.msi TRANSFORMS=acroread.msp" /qn', @TempDir, @SW_HIDE)
RunWait(@ComSpec & " /c " & 'msiexec.exe /i "\\server\path\Adobe\Adobe Reader 11.0.0.2\AdbeRdrUpd11001.mst" /qb /norestart /qn', @TempDir, @SW_HIDE)
RunWait(@ComSpec & " /c " & 'msiexec.exe /i "\\server\path\Adobe\Adobe Reader 11.0.0.2\AdbeRdrSecUpd11002.msp" /qb /norestart /qn', @TempDir, @SW_HIDE)
Edited by johnmcloud
Link to comment
Share on other sites

Untested, but this might work better

ShellExecuteWait ( "msiexec.exe", '/i "\\server\path\Adobe\Adobe Reader 11.0.0.2\AcroRead.msi" TRANSFORMS=acroread.msp /qn' )

ShellExecuteWait ( "msiexec.exe", '/i "\\server\path\Adobe\Adobe Reader 11.0.0.2\AdbeRdrUpd11001.mst" /qb /norestart /qn' )

ShellExecuteWait ( "msiexec.exe", '/i "\\server\path\Adobe\Adobe Reader 11.0.0.2\AdbeRdrSecUpd11002.msp" /qb /norestart /qn' )

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

Some suggestion

1) Don't use Sleep, you can use ShellExecuteWait

2) Instead of ShellExecute, try RunWait ( if work in a .bat work also here )

RunWait(@ComSpec & " /c " & 'msiexec.exe /i "\\server\path\Adobe\Adobe Reader 11.0.0.2\AcroRead.msi TRANSFORMS=acroread.msp" /qn', @TempDir, @SW_HIDE)
RunWait(@ComSpec & " /c " & 'msiexec.exe /i "\\server\path\Adobe\Adobe Reader 11.0.0.2\AdbeRdrUpd11001.mst" /qb /norestart /qn', @TempDir, @SW_HIDE)
RunWait(@ComSpec & " /c " & 'msiexec.exe /i "\\server\path\Adobe\Adobe Reader 11.0.0.2\AdbeRdrSecUpd11002.msp" /qb /norestart /qn', @TempDir, @SW_HIDE)

Just tried that. Doesn't seem to do anything. The script launches on the PC, but then immediately goes away (autoit system tray icon). I wait a few minutes just to make sure, but doesn't install.
Link to comment
Share on other sites

Untested, but this might work better

ShellExecuteWait ( "msiexec.exe", '/i "\\server\path\Adobe\Adobe Reader 11.0.0.2\AcroRead.msi" TRANSFORMS=acroread.msp /qn' )

ShellExecuteWait ( "msiexec.exe", '/i "\\server\path\Adobe\Adobe Reader 11.0.0.2\AdbeRdrUpd11001.mst" /qb /norestart /qn' )

ShellExecuteWait ( "msiexec.exe", '/i "\\server\path\Adobe\Adobe Reader 11.0.0.2\AdbeRdrSecUpd11002.msp" /qb /norestart /qn' )

Same thing as above... The script runs for a second, then disappears without installing.
Link to comment
Share on other sites

This what I use for installing Adobe Reader.

Local $uAdobeReaderDisp, $uAdobeReaderVer
Local $uRegKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
For $i = 1 To 500
$AppKey = RegEnumKey($uRegKey, $i)
$uAdobeReaderDisp = StringLeft(RegRead($uRegKey & "\" & $AppKey, "DisplayName"), 12)
If $uAdobeReaderDisp = "Adobe Reader" Then
$uAdobeReaderVer = RegRead($uRegKey & "\" & $AppKey, "DisplayVersion")
EndIf
Next

If $uAdobeReaderVer = "11.0.0" Then
RunWait('msiexec /update "\\server\path\Adobe\READER\AdbeRdrUpd11001.msp" /QB /norestart')
RunWait('msiexec /update "\\server\path\Adobe\READER\AdbeRdrSecUpd11002.msp" /QB /norestart')
ElseIf $uAdobeReaderVer = "11.0.01" Then
;Updates
RunWait('msiexec /update "\\server\path\Adobe\READER\AdbeRdrSecUpd11002.msp" /QB /norestart')
Else
RunWait('msiexec /i "\\server\path\Adobe\READER\AcroRead.msi" TRANSFORMS="\\server\path\Adobe\READER\AcroRead.mst" /QB /NORESTART')
;Updates
RunWait('msiexec /update ""\\server\path\Adobe\READER\AdbeRdrUpd11001.msp" /QB /norestart')
RunWait('msiexec /update "\\server\path\Adobe\READER\AdbeRdrSecUpd11002.msp" /QB /norestart')
EndIf

It should check the version and install the updates that are needed.

Edited by jazzyjeff
Link to comment
Share on other sites

FYI. The Transforms part should be pointing to the MST file. This is the configuration file for Adobe. You can create these Transforms files by using the Adobe Customization Wizard. Download the appropriate version for your reader version.

The MSP files are just update files for the package. They do not contain the full program, but just the security or program fixes.

Link to comment
Share on other sites

This what I use for installing Adobe Reader.

Local $uAdobeReaderDisp, $uAdobeReaderVer
Local $uRegKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
For $i = 1 To 500
$AppKey = RegEnumKey($uRegKey, $i)
$uAdobeReaderDisp = StringLeft(RegRead($uRegKey & "\" & $AppKey, "DisplayName"), 12)
If $uAdobeReaderDisp = "Adobe Reader" Then
$uAdobeReaderVer = RegRead($uRegKey & "\" & $AppKey, "DisplayVersion")
EndIf
Next

If $uAdobeReaderVer = "11.0.0" Then
RunWait('msiexec /update "\\server\path\Adobe\READER\AdbeRdrUpd11001.msp" /QB /norestart')
RunWait('msiexec /update "\\server\path\Adobe\READER\AdbeRdrSecUpd11002.msp" /QB /norestart')
ElseIf $uAdobeReaderVer = "11.0.01" Then
;Updates
RunWait('msiexec /update "\\server\path\Adobe\READER\AdbeRdrSecUpd11002.msp" /QB /norestart')
Else
RunWait('msiexec /i "\\server\path\Adobe\READER\AcroRead.msi" TRANSFORMS="\\server\path\Adobe\READER\AcroRead.mst" /QB /NORESTART')
;Updates
RunWait('msiexec /update ""\\server\path\Adobe\READER\AdbeRdrUpd11001.msp" /QB /norestart')
RunWait('msiexec /update "\\server\path\Adobe\READER\AdbeRdrSecUpd11002.msp" /QB /norestart')
EndIf

It should check the version and install the updates that are needed.

Seems to work as far as installing the initial file, but when it came to the updates, I get the Windows Installer (msiexec) switch page. Any suggestions as to what I may be doing wrong? I'm double checking my paths, but everything seems to look in order. I'll keep looking.

Thanks again for your help. This script is pretty awesome so far.

Link to comment
Share on other sites

I made an error on the 3rd from bottom line. There are 2 " together and there should only by 1.

Also, try this:

'msiexec /i "serverpathAdobeREADERAdbeRdrUpd11001.msp" /QB /norestart'

The "msiexec /update" works for me, but perhaps this is causing the issue for you.

Link to comment
Share on other sites

I made an error on the 3rd from bottom line. There are 2 " together and there should only by 1.

Also, try this:

'msiexec /i "serverpathAdobeREADERAdbeRdrUpd11001.msp" /QB /norestart'

The "msiexec /update" works for me, but perhaps this is causing the issue for you.

Jazzy, I can't thank you enough. I didn't even see that second ", but after I removed it, everything worked.

If there is no installs, it installs and updates all the way to 11.0.0.2. If 11 is installed, it finds and updates to .2.

This is perfect. Again, thank you so much!

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