Jump to content

Command not completing


Recommended Posts

Office 2003 is not installing, there are no error(s) given, the script shows it being installed and moves to the next command as if it were installed, but when all is done - it is not. Could someone double-check the syntax?

Everything else installs correctly (credit to MHz)

EDIT: I'm not sure why the colors aren't displaying correctly in the second piece of AutoIt code.

Excerpt entire script:

; < COMMAND 6 >
_Progress('Office 2003 - This might take several minutes to complete')
_Run('msiexec /i %systemdrive%\OemPreinstall\Office\SETUP.EXE TRANSFORMS=PRO11.MST /qn')
oÝ÷ Ù·§¶*Þ±Êâ¦ßÛjëh×6
#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.1.1.0
 Author:         Richard Haynes / MHz (Autoit Forums) 11/5/2006, Last modified: Sunday, Nov 5th '06

 Script Function:
    Unattended installation.

#ce ----------------------------------------------------------------------------

#include <GUIConstants.au3>

Opt('ExpandEnvStrings', 1) ;this option allows you to use %environment% variables inside strings, e.g., "The temp directory is: %temp%".

;Settings
Global $timeout = 10 ; Timeout until auto-execute
Global $item_count = 39 ; Total amount of task to do ( ; < COMMAND X > )
; General Global variables
Global $counter ; Stores the items done so far
Global $time = TimerInit() ; Start countdown to auto execute

GUICreate('Installing Updates', 550, 350)
GUICtrlCreateGroup('', 15, 10, 520, 290) ; Open Group
GUICtrlCreateLabel('Installation status:', 40, 80)
$edit_display = GUICtrlCreateEdit('', 40, 100, 470, 100, BitOR($ES_AUTOVSCROLL, $WS_VSCROLL, $ES_READONLY), $WS_EX_STATICEDGE)
GUICtrlCreateLabel('Installing:', 40, 220)
$progress = GUICtrlCreateProgress(40, 240, 470, 25)
GUICtrlCreateGroup('', -99, -99, 1, 1) ; Close group.
$button_execute = GUICtrlCreateButton('&Execute', 380, 315, 70)
$button_cancel = GUICtrlCreateButton('&Cancel', 465, 315, 70)
GUISetState()

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE, $button_cancel
            GUICtrlSetState($button_cancel, $GUI_DISABLE)
            Exit
        Case $button_execute
            GUICtrlSetState($button_execute, $GUI_DISABLE)
            ExitLoop
        Case Else
            $timediff = Int(TimerDiff($time)/1000)
            If $timediff > $timeout Then
                GUICtrlSetState($button_execute, $GUI_DISABLE)
                GUICtrlSetData($edit_display, 'Auto Execute commencing...' & @CRLF)
                ExitLoop
            EndIf
    EndSwitch
WEnd

; < COMMAND 1 >
_Progress('show hidden files and folders/show extensions...')
_Run('reg import %systemdrive%\OemPreinstall\View.reg', '', @SW_HIDE)

; < COMMAND 2 >
_Progress('Microsoft .NET Framework 1.1')
_Run('msiexec /i %systemdrive%\OemPreinstall\dotnetfx\netfx.msi /qn')

; < COMMAND 3 >
_Progress('Microsoft .NET Framework 2.0')
_Run('%systemdrive%\OemPreinstall\dotnetfx.exe /q:a /c:"install /l /q"')

; < COMMAND 4 >
_Progress('Security update for Microsoft .NET Framework 2.0')
_Run('%systemdrive%\OemPreinstall\KB917283.exe /qn')

; < COMMAND 5 >
_Progress('Security Update for Microsoft .NET Framework, Version 2.0')
_Run('%systemdrive%\OemPreinstall\KB922770.exe /qn')

; < COMMAND 6 >
_Progress('Office 2003 - This might take several minutes to complete')
_Run('msiexec /i %systemdrive%\OemPreinstall\Office\SETUP.EXE TRANSFORMS=PRO11.MST /qn')

; < COMMAND 7 >
_Progress('Office updates - This might take several minutes to complete')
_Run('%systemdrive%\OemPreinstall\Office\updates\updates.bat', '', @SW_HIDE)

