Sign in to follow this  
Followers 0
mwyattfrch

script not launching setup.exe

3 posts in this topic

#1 ·  Posted (edited)

I have a script that will look and uninstall Lync 2010 if needed, and then copy down Office 2013 installer I made using OCT, and then run it from a directory I create and then delete once done.

The problem is, the setup.exe for Office 2013 in the C:Office2013 directory I create never runs at all. The whole section is completely skipped! The Lync uninstall will run, and Office will copy down successfully, then the script just goes to deleting content and done.

I can get it to run on one machine no problems but the rest never run.

Can anyone tell me what I am doing wrong?

FYI I have 

#include <FileConstants.au3>
#include <MsgBoxConstants.au3>
#include <DirConstants.au3>
#include <GUIConstants.au3>
#include <Date.au3>
#include <Process.au3>

Way up at the top
;Check if Office 2013 is already installed
$sOffice13path = "C:\Program Files (x86)\Microsoft Office\Office15\CONVERT"
If FileExists($sOffice13path) Then
    Exit
    Else
        ;Now we can install Office 2013
        ;Copy Office 2013 install locally
        $sFilePath = "C:\Office2013"
        If Not FileExists($sFilePath) then
            $app_description=("Copying Office 2013 Locally...")
            $GUI_Size=100
            $GUITitle=StringFormat("%s - FRCH",$app_description)
            $GUIWording=StringFormat("Now %s",$app_description)
            GUICreate ($GUITitle, 350, $GUI_Size)
            $Label = GUICtrlCreateLabel($GUIWording, 80, 30)
            GUISetState(@SW_SHOW) ;Show initial installation GUI window
            DirCreate('C:\Office2013')
            RunWait(@ComSpec & " /c " & "net use Y: /delete")
            RunWait(@ComSpec & " /c " & "net use Y: \\netfas3210a\admin\Technology\Software\Windows\Microsoft\Office2013wSP1 /user:blankedout")
            RunWait(@ComSpec & " /c " & "xcopy /Y /I /E /Q Y:\* C:\Office2013")
            GUISetState(@SW_HIDE)

            ;Run install!
#include <GUIConstants.au3>
            RegWrite("HKCU\Environment", "SEE_MASK_NOZONECHECKS", "REG_SZ", 1)
            RegWrite("HKLM\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", "EnableLUA", "REG_DWORD", 0)
            $Silent=0 ;$Silent=0 "Show GUI", $Silent=1 "No Show GUI"
            $Program_Type=("INSTALL") ;Determining the Program Type (Options INSTALL or UNINSTALL)
            $app_description=("Office 2013")
            $vers=("2013")
            If $Silent=0 Then
                $GUI_Size=100
                $GUITitle=StringFormat("%s V%s - FRCH",$app_description,$vers)
                $GUIWording=StringFormat("Running %s",$app_description)
                GUICreate ($GUITitle, 350, $GUI_Size)
                $Label = GUICtrlCreateLabel($GUIWording, 100, 30)
                GUISetState(@SW_SHOW) ;Show initial installation GUI window
            EndIf
            RunWait('C:\Office2013\setup.exe /config proplus.ww\config.xml')
        EndIf
EndIf
Edited by mwyattfrch

Share this post


Link to post
Share on other sites



If the files do copy over correctly then the big question revolves around running the setup.exe.

I think there could be 2 possibilities. One may be an issue with the switches (/config proplus.wwconfig.xml). Try running just setup.exe without the switches. Another possibility could be the system may refuse to install after uninstalling without a reboot. Try uninstalling it manually and running the installer to see if any messages appear saying you need to reboot.


RAID Calculator | Software Installer

The truth has been suppressed since the dawn of time.

Share this post


Link to post
Share on other sites

There are also lots of functions you can utilize, such as:

DriveMapDel
DriveMapAdd
FileCopy

Click the links^, for the help file...they return @error, or a failure return...you should add handling for such things (errors|failures)


IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
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
Sign in to follow this  
Followers 0