Jump to content

Error Parsing Function Call


 Share

Recommended Posts

Hi,

I am trying to perform a simple uninstall then install of a program and I keep getting "Error parsing function call" on line 24.

Everything installs fine, however I still get the parsing error.

 

#RequireAdmin
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=icon.ico
#AutoIt3Wrapper_Res_Comment=CU 4.02 Update
#AutoIt3Wrapper_Res_Description=ITS
#AutoIt3Wrapper_Res_Fileversion=1.8.0.0
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

FileCopy(@ScriptDir & "\*.*", "C:\Windows\MSICACHE\CU402\", 9)

If @OSArch = "X64" Then
    Global $Path = "C:\Program Files (x86)\Computers Unlimited\CUKViewer\CUKViewer.exe"
Else
    Global $Path = "C:\Program Files\Computers Unlimited\CUKViewer\CUKViewer.exe"
EndIf

If FileExists($Path) Then ;Checks if CU 2.01 is already installed, if it is then upgrade else exit with exit code 62.
    MsgBox(0, "CU Image Viewer 4.02 Upgrade", "An update for CU Image Viewer is ready to be installed on your computer.  Please close out of CU then hit OK to start the installation.")
    While ProcessExists("CUKViewer.exe")
        MsgBox(0, "CU Image Viewer 4.02 Upgrade", "Please close out of CU to start the installaiton.")
    WEnd
    SplashTextOn("CU Image Viewer 4.02 Upgrade", "Updating CU Image Viewer, please wait...", 600, 120, -1, -1)
    RunWait(@ComSpec & ' /c msiexec /x {02FF7728-E897-11D5-A7F3-444553540000} /qn', @SystemDir, @SW_HIDE) ;Uninstall CUViewer 4.01.0005
    Sleep(2000) ;Sleep for two seconds
    RunWait(@ComSpec & ' /c msiexec /i C:\Windows\MSICACHE\CU402\CUKViewerDTI.msi /qn /norestart ALLUSERS="1"', @SystemDir, @SW_HIDE) ;Installs CUViewer 4.02
    Sleep(2000) ;Sleep for two seconds
    SplashOff
    MsgBox(0, "CU Image Viewer 4.02 Upgrade", "Upgarde Completed Successfully.")
    Exit
Else
    MsgBox(0, "", "CU not installed")
    Exit (62)
EndIf

 

error.JPG

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