; < COMMAND 8 >
_Progress("turning off the Office '03 Language Bar...")
_Run('reg import %systemdrive%\OemPreinstall\LangBar.reg', '', @SW_HIDE)

; < COMMAND 9 >
_Progress('Windows Media Player 11')
_Run('msiexec /i %systemdrive%\OemPreinstall\mpsetupedp.msi /qn')

; < COMMAND 10 >
_Progress('update for WMDRM-enabled players')
_Run('%systemdrive%\OemPreinstall\WMDRM.exe /q')

; < COMMAND 11 >
_Progress('Security Update for Windows Media Player 10 for Windows XP (KB911565)')
_Run('%systemdrive%\OemPreinstall\KB911565.exe /q')

; < COMMAND 12 >
_Progress('HighMAT CD Writing Wizard')
_Run('%systemdrive%\OemPreinstall\HMTCD.exe /qn')

; < COMMAND 13 >
_Progress('Microsoft PowerToys for Windows XP - This may take a minute or two')
_Run('%systemdrive%\OemPreinstall\PowerToys\PowerToys.bat', '', @SW_HIDE)

; < COMMAND 14 >
_Progress('Microsoft Calculator Plus')
_Run('msiexec /i %systemdrive%\OemPreinstall\CalcPlus.msi /qn')

; < COMMAND 15 >
_Progress('Windows Media Connect 2.0')
_Run('%systemdrive%\OemPreinstall\wmcsetup.exe /q')

; < COMMAND 16 >
_Progress('Adobe Reader 7.0.7')
_Run('msiexec /i %systemdrive%\OemPreinstall\Adobe\7.07\Adobe.msi /qn')

; < COMMAND 17 >
_Progress('Accept Adobe Reader EULA...')
_Run('reg import %systemdrive%\OemPreinstall\Adobe\EULA.reg', '', @SW_HIDE)

; < COMMAND 18 >
_Progress('Hide the Yahoo! toolbar/Search The Internet menu (Adobe Reader)')
FileCopy("%systemdrive%\OemPreinstall\Adobe\disableYahooSearch.js", "C:\Program Files\Adobe\Acrobat 7.0\Reader\Javascripts\", 1)

; < COMMAND 19 >
_Progress("Disable 'Search The Internet' in the Search pane (Adobe Reader)")
FileMove("%systemdrive%\Program Files\Adobe\Acrobat 7.0\Reader\Javascripts\WebSearch.js", "%systemdrive%\Program Files\Adobe\Acrobat 7.0\Reader\Javascripts\WebSearch.old", 1)

; < COMMAND 20 >
_Progress('Shockwave Player 10')
_Run('%systemdrive%\OemPreinstall\Shockwave_Installer_Full.exe /S')
ProcessWait('iexplore.exe', 3)
ProcessClose('iexplore.exe')

; < COMMAND 21 >
_Progress('Security update for Flash player (Flash player Version 9)')
_Run('%systemdrive%\OemPreinstall\player.exe /q:a /r:n')

; < COMMAND 22 >
_Progress('Windows Live Messenger 8.1 BETA')
_Run('msiexec /i %systemdrive%\OemPreinstall\MsnMsgs.msi /qn')

; < COMMAND 23 >
_Progress('Java Runtime Environment 5.0 Update 9')
_Run('%systemdrive%\OemPreinstall\jre-1_5_0_09-windows-i586-p-s.exe /s /v"/qn ADDLOCAL=ALL IEXPLORER=1 REBOOT=Suppress WEBSTARTICON=0')

; < COMMAND 24 >
_Progress('Symantec AntiVirus 10.0 Corporate Edition')
_Run('msiexec /i %systemdrive%\OemPreinstall\AntiVirus\AntiVirus.msi ENABLEAUTOPROTECT=1 RUNLIVEUPDATE=0 /qn')

; < COMMAND 25 >
_Progress('Close "Old Virus Definition File" window')
_Run('%systemdrive%\OemPreinstall\WinClose.exe')

; < COMMAND 26 >
_Progress('Updating Virus Protection Files -Release Date: November 10, 2006-')
_Run('%systemdrive%\OemPreinstall\definitions.exe /q')

; < COMMAND 27 >
_Progress('Internet Explorer 7 - This may take a minute or two')
_Run('%systemdrive%\OemPreinstall\IE7.exe /norestart /quiet /passive')

; < COMMAND 28 >
_Progress('WinRAR 3.61')
_Run('%systemdrive%\OemPreinstall\wrar361.exe /s')

; < COMMAND 29 >
_Progress('Disable Balloon Tips - Remove Messengers from Startup')
_Run('reg import %systemdrive%\OemPreinstall\BalloonTips.reg', '', @SW_HIDE)

; < COMMAND 30 >
_Progress('disable third-party tool bands')
_Run('reg import %systemdrive%\OemPreinstall\thirdparty.reg', '', @SW_HIDE)

; < COMMAND 31 >
_Progress('QuickTime 7.1.3')
_Run('msiexec /i %systemdrive%\OemPreinstall\QuickTime\QuickTime.msi /qn')
FileMove("%ProgramFiles%\QuickTime\qttask.exe", 'qttask')

; < COMMAND 32 >
_Progress('Remove Desktop icons')
FileDelete("C:\Documents and Settings\All Users\Desktop\*.*")

; < COMMAND 33 >
_Progress('Mozilla Firefox 1.5.0.7')
_Run('%systemdrive%\OemPreinstall\Firefox\setup.exe')

; < COMMAND 34 >
_Progress('VMware Workstation 5.5.2')
_Run('msiexec /i "%systemdrive%\OemPreinstall\VMware\VMware Workstation.msi" ADDLOCAL=ALL DESKTOP_SHORTCUT=0 SERIALNUMBER=xxxxx-xxxxx-xxxxx-xxxxx /qn')

; < COMMAND 35 >
_Progress('Network Diagnostic Tool')
_Run('%systemdrive%\OemPreinstall\NetDiag.exe /q')

; < COMMAND 36 >
_Progress('Run the Photoshop installer')
Run(@ComSpec & ' /c ' & "msiexec /i %systemdrive%\OemPreinstall\Photoshop\Photoshop.msi /qn UNITYSELECTION=RETAIL SERIALNUMBERTEMP=xxxx-xxxx-xxxx-xxxx-xxxx-xxxx",'',@SW_HIDE)

; < COMMAND 37 >
_Progress('Close the Photoshop Activation Window')
WinWaitActive("Adobe Photoshop Installer")
ControlClick("Adobe Photoshop Installer", "", "Button6")
WinWaitActive("Adobe Activation")
ControlClick("Adobe Activation", "", "Button1")

; < COMMAND 38 >
_Progress('Activate Photoshop')
FileCopy("%systemdrive%\OemPreinstall\Photoshop\B2B86000.dat", "%systemdrive%\Documents and Settings\All Users\Application Data\Adobe Systems\Product licenses\", 8)

; < COMMAND 39 >
_Progress('Porsche Wallpaper')
FileCopy("%systemdrive%\OemPreinstall\porsche.bmp", "%systemdrive%\WINDOWS\Web\Wallpaper\", 8)
_Run('reg import %systemdrive%\OemPreinstall\Wallpaper.reg', '', @SW_HIDE)

;~ GUIDelete()
Run(@ComSpec & ' /c shutdown -r -f -t 300 -c "Finalizing installation"', '', @SW_HIDE) ; Restarting Computer in 5 minutes...

Exit

Func OnAutoItStart()
    ; Prevent 2nd instance
    If WinExists(@ScriptName & '_Interpreter') Then Exit
    AutoItWinSetTitle(@ScriptName & '_Interpreter')
EndFunc

Func _Progress($text)
    ; Update the edit control
    GUICtrlSetData($edit_display, $text & @CRLF, True)
    ; Update process control
    $counter += 1; update counter
    $percent = Int(100/$item_count*$counter); calculate percentage
    GUICtrlSetData($progress, $percent)
EndFunc

Func _Run($command, $workingdir = '', $flag = @SW_SHOW)
    ; Run a program...
    Local $pid = Run($command, $workingdir, $flag)
    While ProcessExists($pid)
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE, $button_cancel
                GUICtrlSetState($button_cancel, $GUI_DISABLE)
                _Progress('Preparing to close...')
                ProcessWaitClose($pid)
                Exit 1
        EndSwitch
    WEnd
EndFunc
Edited by rhaynes0010
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...